I finished testing the Ladybug Alpha V2….for the most part all works. Still there is more to fix. I just sent Beta 2 off to OSH Park. I skipped Beta 1. I had done a version where I had removed the pump circuits. I decided to put these back in after testing the pumps.
The goal of this post is to document changes to Ladybug Alpha V2 that change the schematic and layout.
Thanks To Those That Went Before
- Thanks to OSH Park for their exceptional PCB fabrication and support. OSH Park is excellent at keeping customers happy. OSH Park – thank you for your exceptional support and company culture that makes me want to support you as a company. Thanks to Embedded.fm’s interview of Laen – OSH Park’s CEO – I now know that it is OSH and now Osh.
- Thanks to Adafruit for their excellence in support, tutorials, and open source availability of schematics/layout. This post borrows the design for a single power source in Adafruit’s motor shield. Adafruit has done an excellent job not only selling to, but supporting and caring about customers. I know when I have a question and post it on the forum – one of the incredibly knowledgable and kind folks (typically Mike or Bill) respond in a small amount of time – along with great answers from folks that are not employed by Adafruit. Adafruit – like OSH Park – are high on my list of companies to buy products from. The products are of great quality, come with excellent additions – like libraries for Arduino programming, tutorials, and are well supported.
- As always, thank you to Chris Gammell. I am continuing to learn A LOT from Chris’s Contextual Electronics courses. I like the new format where we work on smaller projects together. Each one has given me many opportunities to strengthen my knowledge…well, I try anyways.
- Ryan of SparkysWidgets fame has a great product in his minipH and miniEC. I recommend these break out boards. It is what I evolved my designs from. Thank you for your open source schematics and Arduino sketches. Ryan is extremely helpful and kind. Thank you.
The Kicad files for the Ladybug Beta V2 are located at this GitHub location.
Beta 2 Changes
Changes from Alpha 2 to Beta 2 include:
- changes to how the components as well as the pumps get power.
- removal of temperature readings.
- addition of test points.
The Power Design
The current design:
- includes a voltage regulator between the Arduino’s VIN and the 5V used by the pH and EC circuit.
- assumes two power sources. One for the pH and EC circuit (5V) and one for the pumps (12V).
A 12V Wall Wart will be plugged into the Arduino’s barrel jack. The 12V Wall Wart will power both Arduino’s 5V power supply as well as power the pumps. While there are three pumps, the pumps will not be used at the same time. For this reason the pumps will share a power source. A nice aspect of Adafruit’s design is the lining up of GND such that both the 12V and Arduino’s 5V voltage sources are relative to the same GND. My earlier attempts mistakenly did not align Arduino’s GND with the pump’s power source GND. Well, it did help me understand what is meant by aligning the GND….
My Arduino freaks out when the motors are running! Is the shield broken?
Motors take a lot of power, and can cause ‘brownouts’ that reset the Arduino. For that reason theshield is designed for seperate (split) supplies – one for the electronics and one for the motor.Doing this will prevent brownouts. Please read the user manual for information about appropriatepower supplies.
Adafruit’s design accommodates this by using a jumper and including a 2-terminal block for the V+/V- of a power supply. When the jumper is not on the shield, the pumps use an external power source. The “standard” power source – USB or a power source plugged into the barrel jack – is used for circuits on the shield that use the Arduino’s 5V power source. The GNDs of the two power sources is aligned.
I’ll also make a small modification to add a green LED on the line to detect if the shield is getting power.
I decided to not use temperature to adjust the probes. Even though measuring pH is all about figuring out the amount of H+ ions clinging to the probe’s glass membrane. When the temperature of the nutrient bath varies from the ideal of 25˚C, the amount of H+ ions changes. I experimented adjusting the temperature and decided not remove the thermistor circuit for measuring temperature. I made this decision:
- I’m growing plants in my house. The water temperature will not vary much. Perhaps the lighting will warm up the nutrient bath. However, I am using LEDs. LEDs do not dissipate much heat.
- The measurements need to be precise, but inaccurate and span a range of values.
- While there will be a .1 inaccuracy, the leafy plants I wish to grow with the help of the Ladybug shield are cool-season vegetables. As noted in this article, a healthy temperature range for a nutrient bath supporting cool-season vegetables is between 10˚C/50˚F and 21˚C/70˚F. I will use 10˚C for my rough calculations since it is farthest away from the ideal 25˚C. When the nutrient’s bath is at 25˚C, the amount of voltage between pH values is 59.16mV. When the nutrient bath’s temperature is at 10˚C, the voltage between pH values is 59.16+(10-25)*.198 = 56.19mV, close to 3mV. Since the resolution of the ADC set to 1mV LSB works well, an Arduino Sketch will be able to pick up this difference. I would address this difference if I required both precision and accuracy.
for the environments in which I will be using the Ladybug Shield, the temperature will not vary enough from 25˚C to include temperature adjustment. While the readings would be more precise, the range that is allowed for healthy growth is large enough that introducing the additional will not affect growing healthy plants.
I am finding it difficult to look at two signals on a scope if the contact for the probes is one of the chip’s pins. Now that I have a better idea on what to test, I am putting test points at the places I have found myself constantly measuring – the EC and pH inputs into the ADC, each phase of the EC signal processing.
Just a short update so that we’re on the same page on what the Ladybug shield is shaping up to be. If this version passes tests, I should be close to completing the hardware!
Thanks for reading this far. Please find many things to smile about.