Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Undershoot arduino

Status
Not open for further replies.

Nathex

New Member
Hello,

I encounter a problem with the power supply of my arduino board.
Here is the context of my project :

A solar panel is connected to electrodes in a saline solution to obtain drinking water by electrolysis.
The main purpose of the electronic circuit is to invert electrodes polarities in order to avoid metal precipitation.
To do this, two latching relays are controlled by an arduino board which is powered by the solar panel ([0V 7V], [0A 8A]) via un boost-converter.

Here is a quick view of the circuit :
Circuit.PNG


This project has some defaults, but for now I can't change these (I will entirely change the circuit in a new version).
Examples of defaults : -latching relays instead of bistable ones - 2 relays instead of one mere inverter - a boost converter + voltage regulator --> not optimal -...

Here is the main problem :
When the arduino wakes up, it keeps the previous state of the relays : if the state was high(current flows through the self of the relays) the day before, then it keeps this high value until a switch of the relay occurs.
The problem is that when this switch occurs from a low state to a high state then the arduino attempts to invert the polarities,
the voltage suddenly drops and the arduino shut down. After a few ms, the voltage becomes sufficient to power the arduino again, and the arduino re-attempt to invert the polarities, therefore, it shuts down,...
This cause the arduino to loop : wakes up - trying to power the relays - shuts down - wakes up,...

I attached some graphs that illustrate the phenomenon.
I noticed that when I replaced the electrolytic solution by a mere resistor, everything worked fine. The problem is thus caused by the electrolytic solution.
I also added a cap in parallel of the boost-converter to limit the undershoot but it was a 2000µF cap...

I prefer solving this problem without adding a cap (by changing the program, ...)
But if there are no other ways to remove the undershoots, how can I compute the right value for the cap? and which kind of accumulator should I use, an electrolytic cap?

Thanks in advance !
Undershoot.PNG
zoom undershoot.PNG
electrode 1.PNG
Electrode 2.PNG
 
Part of the effect is from the relays - the coil inductance means the current tries to continue flowing when the power is switched off, which causes a high foltage spike with the opposite polarity.

You need a "Flywheel diode" across each relay coil. That's just a rectifier diode, connected so it does not conduct when the coil is powered normally.
When the power is switched off, the current continues to circulate through the coild and diode until the stored energy is dissipated.

You can add a diode in series and a capacitor in parallel with the input to the buck converter, to allow that to stand short dropouts.

For "battery" effects coming back from the electrodes, use two ouputs and leave both relays off for a short time at each reversal, to allow the electrodes to discharge.
 
Thank you for your answer.
There is already a flywheel diode for the two relays. I am pretty sure that the problem comes from the electrolytic solution because when I tested the circuit with a resistor instead of the solution, everything worked fine.

*I did a mistake in my previous message : a 2000µF cap is not enough, I don't know how to compute the optimal value for the cap but when I tested with 4 x 2000µF caps the problem persisted. I had to use a super cap (5F) to smooth the undershoot...
 
To calc a "holdup" cap value use classic Capacitor equation :

Q = C x V, charge = C x V (farads and volts, q is coulombs)

I (current) = C x dV/dT ( I on amps, C in farads, dT in secs, dV in volts)

C = (I x dT) / dV

So you plug in current needed, the time you need it for, and the
allowed voltage drop you can tolerate.

The above is not exact as it assume a constant Iload needed, and in many designs
the Iload is a f(time)...But its close enough.

The other problem is the cap itself and its ESR come into play, higher ESR
requires higher C to accomplish the same thing.


Regards, Dana.
 
Last edited:
There is already a flywheel diode for the two relays. I am pretty sure that the problem comes from the electrolytic solution because when I tested the circuit with a resistor instead of the solution, everything worked fine.
Just leave both relays off for a second or two between changing polarities.

Experiment with the time, to see how long is needed to reduce any current surge to the point it does no harm, then allow a bit longer for possible changing conditions - water purity etc.
 
Just leave both relays off for a second or two between changing polarities.
The problem is that the relays are non-latching 1NO NC and they must be controlled together because they are already hooked up on a pcb.

How do electrodes in a saline solution produce drinking water?
The elecrolysis produces bleach which will disinfects filtered water.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top