1
\$\begingroup\$

FINAL UPDATE

I think the power supply is squared away accept for some caps and resistors. Thank you for sticking with me. One question:

  • There are two thermistors (one for each battery pack) that are used to determine charge state via battery temperature. They can be found on the Charge Controller and Battery Packs schematic at location C5-C6. Problem is the datasheet example only uses a single battery stack and I have two. The way I wired it I'm sure will not work. What can be done to adapt this part of the sub-circuit to work with two thermistors?

UPDATED AGAIN

If only I had delayed that last update 10 min. Kuba solved my missing piece of the puzzle. I'm in the process of adding a 3.3V Micropower Regulator in place of the two linear regulators. I will update the schematics tomorrow.

UPDATED

After a few minutes of soul searching, a few hours of research and a few nudges from Justme and BeB00. I have changed the batteries to Low Self Discharge NiMH in order to keep the benefits of NiMH with greatly reduced self discharge. I have also dumped the linear regulators, but that leaves me with a hole in the circuit. What is the best way to get from 5V to 3.3V?

Introduction

I am a self-taught novice electrical engineer and a, wear all the hats, kind of entrepreneur. The device in question is a minimum viable product that is heading towards a Kickstarter campaign.

As a novice I have a limited understanding of EE and therefore my device. The design of the device has been through several revisions, right here in this forum. This is the first one that I think might work.

Theory of Operation

The device is a soil moisture sensing and analysis device that uses capacitance sensing technology to help manage soil moisture in your garden. One probe set at the bottom of the device and a second probe set just under the soil line, allow the device to measure soil moisture across the full vertical profile of the soil. Analysis of the data determines if the soil is over-saturated, optimally-saturated, wilting, or dry.

Green, yellow and red, instantly recognized symbols for good, bad and in-between serve as the interface of the device. These colors are used to indicate four discrete levels of soil moisture, and a low battery warning. The device is powered by six 1.2 V, 2300 mAh Low Self Discharge NiMH batteries for a maximum voltage of 8.4 V, which will power the device for the entire growing season.

System Overview

This block diagram presents the devices electric circuit broken out into six sub-circuits. Schematics for the sub-circuits follow the system specifications.

enter image description here

System Characteristics

Click on a device name below to get its datasheet. The purpose of this table is to confirm that all of the voltages, currents and impedances are properly matched and that there is enough current to go around. I scraped the datasheets pretty good but with my lack of experience, I'm sure I missed things.

# Description Input Voltage Output Voltage Input Current Output Current
Min|Nom|Max Unit Min|Nom|Max Unit Min|Nom|Max Unit Min|Nom|Max Unit
1 Charge Controller 4.5 | - | 16.5 V - | - | - - - | 1.3 | 1.6 mA - | - | - -
2 2200mAh Battery - | - | - - 1 | 1.2 | 1.4 V - | 210 | - mA - | 2100 | - mAh
3 Power Receiver 4.0 | - | 10.0 V - | - | - - - | - | 1 mA - | - | 1 A
4 Receiver Coil - | - | - - - | 5 | - V - | - | - - 100 | - | 400 mA
5 5V Regulator 5.6 | 10.0 | 40 V 4.8 | 5 | 5.2 V - | - | - - - | 50 | - mA
6 Microcontroller 1.8 | - | 5.5 V - | - | - - -40 | - | 40 mA - | 50 | - mA
7 Tri-Color LED 5.4 | - | 6.6 V - | - | - - - | 20 | - mA - | - | - -
8 3.3V Regulator 2.7 | - | 7.0 V - | 3.3 | - V - | - | - - - | 10 | - mA
9 C/D Converter 3.0 | 3.3 | 3.6 V - | - | - - - | 750 | 950 µA - | - | - -

Wireless Power Receiver and Coil

The Texas Instruments bq51221, Dual Mode 5-W (WPC and PMA) Single Chip Wireless Power Receiver is a fully contained wireless power receiver capable of operating in both the WPC and PMA protocols. The bq51221 device provides a single device power conversion (rectification and regulation) as well as the digital control and communication for both standards. It also has autonomous detection of protocol and requires no additional active devices. The bq51221 device enables a complete wireless power transfer system for a wireless power supply solution.

