I am a beginner with Particle Photon, and I am using the Particle Photon with the [Shield Shield][1] as a small experimental weather station to protect my peppers against the Texas climate. I am using the shield shield to protect the Photon against myself. I want to measure temperature (TMP36), light (resistor) and at a couple of peppers the soil moisture (resistor).
I can connect my analogue sensor wire to "DAC1" on the Shield Shield to read out my light sensor.
Four AI's is great, but more is better! I see that in the [Shield Shield pin out][2], A4,A5 and A2 are sacrificed for SPI1 functions. But in that same table, WKP shows Peripherals for both PWM and ADC. It is not clear to me if this ADC is also limited to 3.3V (has no comments **-ed to it).
So I tried to assign WKP (int testpin = A7*) and hook up the sensor to channel "3" on the Shield Shield....nothing happens. Yet, when I stick in my sensor wire directly to the pin named WKP at the Photon, I can successfully read the value with the Photon.
My questions:
is the Shield Shield limited to 4 Analogue Inputs?
if not; can WKP be used as Analogue Input, which pin on the Shield Shield should I use?
WKP is A7, but in code you can still use WKP just the same (as you could use DAC in place of A6)
After all, these descriptive names are only mapped to numbers where the e.g. WKP is mapped to 17 and A7 is 17 too.
This said, I’ve not double checked the Shield shiels wiring so I’m not certain how things behave level-shifting wise, but on the Photon directly this is the case.
So if you use the headers left and right of the Photon itself you can use all A-pins as 3.3V analog in pins (unless used otherwise via the shield).
Sorry - I misspelled that; WKP is A7 indeed (not A8). And in code they are interchangeable. I corrected my original post - my bad, I do not want to rewrite history Great point you make about the mapping from “WKP or A7” to numbers, I had not realized that yet, cool!
And you are right; if I connect the wire directly to the WKP pin on the Photon I can read the sensor. It is the same is if I connect the wire to A5 on the Photon, and address it in code as;
int testpin = A5
In that case I can read the analogue signal as well, regardless of the circuitry “downstream” no the Shield Shield. But as I am not using the Shield Shield circuitry I also do not have the Shield Shield protection (diodes, TI chips). It would be a nice work around - thanks for the advice.
Still I am wondering that if I use the Shield Shield, can I have more than 4 Analogue Inputs?
I’d doubt this, since you’d need “analog level shifting” on the other A pins like (A2, A7/WKP, A4, A5) which I don’t think is implemented.
But as said - I’ve not looked at the hardware design of the shield.
If you do mistrust yourself that much you could use an external ADC board via I2C or SPI.
Hi Matt,
How was your experience using the adafruit ADS1115? I am looking to use it as a replacement to the expensive one I am currently using. Any feedback would be appreciated.
From what I understand he likes it, but I think my question is off the thread topic. I need to create a new thread and post my question there. I don’t want to hijack this one with my randomness.
I was privately offering to share some very specific ADS1115 code with @GasGen that might apply to his project.
I assumed our discussion could get way off topic (and it did) which is generally frown’d on.
That was my only intention of the PM.
I’ll happily share my limited knowledge of the ADS1115 and experience with anyone. It just didn’t seem like this was the proper Thread for me to do so