# Arduino Forum

## Topics => Robotics => Topic started by: zaciatok on Feb 09, 2013, 01:33 pm

Title: How to change 5 DC volts from Arduino into +/- 5 volts
Post by: zaciatok on Feb 09, 2013, 01:33 pm
Hi everyone:
I would like to ask you how is it possible to change the output voltage from arduino (5 DCV) into a +/- 5 DCV?
Title: Re: How to change 5 DC volts from Arduino into +/- 5 volts
Post by: johnwasser on Feb 09, 2013, 02:04 pm
You can use a DC-to-DC converter to convert between almost any two DC voltages.

The TI PT5022 can produce -5V from +4.75V to +7V

Note that the MINIMUM current output is 1/4 Amp.
Title: Re: How to change 5 DC volts from Arduino into +/- 5 volts
Post by: zaciatok on Feb 09, 2013, 03:09 pm
Thank you for your response. So, the problem I have is as follows.
I have an input voltage, for example 5 DCV, which will be applied for 2 minutes. So I would like to obtain an output voltage oscillating between -5 and +5 volts. How can I get that ? is it possible ?
I have no experience with electronics, but I need to do that for my school project.
Thank you.
Title: Re: How to change 5 DC volts from Arduino into +/- 5 volts
Post by: johnwasser on Feb 09, 2013, 03:21 pm
I think you will have to be way more specific than "oscillating".  What frequency?  What waveform?
Title: Re: How to change 5 DC volts from Arduino into +/- 5 volts
Post by: zaciatok on Feb 09, 2013, 03:39 pm
Hello my friend:
So the waveform can be for example v=5sin(2*pi*frequency), frequency=3Hz.
Using arduino is I think impossible to get an oscillating voltage between +/- 5 volts. Because the  arduino output voltage is from 0 to 5 volts.
Any data acquisition card has that possibility but is veeery expensive. I can't pay that :(
How can I resolve my problem using arduino?
or there is not solution?
thank you for your help my friend.
Title: Re: How to change 5 DC volts from Arduino into +/- 5 volts
Post by: johnwasser on Feb 09, 2013, 04:35 pm
You could use two pins to get a +/-5V signal:

For values > 0 set the positive pin HIGH and the negative pin LOW.

For values < 0 set the positive pin LOW and the negative pin HIGH.

Note that Arduino doesn't have a D/A converter.  You will have to use PWM and a low-pass filter to emulate an analog output.  Alternatively you could use an external D/A converter.

You should probably use a look-up table for the sine wave.
Title: Re: How to change 5 DC volts from Arduino into +/- 5 volts
Post by: zaciatok on Feb 09, 2013, 05:08 pm
Hi my friend:
what do you mean by negative pin ? is it GND ? , I have tried tuning a negative value for analogWrite --- PWM pin 9; but it just can send a maximum voltage around 4.96 volts. In other words, It is not possible to get a negative voltage directly from arduino. I think it is necessary to design an external circuit to obtain that value. But I have no idea about how to do it.
Waiting for responses :D