DC Power Crossover Circuit: Solve Seawater Oxidation Issues w/ Microcontroller

  • Thread starter Thread starter buzachaka
  • Start date Start date
  • Tags Tags
    Dc Power
Click For Summary

Discussion Overview

The discussion revolves around designing a DC power crossover circuit to mitigate seawater oxidation issues in conductivity sensors. Participants explore various methods to control the polarity of electrode plates using microcontrollers, relays, and other electronic components, focusing on low-frequency switching to stabilize readings.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests using a double pole double throw (DPDT) relay along with a driving timer circuit to control the polarity of the electrodes.
  • Another proposes using a microcontroller to alternate outputs, creating an AC-like effect for the water sample, which could reduce chlorine production and corrosion.
  • A participant mentions the potential of using a voltage inverter but considers it redundant compared to other solutions.
  • Concerns are raised about the feasibility of using microcontrollers due to budget constraints, especially with a large array of electrodes.
  • One participant inquires about using a transistor configuration similar to an H-bridge to replicate the relay functionality, citing the limited lifespan of mechanical relays under frequent cycling.
  • Discussion includes the possibility of using multiplexers with microcontrollers to manage multiple electrodes efficiently.
  • Some participants express challenges with PWM outputs from microcontrollers not providing suitable voltage signals for DC sensors, leading to alternative circuit designs involving 556 timer chips.
  • There is mention of the proprietary nature of the electrodes being used, emphasizing their durability for long-term ocean deployment.
  • Participants discuss the intricacies of using PWM signals and the need for averaging or filtering to obtain stable readings from the sensors.

Areas of Agreement / Disagreement

Participants express a variety of approaches to the problem, with no clear consensus on the best solution. Multiple competing views remain regarding the use of relays, microcontrollers, and circuit configurations.

Contextual Notes

Participants highlight limitations related to the frequency of switching, the nature of PWM signals, and the specific requirements of the sensors being used. There are unresolved questions about the effectiveness of different circuit designs and the implications of using various components.

Who May Find This Useful

Individuals interested in electronics design, particularly in applications involving conductivity sensors in marine environments, as well as those exploring microcontroller-based solutions for circuit control.

buzachaka
Messages
15
Reaction score
0
I am a ecologist and I have been playing around with a water conductivity sensor, however in seawater there is the obvious oxidation issue. I have found that with the right correction factors and with the polarity frequently reversed, the electrodes have reasonable accuracy.

The Question: Is there an crossover circuit, that can be controlled by a microcontroller, that would allow the power circuits to be flipped. I am running 5v DC.

The circuit would normally be like this,

5VDC In (+)----------------- - ----------- (+) 5VDC Out

Grnd In (-)------------------ - ----------- (-) Grnd Out

The dashed lines represent the existing cables, the 'out' are the plates of the electrodes.

And when crossed over,

5VDC In (+)------------------ \/ ----------- (-) Grnd Out
Grnd In (-)------------------- /\ ----------- (+) 5VDC Out

Basically, I need to flip the polarity of the electrode plates.

Because of the equipment, there is no way to use AC and the switching needs to be at low frequency to allow reading to stabilize.

Any suggestions? I've searched and am having no luck.

Cheers.
 
Engineering news on Phys.org
I would use a double pole double throw(DPDT) relay and a driving timer circuit.
 
You could use something like the attached diagram.

Two outputs of a Micro are used and they are alternately sent to 5 volts while the other is kept low. To the water sample, this would look like AC.

The outputs are fed back to A to D converting inputs (A and B ) where readings of voltage are obtained. The voltage depends on the conductivity of the sample and the values of the series resistors R1 and R2.

One advantage of using a micro like this is that the output voltages only need to be present for the very short time it takes to do an A to D conversion. Maybe 2 or 3 milliseconds.
The probes could have no voltage at all on them for the rest of the time.
So, if you only took a reading every second or so, the the voltage would only be present for about 0.3% of the time.

This and the alternating voltages would limit Chlorine production and corrosion of the probes.

