Need help with under/overvoltage circuit on device using super caps and hand crank generator

Thread Starter

Udo_g

Joined Aug 5, 2018
6
Oke lots of reading here but never asked something. Read tons of articles and looked at video's but cannot figure out what is best here.
So this is the case:

I have a teensy board as load which runs on 3.3V
I have a super caps board which can hold a total of 16V when fully charged (it has an overprotection board so it cannot be overcharged)
I have a hand cranked generator which provides the loading of the super caps (AC-DC rectifier is not a problem and works great).

So the caps are getting charged when turning the generator by hand. All good.

Now the circuit has to switch on at say 6V (so i can get the teensy up and running and monitor the caps load digitally and show so leds how full it is).
The circuit has to switch off (cut off without hysteresis) at say 4V. I wil let the LED's show flickering the last led on for example 4.5V showing it is going to die out soon. So people have to hand crank the circuit back on from the start or recharge quickly so the cut off will never kick in.

It will be great if i can set the 6V and 4V values with potentionmeters so i can figure out the best values for my project.
Also it will be great if the circuits components doesnt use a lot of current and does not drain the super caps too much.

There area lot of circuits i looked at but they all have a fixed voltage but i only have a variable voltage (the super caps).

Can someone point me in the right direction.

Thank you in advance for the response ;-)

UGee
 

LowQCab

Joined Nov 6, 2012
3,454
Rewire the Super-Caps for ~5-Volts, or slightly more,
so that You won't be wasting so much Power stepping it down from ~16-Volts.
This should give You at least ~20 to ~30% more run time.

The Hand-Crank-Generator should still work fine,
but it will need a new Voltage-Regulator to limit the maximum-Charge-Voltage.

Can your Capacitor-Bank be re-wired ?

I don't pretend to be able to write Code,
but you should be able to set-up your Teensy to do an "Orderly-Shut-Down"
when the Voltage gets too low.
If this is not feasible, a precision Low-Voltage-Cut-Off-Circuit is easy to make.
.
.
.
 

Reloadron

Joined Jan 15, 2015
7,220
The circuit has to switch off (cut off without hysteresis) at say 4V. I wil let the LED's show flickering the last led on for example 4.5V showing it is going to die out soon. So people have to hand crank the circuit back on from the start or recharge quickly so the cut off will never kick in.
OK but the only possible problem I see is if the uC is the only load no problem but any additional load might be a problem. Less any hysteresis at 4.5 volts the led flashes which is fine. However at 4.0 volts if the load is removed the voltage might increase and if that turns the load back on .... See where this might be going? As long as the cap always gets recharged it's not a problem. Also if the load is only the uC it's not really a problem but if there is additional load it could be a problem.

You can set your analog thresholds less any pots. Using an analog input the normal resolution should be 10 bit so you get 2^10 which becomes 0 to 1023 bits.
Analog Inputs14 pins can be used an analog inputs, for reading sensors or other analog signals. Basic analog input is done with the analogRead function. The default resolution is 10 bits (input range 0 to 1023), but can be adjusted with analogReadResolution. The hardware allows up to 12 bits of resolution, but in practice only up to 10 bits are normally usable due to noise. More advanced use is possible with the ADC library.Analog RangeThe analog input range is fixed at 0 to 3.3V. On Teensy 4.0, the analogReference() function has no effect. The analog pins are not 5V tolerant. Do not drive any analog pin higher than 3.3 volts.
So you need to divide down your analog input so your max voltage is 3.3 volts. Exceed 3.3 volts on any analog input pin and bad things will happen. You want to scale your max input voltage to that 3.3 volts. For example a 5:1 divider circuit would be 3.3 X 5= 16.5 volts or 1023 bits. Your code would use an IF statement for example IF analog read is less than do something.

Rather than use a uC as LowQCab suggest a simple low voltage cutout circuit can be built using a few parts.

Ron
 

Thread Starter

Udo_g

Joined Aug 5, 2018
6
OK but the only possible problem I see is if the uC is the only load no problem but any additional load might be a problem. Less any hysteresis at 4.5 volts the led flashes which is fine. However at 4.0 volts if the load is removed the voltage might increase and if that turns the load back on .... See where this might be going? As long as the cap always gets recharged it's not a problem. Also if the load is only the uC it's not really a problem but if there is additional load it could be a problem.

You can set your analog thresholds less any pots. Using an analog input the normal resolution should be 10 bit so you get 2^10 which becomes 0 to 1023 bits.


So you need to divide down your analog input so your max voltage is 3.3 volts. Exceed 3.3 volts on any analog input pin and bad things will happen. You want to scale your max input voltage to that 3.3 volts. For example a 5:1 divider circuit would be 3.3 X 5= 16.5 volts or 1023 bits. Your code would use an IF statement for example IF analog read is less than do something.

Rather than use a uC as LowQCab suggest a simple low voltage cutout circuit can be built using a few parts.

Ron
Thank you for your reply.

