I know, it is possible to vary the output DC voltage through coding and then changing the polarity. This means, say starting from 1.00 V, DC voltage output is increased gradually say 0.1 per second and when it reaches to say 4.9 V then the polarity (+ and -ve terminals) should be changed.
Sorry, no kits.
A fundamental experiment, involving an old IC, DAC0808. https://www.ti.com/lit/ds/symlink/dac0808.pdf
It's a simple thing to work with.
What ac frequency do you require?
There is a difference between change a voltage and changing polarity.
It's pretty easy to come up with a variable voltage.
That could be done with PWM and a low-pass filter.
That's not a panacaea though.
How many milliamps do you need?
I am sure you can use the Arduino's PWM and a single op-amp. With biasing the output negative.
Some nice person has even done this before (the correction is towards the end of the page). You will have to alter scaling for your output. Witht the Arduno PWM based DAC you are using the power supply as your reference, if you need precision then a better voltage reference and precision resistors will be needed (part of your error budget calculation).
I have a product (complete circuit board in a DIN rail enclosure) that's based on an Arduino Nano that will provide you with a 12-bit resolution +/-12V output biased around ground.
It's overkill for what you need and the pricing isn't exactly hobbyist-friendly but if you get stuck and want to consider it, send me a PM.
Dear cedarlakeinstruments
Please provide more details.
Since I am focussing on such tailor-made proto, I am not a buff of either Arduino or integrated circuits. And this project is purely for electrochemical sensing and we are planning to automate the variation of DCV as well as recording.
Do you actually want to apply a negative voltage with respect to ground or do you want the electrodes to be swapped over. All replies have assumed the former.
If it is the latter then use a circuit called a h-bridge. Its main use is for controlling the direction of motors but it does this by swapping the wires over. This is a good one https://www.pololu.com/product/2130
If you combine either of the suggested circuits for 0-5V with the H-bridge Mike suggested in Reply#17, you wind up with a circuit that steps from 0-5V and when you reverse the direction
of the H-bridge the polarity will be reversed. If the sequence needs to always start at zero then
you need to change the 5V to 0V before you reverse polarity.
or PWM output with a 4.7k resistor on the output connected to a 4.7uF cap with one end connected to GND. (it's called and RC LPF (resistor capacitor low pass filter). It will convert
the PWM output to a steady state dc voltage. The DAC is a much better solution though.
If you're having trouble visualizing this, just imaging that the 'motor' is not a motor but is
in fact the output of your circuit to which you connect your widget you want to power.
The h-bridge power terminals are the GND and 5V, which unlike normal power supplies,
it not fixed, but rather the stepping voltage. How does this work (well in fact it may not
if the H-bridge doesn't cooperate, but if you read the page Mike linked its says:
This tiny breakout board for TIβs DRV8833 dual motor driver can deliver 1.2 A per channel continuously (2 A peak) to a pair of DC motors. With an operating voltage range from 2.7 V to 10.8 V and built-in protection against reverse-voltage, under-voltage, over-current, and over-temperature, this driver is a great solution for powering small, low-voltage motors.
So the bold numbers are the 'catch' . It should work if the voltage output by the DAC or PWM/RCLPF circuit remains within the allowable voltage stated in the H-BRIDGE SPECS.
When you get below the 2.7V, more than likely the H-bridge will NOT work.
If you need it do what you stated exactly, that could get complicated.
(not saying it isn't doable, but it may NOT be doable by YOU)
Why ? (analog switches, op amps, where does it end ?)
I have a design for a project that sweeps the output voltage from 0 - 5V under program control.
It also measures the current in the circuit to graph device characteristics.
It would be a simple matter to change the polarity across your sample using a eg changeover relay.
However if you REALLY NEED the output to go 0 ...4.9V | - 4.9V ...0 you would need a source of -5V.
Thanks Grumpy_Mike
But the key part is to vary the voltage or step up and step down the DCV.
Thank you for your suggestion and it can be useful for polarity reversal.
Dear raschemmel
Thank you for your solution.
But we wish to procure the integrated kit as I am not an expert in Arduino or the related integrated Arduino.
You MUST CLEARLY DEFINE what you require.
What we dont know:
1: Whether you need a voltage output that goes negative, or you just need to reverse the connections to the test system.
2: What current the voltage will supply
3: How fast it needs to change
4: The size of the steps.
5: how your system will respond to the changing voltage.
6 ..97 as yet undefined.