I have mentioned the Picaxe chip, but any Micro you are familiar with could probably be used like this.
 

Attachments

  • conductivity.PNG
    conductivity.PNG
    1.3 KB · Views: 444
The solution using the switch is the easiest.

The solution to implement a micro-controller is brilliant. A thought occurred to me to use a voltage inverter, but that's redundant.
 
I think the DPDT relay is going to be the tune for the project. There are 64 electrodes in the array so using microcontrollers might push past the meager budget. However, the microcontroller solution is inspired and I have set out on making one for bench testing of samples.

Thanks vk6kro and dlgoff for your advice! I really do appreciate it.
 
final question: Is it possible to use a 4 or 6 transistor configuration similar to an h-bridge to replicate the DPDT relay. I've build the timing circuit and it works fine with the relay, however with the number of cycles necessary per minute, the relay will have a very short life.

Something of the kind where when the timer signal is HIGH, the polarity is one way, and when the timer signal goes LOW, it swiches.

Any options?
 
I did a search for a DPDT solid state relay but couldn't find any. You could use a couple of DPST SSRs to do the job. But yes, you could build a h-bridge.
A solid-state H-bridge is typically constructed using reverse polarity devices (i.e., PNP BJTs or P-channel MOSFETs connected to the high voltage bus and NPN BJTs or N-channel MOSFETs connected to the low voltage bus).
http://en.wikipedia.org/wiki/H-bridge"
 
Last edited by a moderator:
I'm giving the microcontroller a try, and so far it looks promising. The problem that i ran into was the pwm analog outputs don't provide a proper voltage signal for a dc sensor. The solution i have on the bench now is similar to the schematic from vk6kro but with the outputs fed into pair of 556 chips as pulse generators.

In this setup i can feed the chips a conditioned 5vdc source.

Any obvious flaws in this setup?
 
  • #10
A pair of 556 chips? That is four timers, right?
 
  • #11
buzachaka said:
I'm giving the microcontroller a try, and so far it looks promising. The problem that i ran into was the pwm analog outputs don't provide a proper voltage signal for a dc sensor. The solution i have on the bench now is similar to the schematic from vk6kro but with the outputs fed into pair of 556 chips as pulse generators.

In this setup i can feed the chips a conditioned 5vdc source.

Any obvious flaws in this setup?

Whatever works is fine, but I don't understand why the Micro couldn't give you suitable PWM out. The Picaxe chips will give 0% to 100% PWM in 1024 steps. This can be used as is to drive a meter or filtered to give actual DC out.
All outputs can send Ascii text to a serial port of a computer or a serial LCD, if you wanted to go that way.

The Picaxe chips need 5 volts and preferably a clean regulated 5 volts.

What sort of DC sensor are you using?
 
  • #12
the pwm output is read by the input as a series of '0' and '1023' pulses (tried it before i started thinking about the nature of a pwm signal), the average of which is the specified voltage; The high frequency of the signal means you don't notice when you use it to light an led or drive an inductive load.. You could, in theory, average the pulses through software or filter the pulses through a RC circuit...but that seems like way too much trouble.

I went with 2 556 chips because the pulse of the 555 timer is initiated by the trigger going LOW. By using the 556 chip, I use one side as a pulse generator and the other as a 'not' gate to invert the digital signal from the microcontroller.

Am i overcomplicating this?
 
  • #13
The sensor is a proprietary electrode. Build like a brick ****house so it can be left in the ocean for weeks.
 
  • #14
Just rereading what you said...
The solution i have on the bench now is similar to the schematic from vk6kro

The actual readout for this would come from a different output, not the ones connected to the water sample. A picaxe 14 has 6 outputs. A 20 M has 8 outputs.

So, you would use the circuit above to get a reading on the A to D inputs of the chip and then do any calculations and present the output to one of the other outputs.

The high resolution input A to D command for a Picaxe is
readadc10 4, w1
where it is reading from input pin 4 and the reading is put into a variable W1. W1 would be a number between 0 and 1023 where each step would be about 5 mV. (Pin numbers are just examples).