The load is only the teensy board. From there the rest will run (led strip or audio board). It will drain more power so i need to shut down all operations before the Uc is empty and give opportunity to recharge with the hand crank.
Ok. So i should make the difference bigger between turn on and cut off. That is why i want to set these points with a potentiometer. So i can try and correct. Which parts should i use for the low voltage cutout you think ? I saw several options. Fet, IC, dividers, etc.... i don't know which i should use that works the best without hysteresis and drain not to much power. Do you have a simple schematic to use ?
 

Thread Starter

Udo_g

Joined Aug 5, 2018
6
Rewire the Super-Caps for ~5-Volts, or slightly more,
so that You won't be wasting so much Power stepping it down from ~16-Volts.
This should give You at least ~20 to ~30% more run time.

The Hand-Crank-Generator should still work fine,
but it will need a new Voltage-Regulator to limit the maximum-Charge-Voltage.

Can your Capacitor-Bank be re-wired ?

I don't pretend to be able to write Code,
but you should be able to set-up your Teensy to do an "Orderly-Shut-Down"
when the Voltage gets too low.
If this is not feasible, a precision Low-Voltage-Cut-Off-Circuit is easy to make.
.
.
.
Thank you for your reply.

I understand. Yes i can use less Super Caps for instance that is no problem. The code to read out the Super caps is not a problem. I already tried this and is working fine. But when the super caps get to low it will cause the teensy board to crash because of to less energy. So i need a proper circuit to shut off the circuit under a certain voltage. I read about a fet, ic, voltage dividers to make the cut off circuit but which should i use when it comes to not draining to much of energy from the super caps. Can you give me an example of a cutoff circuit i could use that gives me the option to set (with potentiometer) the cutoff voltage and power on voltage.
 

Sensacell

Joined Jun 19, 2012
3,257
Rewire the Super-Caps for ~5-Volts, or slightly more,
so that You won't be wasting so much Power stepping it down from ~16-Volts.
This should give You at least ~20 to ~30% more run time.

.
.
.
Unless I am missing something... the equation for capacitor energy storage is 1/2 CV2 - a squared term on the voltage.
Use the capacitor stack at the highest voltage and convert it down to 3.3 V with an efficient switching regulator.

Then you can get more of the energy out when the voltage drops.
 

AlbertHall

Joined Jun 4, 2014
12,269
Unless I am missing something... the equation for capacitor energy storage is 1/2 CV2 - a squared term on the voltage.
Use the capacitor stack at the highest voltage and convert it down to 3.3 V with an efficient switching regulator.

Then you can get more of the energy out when the voltage drops.
But the energy stored by three capacitors, each charged to 5V, in series is the same as those three capacitors in parallel.
 

LowQCab

Joined Nov 6, 2012
3,454
What you're missing is 3-times the Capacitance.

Even extremely efficient Switching Regulators have a "Sweet-Spot",
and might get up to ~93% efficient at a particular Input to Output Voltage Ratio,
usually around ~75% of the Input Voltage,
but when You start having wide disparities in Input to Output Voltages,
the efficiency drops fast, probably down to as low as ~70%.

By re-wiring the Batteries, from ~16-Volts, to 5.33-Volts, You also get 3X the Capacitance,
and, since the processor will probably work just fine with ~3-Volts,
and that's "only" 2.33-Volts of overhead,
it still comes close to putting most of the Capacitors operation
in the middle of the fat part of the Curve.

It would be an interesting experiment to see which arrangement works best.

I vote for not exceeding the max-Input-Voltage of the existing on-board Voltage-Regulator,
and not adding a second Voltage-Regulator into the mix,
but at the same time, tripling the Capacitance.

A second Voltage-Regulator is going to waste at least 15% overall, of the available Power.
.
.
.
 

Sensacell

Joined Jun 19, 2012
3,257
I see that the total energy storage is identical - series or parallel connected.

Thought experiment:

If I have 3 X 5.5V rated supercaps charged to ~5 Volts connected in series, and my regulator drops out at 4 Volts.
I can run until each capacitor reaches a terminal voltage of 1.333 Volts. (4/3)

If they are connected in parallel, I can only run to 4 volts?

Seems like the series configuration wins handily in terms of energy extracted?

Granted, the switching regulator will have a strange efficiency curve, so it's hard to calculate the total system efficiency, but my hunch is it would be better than the parallel scheme.

A very interesting thing to ponder!
Supercaps suck for this application because a lot of the energy ends up unusable - the lower voltage threshold problem.

The problem with series-connected caps is needing to balance the charge to prevent over-voltage - more complex circuitry.
 

Thread Starter

Udo_g

Joined Aug 5, 2018
6
You don’t need an external circuit to turn it on and off, the micro can do it all.

Bob
You don’t need an external circuit to turn it on and off, the micro can do it all.

Bob
Yes but when i tried with my lab power supply i see that when i turn the voltage down the micro controller it seems to get stuck (toggeling/hangs). If i turn up the voltage then it still keeps stuck and won't reboot (this is the same with other microcontrollers i tried. The only solution is then to physically disconnect power and reconnect and it boots up again. So i think i need to make a cut off below a certain voltage and turn on up to a certain voltage to get it to boot up when the capacitors are reloaded again.

