SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By cosmicray
#174129
I need to obtain two voltages from a single input. One is to power the RAW pin on a Pro Micro 5V, and the other is to feed an ADC input.

The source of the voltage is a 12V (2x 6V in series) deep cycle battery. This will be using the battery power while the battery is under charge, so I expect it to vary from a low of 11.5V up to 15V. Both of those are outside conservative numbers, in reality I expect to see 11.8V - 14.8V.

From this I need to get a voltage to power the RAW pin (which is rated up to 12V). This was discussed at length in another thread last week, where it became obvious that anything over 12V was skating on thin ice. The other voltage is to feed one of the ADC pins, and allow me to read where the charge state is within the 11.5-15V range.

This is what I have come up with, and would like a bit of peer review to see if I am missing anything obvious. The value of R1 is still undetermined, but I suspect something between 500-1K will be a good choice.
Screen shot 2014-08-25 at 4.17.35 PM.png
You do not have the required permissions to view the files attached to this post.
By Mee_n_Mac
#174130
How much and how little current do you expect to draw (in total) from both "ports" ? When the Pro Micro is drawing it's max current, there needs to be a trickle of current left flowing through the components above. When the PM is drawing it's min current, that difference (max - min) plus the aforementioned trickle must not exceed the 178 mA max allowed by the 1N4733 spec and it must not raise the voltage across R1 such that the Vref voltage goes above the regulated 5V.

For that matter, since all the current for the PM is flowing through the "top" zener, it's limited to the above 178 mA. Is that enough ?

Is a voltage that varies from 1.3 V to 4.8 V what you really want for the ADC Vref ?!?

http://www.futurlec.com/Diodes/1N4733.shtml
By cosmicray
#174132
Since it is really hard to pin down actual current for the Pro Micro (and probably varies considerably), I'm working with a target number of 100 mA. The regulator on the Pro Micro should not be driven over 200 mA, except in narrow circumstances (low duty cycle, etc). The ATMega32U4 has an absolute maximum of 200 mA, and I doubt it runs up in that area in a normal use case.

Calling it Vref may have been a poor choice of terms. Probably PFn (where n is one of PF4 - PF7, aka A3 - A0) would be more correct. It is one of the ADC input lines which are brought out to a header pin. I wish to convert the voltage reading (in the range of 1.3V - 4.8V) to a digital value that I can work with. One other consideration about that, is that what I get on the chosen pin will be relative to the exact variation of D1+D2 (target being 10.2V, tolerance range is 9.69V - 10.71V). So I may have to measure the drop across both, and use that as a manually entered baseline. Depends on the level of accuracy I need.

The current draw on the PFn appears to be negligible (a few mA). Most of the current draw will be RAW feeding the ATMega32U4. USB will only be used to download data after the charge cycle has completed, so that will not be a steady draw.
By jremington
#174136
The ATmega ADC inputs have typically 100 Megohm input impedance, so their current draw is completely negligible unless you exceed the voltage limits.
By Mee_n_Mac
#174144
cosmicray wrote:Since it is really hard to pin down actual current for the Pro Micro (and probably varies considerably), I'm working with a target number of 100 mA. The regulator on the Pro Micro should not be driven over 200 mA, except in narrow circumstances (low duty cycle, etc). The ATMega32U4 has an absolute maximum of 200 mA, and I doubt it runs up in that area in a normal use case.
Seems to me it should work.
By dlotton
#174147
I would highly recommend getting LT Spice to simulate your circuit. It's free. Get it here...

Here's what LT Spice looks like...
My_zener_ckt.png


I built a model of your circuit. Just install LT Spice and open the attached model of your circuit. You can change components and parameters, and probe voltages and currents to see what's happening in the circuit. You should be able to just open this model and hit the 'RUN' button. Then just click on various nodes on the circuit to see the voltage. Click on a component to see the current through that component.