enter image description here

Charge Controller and Battery Packs

The DS2715 from Maxim Integrated has been optimized for safe and reliable charging of 1 to 10 NiMH cells in series. It pre-conditions severely depleted cells before entering full charge mode. It terminates full charge using the dT/dt technique, which requires an external sensing thermistor. Over-temperature, under-temperature, and over-voltage detection prevents charging under unsafe conditions.

enter image description here

Power Distribution

enter image description here

Microcontroller

The Atmega4809 Microchip is an 8-bit AVR processor developed by Atmel that can run up to 20MHz. It comes with 6KB of SRAM, 48KB of flash, and 256 bytes of EEPROM. The chip features the latest technologies like flexible and efficient-power architecture, including Event System and Sleepwalking, precious analog features, and advanced peripherals.

enter image description here

Tri-Color LED

The four levels of moisture (over saturated, optimally saturated, wilting and dry) plus a low battery warning are communicated to the user through a single tri-color (green, yellow and red) LED. PWM, managed by the microprocessor, is used to control the LED’s color and the speed of fades.

enter image description here

Capacitance to Digital Converter and Sensors

Capacitive sensing is a technology, based on capacitive coupling, that can detect and measure anything that is conductive or has a dielectric constant different from air. Dielectric sensors measure the charge-storing capacity of the soil. This charge-storage approach is much more effective than a resistance approach.

The Texas Instruments FDC1004Q is a high-resolution, AEC-Q100 qualified, 4-channel capacitance-to-digital converter for implementing capacitive sensing solutions. Each channel has a full scale range of ±15 pF and can handle a sensor offset capacitance of up to 100 pF

The FDC1004’s basic operation of capacitive sensing implements a switched capacitor circuit to transfer charge from the sensor electrode to the sigma-delta analog to digital converter (ADC). A 25-kHz step waveform is driven on the sensor line for a particular duration of time to charge up the electrode. After a certain amount of time, the charge on the sensor is transferred to a sample-hold circuit. The sigma-delta ADC converts the analog voltage into a digital signal. Once the ADC completes its conversion, the result is digitally filtered and corrected depending on gain and offset calibrations.

An active shield coupling with the sensor helps mitigate interference and parasitic capacitances seen along the sensor signal path from the electrode to the input of the FDC1004. It also helps to focus the target direction in a specific area. Larger sensor size area increases sensitivity and dynamic range of the measurements.

enter image description here

\$\endgroup\$
16
  • 4
    \$\begingroup\$ I'd be inclined to say no. It looks like professionally drawn schematics, but the design and circuits in it are just weird. If you are worried about efficiency and long lasting batteries, why there are linear regulators in the circuit at all? If you have a 5V regulator and feed in 5V, surely 5V won't come out. Also if the only component that uses 5V is the MCU, why bother using it at 5V or having 5V at all? It won't even communicate at 5V with 3.3V chips properly. Too many questions in one. How do you mark the best answer if each gives you only one piece and all are needed to solve the puzzle? \$\endgroup\$
    – Justme
    May 4, 2023 at 22:11
  • 2
    \$\begingroup\$ Your device is battery powered, so power efficiency and quiescent current are vital - currently you have a 5V LDO, leading to a 3.3V LDO. There are two problems with this: first is that as justme points out, the input to it is 5V. Not only will it not help, it actively won't work - you need to put in more than 5V to get 5V out. Second is that it's hopelessly inefficient. Your 3.3V LDO has a quiescent current of 1.8uA (more on that in a moment) - your 5V LDO has a quiescent current of several mA - this is >1000x more. This will consume 99% of the energy in your design \$\endgroup\$
    – BeB00
    May 4, 2023 at 23:17
  • 3
    \$\begingroup\$ Another thing to consider is - why do you need 5V? The only thing in your system that you use it for is your MCU. Your MCU (along with almost all MCUs these days) can operate at 3.3V. If you use that, it will make your life much easier. \$\endgroup\$
    – BeB00
    May 4, 2023 at 23:22
  • 1
    \$\begingroup\$ Finally, consider your cell chemistry - you want this thing to run for an entire growing season. The length of a growing season varies, but say it's 6 months. NimH batteries apparently self discharge up to 20% in the first 24 hours after charging, and then up to 15% every month (nonwithstanding the fact that these cells probably will not be at room temperature). At that rate, after 6 months, all your energy has been used up by self discharge (i.e no matter what you do, they will be dead). If your growing season is 3 months, 65% of the energy has been used by self discharge \$\endgroup\$
    – BeB00
    May 4, 2023 at 23:25
  • 2
    \$\begingroup\$ The whole wireless charging rigmarole is so gratuitous IMHO. The thing is supposed to last a growing season. No recharging can happen during that time. And after the season, you may as well toss the batteries and get new ones. Of course you can use rechargeables... but they'll be quite oversized compared to primary cells, and the costs blow up rather quickly. As a novice, go for as uncomplicated an approach as possible. Evaluate it. Get devices out into the field. Get user feedback after a season. Then see how close you got to what the users need/want. \$\endgroup\$ May 7, 2023 at 6:06