The PWM output command is:
pwmout 2, 255, w1
where 2 refers to output pin 2 and W1 is a variable with values from 0 to 1023 where each step is about 0.1% change in duty cycle.

If you change the 255 to 250 then the steps are actually 0.1%. So to get 60% duty cycle, you would make W1 = 600.
the command would then be
pwmout 2, 250, 600

As you can see, these are VERY nice chips.
 
  • #15
I am using two analog outputs and two analog inputs connected to the electrode and using a serial connection to output the data. The problem I had using the pwm was that the voltage signal coming from the analogue output is a square wave. The square wave was was picked up exactly as transmitted (though slightly attenuated by the voltage drop across the sample) by the analog input. So you can image the the displayed values being of the nature:

0
0
0
1023
1023
1023
1023
0
0
0
1023

Whereas, using the 5v pulses from the timers, the input reads as

943
952
950
...
 
  • #16
It seems like you have a continuous pulse stream going to the electrodes? Why?

I would do this:
send one output of the Micro high and keep the other one low.
read the ADC inputs
Send the high output low.
wait one second

send the other output high and keep the first one low
read the ADC inputs
Send the high output low
wait one second.

Now, you want an average of the high readings from both inputs and an average of the low readings from both inputs.
Subtract these to get conductivity data which will depend on the series resistors.
 
  • #17
in salt water, the corrosion is immediate and readily apparent in the calculations. A second of current flow would see a 10% drop in voltage.. more depending on the salinity. I haven't done the calculations yet (response time for the chips, and the micro) but I'm shooting for ~500hz to keep the surfaces clean and oxide free.

The constantly changing current also keeps the electrodes clean, in this environment the surface conductivity would change quickly even without current flowing.
 
  • #18
Its certainly not a perfect answer, and there is definitely merit in what your suggesting.

By allowing the micro to trigger the pulse timer and then switch to recording data through the ADC, the slight delay eliminates some switching noise and eliminates artificial timing constraints outside of the pulse timers themselves.

The program triggers the timer through pulling a digital pin high and then starts listening, as soon as the positive voltage is registered on the analog input, the voltages start to be recorded. The pulse lasts 5mS. Once the current drops, the program triggers the pulse for the opposite electrode and starts listening again.

The pulse length is being tested to maximize battery and electrode life (while still keeping numbers in the ballpark)...so the 5mS value may, and probably will change
 
  • #19
With marine grade stainless steel electrodes and a pulse rate of 3 mS each second, I would be surprised to see any corrosion, especially as the voltage is being alternated.

Platinum electrodes would be ideal and these are routinely used in Hoffman Voltameters as used in laboratories. The whole instrument costs about $40, so replacement electrodes can't be all that expensive.

Note that the series resistors will need to be optimised to get best use out of the A to D converter inputs.
 
  • #20
the electrodes are 316 ss but platinum is a little out of the budget. The capillary electrodes used in the lab meters are too delicate for the open water..had to go with a bit of beef! and that means a lot of metal.. the problems would be a lot fewer if i could use a gold alloy.. but it would never take the sand scouring...

why can't materials be as cheap as lines of code...

I worry about the scaling and oxide buildup even on stainless. I'm hypothesizing that the 'trodes would have to run a kind of cleaning cycle before readings to get consistent results... but my *** does a lot of the talking these days.. so i could be completely off

.. would save on battery power to run a 5 second cleaning pulse and then 5 seconds of readings...hmmmm... do that once a minute.. could put the chips to sleep during the interim
 
  • #21
I have seen an effect like that where the resistance between two probes increases after a few seconds of current flow.

It was due to polarization. This is where bubbles form on the surface of the electrodes and restrict the exposure to the electrolyte. Maybe this is what you have?

You could limit this by having a very short current cycle and by agitating the solution in between readings. Fortunately, the ocean would do the agitating for you.

Do you have any figures for conductivity ranges in your area?
 

Similar threads

  • · Replies 18 ·
Replies
18
Views
3K
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
6
Views
4K
Replies
12
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
4
Views
3K
Replies
12
Views
3K
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K