So the question is which (simple) circuit should i use. And i think i should configure a bit higher value for boot-up to make sure there is enough juice if someone just comes to the minimum required voltage to work and will drop down immediatly that is no use. So that's why i thought about 6V to start and 4V to cut off.
 

BobTPH

Joined Jun 5, 2013
7,557
You can’t just rely on the micro turning on and off cleanly itself, you have to monitor the voltage with your A/D.

PIC micros have a feature call brownout which can also start up and shut down cleanly by hardware monitoring of Vdd.

Bob
 
Last edited:

AlbertHall

Joined Jun 4, 2014
12,269
Yes but when i tried with my lab power supply i see that when i turn the voltage down the micro controller it seems to get stuck (toggeling/hangs). If i turn up the voltage then it still keeps stuck and won't reboot (this is the same with other microcontrollers i tried. The only solution is then to physically disconnect power and reconnect and it boots up again. So i think i need to make a cut off below a certain voltage and turn on up to a certain voltage to get it to boot up when the capacitors are reloaded again.
You could monitor the voltage and when below some threshold reset the micro. To do this you could use the watchdog timer.
https://forum.pjrc.com/threads/30567-Hardware-reset-on-Teensy-LC
 

LowQCab

Joined Nov 6, 2012
3,454
This Circuit will do what You want,
just leave out the 33K Resistor, and the Diode,
then tie the Battery and Ignition Switch Inputs together.

Don't use the Output protection Resistor.

Change the Gate Resistor to 1M.

Change the Trim-Pot to 1M.

A fuse on the Output of those Super-Caps is a good idea.

The TL430 will work by its self for Loads less than ~75ma continuous, as a Low-Side-Switch.
The small FET will handle up to 500ma Loads, and has a Logic-Level-Gate, so 4-Volts is OK.


.
.
.
Engine Run Detector 1 FLAT .png
 

Thread Starter

Udo_g

Joined Aug 5, 2018
6
This Circuit will do what You want,
just leave out the 33K Resistor, and the Diode,
then tie the Battery and Ignition Switch Inputs together.

Don't use the Output protection Resistor.

Change the Gate Resistor to 1M.

Change the Trim-Pot to 1M.

A fuse on the Output of those Super-Caps is a good idea.

The TL430 will work by its self for Loads less than ~75ma continuous, as a Low-Side-Switch.
The small FET will handle up to 500ma Loads, and has a Logic-Level-Gate, so 4-Volts is OK.


.
.
.
View attachment 245153
I will try this circuit and let you know how it works. First have to get all the parts :)
Thank you very much for this circuit.
 

Reloadron

Joined Jan 15, 2015
7,220
You can also as mentioned let the Teensy (uC) monitor the voltage and turn On/Off whatever you want to do. I mentioned earlier the Teensy uses a 10 bit analog to digital converter so 0 to 3.3 volts becomes 0 to 1023 bits (2^10). Using a simple 5:1 (five to one) simple divider circuit this becomes 0 to 16.5 volts = 0 to 1023 bits. You just write a brief code snippet to monitor the Teensy analog input.

You can test the analog input with this very simple program.

Code:
void setup()
{              
  Serial.begin(38400);
}

int val;

void loop()                    
{
  val = analogRead(0);
  Serial.print("analog 0 is: ");
  Serial.println(val);
  delay(250);
}
Apply your min voltage and note the bit count. Then add to the code using an IF statement. If val == < bit count then shut down or do whatever you want. Make a DIO pin go low or whatever you choose.

There is also a matter of using a few discrete components as in the circuit LowQCab posted which is a simple handy little circuit.

Ron
 

Thread Starter

Udo_g

Joined Aug 5, 2018
6
This Circuit will do what You want,
just leave out the 33K Resistor, and the Diode,
then tie the Battery and Ignition Switch Inputs together.

Don't use the Output protection Resistor.

Change the Gate Resistor to 1M.

Change the Trim-Pot to 1M.

A fuse on the Output of those Super-Caps is a good idea.

The TL430 will work by its self for Loads less than ~75ma continuous, as a Low-Side-Switch.
The small FET will handle up to 500ma Loads, and has a Logic-Level-Gate, so 4-Volts is OK.


.
.
.
View attachment 245153
You know what.....
The circuit works !!!
But there is a problem. Maybe you know a solution.
When i turn the handcrank is creates a higher current because it is loading the super caps. So your circuit turns on but that is not suppost to happen because the super caps are still at a lower voltage. When i let the crank go the voltage drops immediately and the circuit shuts it off. So i have to make a "cut" between the loading circuit (AC->DC converter to super caps) and the output of the super caps. Now they are at the same lead. So i can understand why it behaves like it behaves but how can i change it ? Hmmmm thats the question. Do you know what i mean LowQCab? And do you have any idea of a solution.

Thank you for you reply (again). I learned already a lot from this circuit and the components you let me use.
It was a search for the right pins and what they do but thats just googling and reading. So i figured it out and it was not really that tough. ;-)

Udo
 
Top