As for the power consumed by the processor, I haven't used the Atmel processors a lot (I've used PIC and MSP430 quite a bit), but I would be surprised if it draws more than a few tens of mA. Don't know what else you've got attached to it.
You do not have the required permissions to view the files attached to this post.
By dlotton
#174149
...also, as I noted in your other thread, linear regulators (and zeners) for your application (between the zener and the regulator on the Arduino, dropping ~12V to ~5V) are grossly inefficient. With these types of regulators you are converting a lot of electrical energy into heat energy. Maybe that's okay for your application, but usually for battery powered applications, you wnat to be as efficient as possible. A switching regulator will be much, much more efficient.

Something like this...
http://www.adafruit.com/products/1065
By cosmicray
#174151
dlotton wrote: A switching regulator will be much, much more efficient.
Available current is not an issue for this project. The batteries are rated at 200 AHr (and up), while the charger is pushing out a solid 25-30 Amps. My primary concern is to keep within the current limit of D1. If I redesign this to run on standalone batteries, I will definitely look at the switching regulator.
By dlotton
#174152
cosmicray wrote:Available current is not an issue for this project...
Ahh, the luxury of an abundance of power. I do quite a bit of embedded battery powered stuff, so efficiency is always in the forefront of my mind. I'm usually counting microamps and microwatts and get squidgy when people start talking milliamps and milliwatts. :shock:
By dschlic1
#174156
I would look at using some kind of series pass regulator (IC) to drop the battery voltage down to 6 or seven volts for the ProMicro. As for the ADV vref, you want the most accurate, stable voltage you can get. I would use a reference voltage source for that. All told it would increase the cost slightly (maybe $10) but result in a much better power supply.
By carpenterdev
#174166
dlotton wrote:...also, as I noted in your other thread, linear regulators (and zeners) for your application (between the zener and the regulator on the Arduino, dropping ~12V to ~5V) are grossly inefficient. With these types of regulators you are converting a lot of electrical energy into heat energy. Maybe that's okay for your application, but usually for battery powered applications, you wnat to be as efficient as possible. A switching regulator will be much, much more efficient.

Something like this...
http://www.adafruit.com/products/1065
The Traco regulators seems to fit my needs. I need to step 6V (from 4 AA batteries) down to two different voltages: 3.3V to power an Arduino Micro + BLE board, and 5V to power two different sensor circuits (Wheatstone Bridges plus OP-Amps) on a sensor shield. Since I need two different voltages will I need to use two of the Tracos (e.g. TSR1-2433 for 3.3V, and TSR1-2450 for 5V)? Or can one Traco plus resistors supply both voltages?

BTW: I found the Traco's much cheaper here: http://www.powergatellc.com/traco-power ... erter.html

Thanks,

Bob
By dlotton
#174167
carpenterdev wrote: The Traco regulators seems to fit my needs. I need to step 6V (from 4 AA batteries) down to two different voltages: 3.3V to power an Arduino Micro + BLE board, and 5V to power two different sensor circuits (Wheatstone Bridges plus OP-Amps) on a sensor shield. Since I need two different voltages will I need to use two of the Tracos (e.g. TSR1-2433 for 3.3V, and TSR1-2450 for 5V)? Or can one Traco plus resistors supply both voltages?

BTW: I found the Traco's much cheaper here: http://www.powergatellc.com/traco-power ... erter.html

Thanks,

Bob
A few things to think about:

Four AA cells will deliver about 6V new and probably around 4V at end-of-life (a lot of variables invovled). I haven't done a deep dive in the traco spec sheet, but on the link you provided the the input voltage range for the 5V converter is 6.5-36V. For the 3.3V converter the input range is 4.75-36V.

Running on four cells, in order to get the most out of your batteries, you probably need a buck-boost regulator of some sort. You need something that can make 5V when your battery falls below ~5.5V.

Considering that you don't have to drop a large input voltage (e.g.12V), linear regulators may be better (and cheaper) in your application. Depending on your loads an LDO may only require 200-300mV of overhead, allowing you to run your battery down to 5.2-5.3V and still get a clean 5V supply. You can check the specs on your sensor shield. You may be able to run it down to a lower voltage (say 4.5V) and still be okay, squeezing more juice out of the battery.