2 Answers 2

3
\$\begingroup\$

From comments:

Power Tree

Your device is battery powered, so power efficiency and quiescent current are vital - currently you have a 5V LDO, leading to a 3.3V LDO. There are two problems with this: first is that as justme points out, the input to it is 5V. Not only will it not help, it actively won't work - you need to put in more than 5V to get 5V out. Second is that it's hopelessly inefficient. Your 3.3V LDO has a quiescent current of 1.8uA (more on that in a moment) - your 5V LDO has a quiescent current of several mA - this is >1000x more. This will consume 99% of the energy in your design.

Another thing to consider is - why do you need 5V? The only thing in your system that you use it for is your MCU. Your MCU (along with almost all MCUs these days) can operate at 3.3V. If you use that, it will make your life much easier.

Battery Chemistry

you want this thing to run for an entire growing season. The length of a growing season varies, but say it's 6 months. NimH batteries apparently self discharge up to 20% in the first 24 hours after charging, and then up to 15% every month (nonwithstanding the fact that these cells probably will not be at room temperature). At that rate, after 6 months, all your energy has been used up by self discharge (i.e no matter what you do, they will be dead). If your growing season is 3 months, 65% of the energy has been used by self discharge. In that case, if the rest of your system lasts that long, it means your batteries are oversized by (1/0.45=)220%. If you had a less bad chemistry (like lithium ion), you could use batteries that were significantly smaller, lighter, and more efficient

\$\endgroup\$
2
\$\begingroup\$

