Go Down

Topic: DAC (Read 2081 times) previous topic - next topic

Grumpy_Mike

By using mains power adapters.

baum

Is that a negative voltage, or just ground (0V)?

Grumpy_Mike

No it is a negative voltage.

Voltages are a relative measure, they are always measured with reference to some other potential. If you connect the positive end of a supply to ground the other end is a negative voltage (with respect to ground)

baum

Really!?!?!?! So arduino 5V+Wall wart 6V can make +5V to -6V?

Grumpy_Mike

No that's not what I said.

baum

Okay, then some help. I have arduino's +5V and a 6V wall wart.

CrossRoads

#21
Jan 18, 2011, 03:19 am Last Edit: Jan 18, 2011, 03:20 am by CrossRoads Reason: 1
Okay, so find a mating connector for the 6V wallwart and wire the +6 to the arduino ground and the wallwart 6V return  becomes -6V. (or cut the end off and solder on pins so you can stick them in a breadboard).
Then find an op amp that is happy running from +/- supplies, like a TL072, TL074.
Take the Arduino DAC output, run it thru a cap in to the op amp set up as a voltage follower or very low gain inverting amplifier.
http://focus.ti.com/lit/ds/symlink/tl071b.pdf
I am using 0.47uF caps (ran out of 1uF caps) into a MOSFET to make an audio amp to play a Tone melody quite loudly in a fencing club to signal when a touch is made.

What are you trying to do?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

baum

I'm trying to make a sine wave. would the LM358 work? it has two op amps so I can make a sine wave. the DAC is for making tones.

CrossRoads

Data sheet says its good for +/- supplies.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

DHM

Perhaps you don't even need a negative voltage.

IF I understood correctly, you're trying to generate a bipolar signal (sine wave) using the Arduino, and a Unipolar DAC.  You cannot produce DC negative voltages with this hardware.  But you CAN produce AC audio signals regardless, and WITHOUT using bipolar supplies.  

You have the Arduino which cannot output anything negative.  You have your DAC (which by description is Unipolar).  Research Bipolar DACs to understand the difference.

Either way, you cannot produce negative voltages directly BUT...  suppose you want to produce a Sine Wave, and you decide that your resolution is +/- 127, meaning 7 bits with sign.  Write your CODE such that in calculating Amplitude of the SINE, comes up with a 7 bit result (0-127, negative or positive) which is then simply ADDED to 128...  Feed that to the DAC.

Follow me here.  Your result +/- 127 is added to 128, producing a result which is between 1 and 255.  This is in the range of the 8 bit DAC, representing a +/- excursion which is atypical of a bipolar output, but is otherwise a positive voltage.  

Now AC couple this DAC output voltage to your audio amplifier.  Capacitive coupling if you will.  This is the answer without resorting to bipolar solutions; if you don't know what this means, do some research in AC coupling.

HTH, DHM








baum

So I'm basically generating a sine wave with an offset of about 2.5 volts.
And now some more help.
How can I send the data over the Wire library? I don't exactly understand how to do it.

pwillard

ICL7660

http://www.intersil.com/data/fn/fn3072.pdf

This chip can generate -5V from a +5V source.


baum

Yay! and pins:
1 No connection
2 Capacitor? What value?
3 0V
4 Cap negative pole from pin 2
5 negative voltage
6 What's This?
7 And this?
8 5V in

baum

How about this one:
http://www.sparkfun.com/products/316
It has two converters inside, but seems quite similar otherwise.

retrolefty

#29
Jan 18, 2011, 06:04 pm Last Edit: Jan 18, 2011, 06:05 pm by retrolefty Reason: 1
I think you need to slow down and try to understand the magic of what a simple series capacitor can do for you to pass audio information from one device to another. Maybe if you could just draw a crude block diagram of what all is involved in your project, as in:

Arduino>>>D/A module>>>audio device??? With a short description of what you think each device needs to accomplish for your end goal?

It's that last device that needs to be explained better to us, to stand a better chance to get useful recommendations or suggestions on how to accomplish your goals.

Lefty

Go Up