I’m eager to try out the shield as part of a lettuce grow station. Alas, I have made a D’OH error which I point out below. While I try to avoid D’OHs…I find they are littered on my path. I remind myself that what we do in life is always in a state of practice.
In this post I solder on the BNC connector for the pH probe. The goal is to start taking pH readings first in calibrated solutions then in lettuce grow stations. I did not make this goal. See D’OH below…
Thanks to Those That Went Before
Adding the BNC connector
I am finding connectors to be the most difficult footprint to get right on my PCB layouts. Many times I iterated over the footprint of the BNC connector when I was laying out the Ladybug Shield Alpha 1. My iteration process consisted of:
- correct the location and width of the drill holes for the BNC.
- print out the drill file and check if the BNC poles fit.
I am happy to report the fit was perfect. A definite YIPEE moment!
Measuring the pH With a Probe
I started like I have in the past, connecting the probe to the BNC connector and then putting the probe in pH 4 calibration solution. Testing showed I wasn’t getting any readings. After taking longer than it probably should…guess what?
That’s right – a D’OH moment. Um… I tested the BNC connection by sticking the end of a voltage divider wire into the BNC connector.
And found the problem! Note the gold wire. This would be the input voltage – i.e.: the voltage reading from the solution (relative to VGND):
On the layout I got the pHV in and VGND reversed!
The image shows another D’OH moment. I added the post through holes as part of the circuit. This mistake didn’t cause a problem because the through holes connected to the rest of the circuit. However, I shouldn’t have done this and will update the layout to not include the posts.
Given the BNC pins are swapped and the posts are considered part of the circuit (but shouldn’t), this is also a problem with the EC BNC connector. I fixed both in the schematic and layout.
Back to Measuring the pH Voltage
I removed the BNC connector from the shield. I then put a BNC connector on a bread board and hooked up the probe. I inserted the probe in pH 4 calibration solution. As noted in this link, the pH voltage value of a pH 4 solution is 189mV. I used a simple Arduino sketch that read the pH voltage from the ADC. This was a differential reading using AIN0 for the pH Voltage in and AIN3 for VGND (see previous post). I took 314 readings at 1 second intervals:
- Average: 186mV
- Standard Deviation 47mV