Maker Pro

Short/open detection with optocoupler in a h bridge with arduino?

in a speed motor controller by arduino, we substitute the motor for electrodes, we will have an electrolysys machine. Failures are that electrodes solubilize, so, impedance increases a lot, or it becomes open circuit... or some ions sediments&form a short

sergio21345

Oct 30, 2015
1
Joined
Oct 30, 2015
Messages
1
sergio21345 submitted a new Showcase Item:

Short/open detection with optocoupler in a h bridge with arduino?

Hi folks…

Let me explain you how I want anyone else to help me, ha ha…

Working principle for electrolisys:

Two electrodes , having electrons flowing through .. the scheme is the same than a dc motor power control with rotation control using and H bridge . Here , it is a little of explanation: pay attention to pic1. We can replace the dc motor for two electrodes, one being the positive or cathode, the other one, the anode.

Polarity is changed depending of which transistors are in a high or low state, as seen in pic 2 and 3.

In the pics, diodes are for protecting of transient currents , but inour case, with just electrodes, with no inductive loads, it is not necessary t o use them.


If you want to split /separate the pic controller of the control, for Arduino protection or whatever , you can use optocouplers/phototransistors .


What is the difference between electrodes and a DV motor? Electrodes can give two failures because of the chemical reaction: they can be in short (when ionization precipates again metallic ions, forming a path between both electrodes) and open circuitç (when they have been completely reacted , no more metal to become metallic ions). With a potentiometer as a n input to Arduino, we modulate the pwm voltached reached at electrodes.

IMPORTANT: I need to identify y both states.

At this point , you may think: hey dude!!!! Just do an analogic read between the electrodes, to know if there is 0 voltage (short) or if there is an open circuit ( placing a small value resistor in serie with the electrodes …at this point I tell you:

a) If you wanna do that, think that that small resistor should have tow parallel resistors because analog reading input of arduino just reads from 0 to 5V.

b) I don’t suggest to do that because of the optocouplers, grounds are not shared.

c) If you do, without optocouplers , Arduino shows different values. You can use a voltmeter and you will see how values of potentiometer and voltmeter have a linearity, it is, achieve any continous value in scale 0 to 1023 for arduino, and 0 to 5 , as the value of the resistor was chosen for that.

BUT VALUES READ TO BETWEEN ELEC TRODES ARE NOT USEF ULFOR US…why? Because the analog read of arduino reads the exact va lue of the signal, it is not as a voltmeter.. It means that it reads the va lal ue of modulation at that moment and it is so unstable because of the readings ( 1million reads per second) that I can not use an analog reading input...

Read more about this showcase item here...
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342

You can place a "current sensing device" in the bridge like shown
(Q2 and Q4 as in your drawings).
Not directly over the electrodes, but related to GND.
If the current is low in normal operation a small resistor can do the work.

It will produce a PWM voltage signal with the "On" period proportional to the current flowing through the electrodes regardless of electrodes polarity.
In general ,you can filter the PWM signal to get a DC voltage proportional to the PWM ratio used and the current through the electrodes.
This filtered stable DC voltage can be read by the Arduino

what is the frequency of the PWM you use,are you varyingH-bridge.JPG the ratio or is it fixed?
 
Top