I don't think there's much usability benefit from rechargeable batteries, since the use/disuse cycles are so long. Stick new alkaline batteries at the beginning of the season, and throw them out afterwards. The circuit itself probably should be potted or conformally coated for moisture protection, so if the batteries leak (they shouldn't), it's no big deal. Remember that wires and cables wick liquids!. To connect the battery holder to the potted/coated part of the circuit, bare solid wires, roughened for good epoxy/coating adhesion, should be used so that no wicking can occur.

With cells sized to last a growing season - and there's no reason AAA cells won't do the job - there isn't a need for anything fancy in regards to voltage regulation. The microcontroller will run from 3x1.5V cells directly without regulation. The C/D converter will be powered by a micropower 3.3V regulator that the microcontroller shuts down when not making a measurement.

A pushbutton can used to turn the microcontroller on and take a measurement. But that's not quite necessary either. The circuit can be "turned on" all the time. The MCU will sleep in a micropower mode 99.9% of the time, and so will the C/D converter. The LED can blink periodically. Or a little reed switch or even a magnetometer chip inside the case can be used to wake up the MCU and have it display the most recent measurement on the LED. Stick a magnet to a wooden stick and walk around the garden, touching the devices.

The MCU can be taking magnetometer readings say 1-10x per second, and it can probably wake up the magnetometer, go to sleep, then wake up again when the magnetometer has finished taking the reading. When the magnetometer is above a threshold, the LED is on. When the magnetometer goes below threshold, the LED stays on for an additional minute let's say.

LED control can be from MCU GPIO if the GPIO retains state while the MCU is in sleep mode. If not, then an external CMOS latch can be used to drive the LED while the CPU sleeps.

If this design was done well, then the battery use won't be a problem with properly sized batteries: they will self-discharge and leak before they are used up probably. The circuit can run on truly minuscule currents most of the time - minuscule enough that the contamination on the PCB and condensation from proximity to soil will potentially leak more current than the sleeping circuit. So the PCB will need to be potted or at least conformally coated, and the conformal coating will need to be visually inspected for coverage under UV light (!).

The latches to drive the LED can be truly low-tech:

schematic

simulate this circuit – Schematic created using CircuitLab

NOT1 and NOT2 are any low-voltage CMOS family inverters. When GPIO is not driving the latch, it retains its state due to feedback via R2.


If you asked me to design the device you propose, it'd probably be a cheap plastic case with room for 3xAA batteries, a single hole for an LED, and the potted or conformal-coated PCB. On the PCB would be one voltage regulator for the C/D converter, one MCU - perhaps with an external 32kHz crystal, the C/D converter, LED with latches, magnetometer or a sealed pushbutton, and a few discrete parts.

The most important component choice would be the MCU - since you really want a part that draws very little current when asleep with an alarm set so it wakes up periodically to take measurements. Instead of a magnetometer a waterproof pushbutton could be used to wake up the MCU to display the LED status.


You will have to evaluate the performance of the C/D converter with various soils and moisture levels. Don't necessarily expect the calibration of the system to be a trivial matter. You may end up having to measure temperature and use that to correct the readings - just as an example.

\$\endgroup\$
9
  • \$\begingroup\$ I would suggest that the vast majority of MCUs made in the last 15 years (including this one) maintain their pin states during sleep, so you dont need the latch. \$\endgroup\$
    – BeB00
    May 5, 2023 at 1:18
  • \$\begingroup\$ @Kuba thanks for your input. I am looking at Analog Devices LT1020ISW#PBF Micropower Regulator as I type. That fills a BIG hole and now I can update again. \$\endgroup\$
    – Tim Cerka
    May 6, 2023 at 0:22
  • \$\begingroup\$ @TimCerka Analog Devices tends to make more specialized, expensive ICs (they also make normal stuff). That part definitely fits in that range - it's crazy expensive, has low supply, and is completely overkill for your needs (>$10 in quantity ??). NCP730ASNADJT1G is better in basically every way, but it does bring up the question - why do you need a high input voltage LDO? Is this to replace your existing LDOs? \$\endgroup\$
    – BeB00
    May 6, 2023 at 0:53
  • 1
    \$\begingroup\$ @TimCerka "micropower regulator" here is a meaningless marketing term. This is an LDO, and a pretty mediocre one. If you're just looking to turn your 5V into 3.3V, you can use any one of a thousand parts. Anything on this list (digikey.com/short/d7tmd7hd) should work. MIC5219-3.3YM5-TR should work fine for you. The key parameters are max current, dropout voltage, max input voltage, and quiescent current, so make sure those all fit your application (as well as the output voltage, which is not adjustable, but there are many other parts you can choose where the output is adjustable) \$\endgroup\$
    – BeB00
    May 6, 2023 at 2:08
  • 2
    \$\begingroup\$ @TimCerka I would strongly suggest making a power model - that way you don't have to guess about what you need. "Ultra-Low Quiescent Current" is not a well defined term. It could mean 100uA, 10uA, 1uA, 100nA, 10nA etc. Don't rely on marketing terms when doing engineering. If you have a power model, you will be able to confidently state what you need in terms of efficiency, self discharge, voltage ratings, etc. \$\endgroup\$
    – BeB00
    May 6, 2023 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.