Just some food for thought.
By carpenterdev
#174172
dlotton wrote:
carpenterdev wrote: The Traco regulators seems to fit my needs. I need to step 6V (from 4 AA batteries) down to two different voltages: 3.3V to power an Arduino Micro + BLE board, and 5V to power two different sensor circuits (Wheatstone Bridges plus OP-Amps) on a sensor shield. Since I need two different voltages will I need to use two of the Tracos (e.g. TSR1-2433 for 3.3V, and TSR1-2450 for 5V)? Or can one Traco plus resistors supply both voltages?

BTW: I found the Traco's much cheaper here: http://www.powergatellc.com/traco-power ... erter.html

Thanks,

Bob
A few things to think about:

Four AA cells will deliver about 6V new and probably around 4V at end-of-life (a lot of variables invovled). I haven't done a deep dive in the traco spec sheet, but on the link you provided the the input voltage range for the 5V converter is 6.5-36V. For the 3.3V converter the input range is 4.75-36V.

Running on four cells, in order to get the most out of your batteries, you probably need a buck-boost regulator of some sort. You need something that can make 5V when your battery falls below ~5.5V.

Considering that you don't have to drop a large input voltage (e.g.12V), linear regulators may be better (and cheaper) in your application. Depending on your loads an LDO may only require 200-300mV of overhead, allowing you to run your battery down to 5.2-5.3V and still get a clean 5V supply. You can check the specs on your sensor shield. You may be able to run it down to a lower voltage (say 4.5V) and still be okay, squeezing more juice out of the battery.

Just some food for thought.
Thanks for pointing me towards the LDOs. I have used TI's LDO selector and found two chips:
1) Arduino 3.3V Power Chip - TPS7233QD http://www.ti.com/lit/ds/symlink/tps7201.pdf
2) Sensor Board 4.5V Power Chip - TPS79945 http://www.ti.com/lit/ds/symlink/tps79945.pdf

Please let me know if you see any problem with these choices.

Thanks,

Bob
By cosmicray
#174174
dschlic1 wrote:I would look at using some kind of series pass regulator (IC) to drop the battery voltage down to 6 or seven volts for the ProMicro. As for the ADV vref, you want the most accurate, stable voltage you can get. I would use a reference voltage source for that. All told it would increase the cost slightly (maybe $10) but result in a much better power supply.
I guess I'm still a bit unclear about why people think the linear regulator (already provided on the Pro Micro board) is not up to the job (the job being converting RAW to 5V Vcc). The device is a Micrel MIC5219. The D1+D2+R1 network is supposed to bring down the supplied voltage to something more in line with what the MIC5219 wants to work with.

The voltage being supplied to the ADC is another matter, and probably has largely to do with the actual accuracy of the D1/D2 combination. Those diodes are marked suffix-A, which is +/- 5%, but I suspect that is the absolute limits, not something that is nominal. I have a small number of them here, so I should set up a test board and see how close they are to target.
By dlotton
#174177
cosmicray wrote:I guess I'm still a bit unclear about why people think the linear regulator (already provided on the Pro Micro board) is not up to the job (the job being converting RAW to 5V Vcc). The device is a Micrel MIC5219. The D1+D2+R1 network is supposed to bring down the supplied voltage to something more in line with what the MIC5219 wants to work with.
The main concerns are 1) the supply voltage is very near the max input voltage limit recommended for the circuit (16V) 2) how much power will have to be dissipated by the MIC5219. At Vin=15V two thirds of the total circuit power is being dissipated in the MIC5219.

The above Zener scheme is workable. It just needs to be tuned to make sure the zeners are operating properly, and the zeners need to have an appropriate power rating.

cosmicray wrote:The voltage being supplied to the ADC is another matter, and probably has largely to do with the actual accuracy of the D1/D2 combination. Those diodes are marked suffix-A, which is +/- 5%, but I suspect that is the absolute limits, not something that is nominal. I have a small number of them here, so I should set up a test board and see how close they are to target.
A simpler solution with a potential for better accuracy might just be a resistor divider and a diode clamp to Vcc to protect the input pin. The diode should have relatively low leakage and a small cap on Vadc will help reduce sampling noise. This circuit is a scaled version of Vbatt, whereas the zener cicuit would just be an offeset from Vbatt.
sample_ckt.png
You do not have the required permissions to view the files attached to this post.