Shop OBEX P1 Docs P2 Docs Learn Events
Virtual Grounds and Negative Reference Voltages — Parallax Forums

Virtual Grounds and Negative Reference Voltages

JeremyJJeremyJ Posts: 30
edited 2011-09-27 13:59 in General Discussion
I am in the process of setting up a DAC (an NSC DAC0802 to be precise) to generate an analog signal. I'm working on another circuit - a sensorless encoder for a BLDC motor that I am currently operating with a function generator - and I'm trying to get a DAC working with my Propeller setup so I can run the encoder from my MCU.

Well, I wish I had selected a serial DAC and one that did not require a negative voltage reference, but I didn't, so now I want to get this one working, and maybe learn something in the process.

I followed another thread in this forum that is several years old and found this website mentioned in the conversation - www.tangentsoft.net/elec/vgrounds.html. I setup a simple resistor divider circuit like the one shown to provide the V+ and V- inputs into my DAC. The output signal seems OK, but I'm not getting the output voltages I expected (not symmetric around 0V). I think that the problem has something to do with my grounds. I am using a "virtual ground" for the V+ and V- pins (no actual ground path to speak of)...and for the rest of my circuit I am using the negative terminal of my power supply.

Here is my question: When you create a virtual ground reference, does this connect to anything? What kind of problems can arise when you have a virtual ground and a 0V ground in the same circuit?

I'm hoping that someone can explain this concept.

Finally, if I do select an IC that requires a negative voltage reference, what is the best way for me to generate this reference in the macro design of my circuit (assuming I am going to be using a single voltage source). It appears that there are several ways to do this, including negative voltage reference ICs, virtual ground circuits, etc. In terms of cost/layout space, what is the best option. Any ideas?

Jeremy

Comments

  • Zap-oZap-o Posts: 452
    edited 2011-09-26 07:04
    You could still run the IC with a positive reference only, see page 7 on the data sheet.

    As far as virtual ground goes. I was taught that a virtual ground is mostly used in op-amp circuits to visualize whats taking place between the inverting and non-inverting inputs. Its a reference that one could analyze the circuit from.

    The best way to make a circuit contain a negative voltage is add 2 voltage sources together making the middle connection common (ground). That said, your voltage source has to be big enough so that when you add -v to +v it equals v-total.
  • JeremyJJeremyJ Posts: 30
    edited 2011-09-26 08:37
    Besides the suggested setup on page 7, there is also an application note that accompanies the DAC0802 that describes how to use it in a single supply circuit. Right now I'm trying to figure out why it doesn't work as I have it setup using a negative voltage reference for V- (see attached).
    1024 x 604 - 50K
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2011-09-26 09:19
    Pin 1 on that chip is the logic ground (labeled VLC) and needs to be connected to the ground on your MCU, period. I don't see why you need a virtual ground. What range of output voltages are you trying to generate, in relation to the MCU ground? The current steering switches inside the DAC0800 are quite flexible and it internally takes care of the level shifting.
  • JeremyJJeremyJ Posts: 30
    edited 2011-09-26 14:15
    I'd like to produce a 5V signal - Vpp. Anyway, I do have VLC connected to the MCU ground - and I am getting a signal. It sounds like nobody uses negative voltage references, and I should just forget the idea and build the circuit with a positive supply.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2011-09-26 14:44
    The DAC0800 dates from a time when analog circuits were typically operated from +/- 15 V regulated supplies, and it really is going to operate best under those conditions. It appears to have strong common mode restrictions on the minus end. With a +/-5 V supply, the common mode range on the reference amplifier only goes down to -2 V. That could really put a damper in your plan unless it is possible for you to "float" the ground of your MCU. Maybe that is what you are trying to accomplish with the virtual ground.

    Can you provide a block diagram of your complete circuit including the CPU and the load it is supposed to drive? There can be good reasons to use a negative voltage reference, and there are chips available, and circuits, that can generate and regulate a negative voltage from a positive supply.
  • tdlivingstdlivings Posts: 437
    edited 2011-09-26 15:36
    The ICL7660 is a chip I have used to create a -5 from a +5 supply in order to get a minus supply for a few op amps or an instrumentation amp.
    It has been around for awhile and maybe there are better choices now.

    Tom
  • JeremyJJeremyJ Posts: 30
    edited 2011-09-27 01:42
    Tracy,

    Here is a visio drawing of my circuit. You can see how I've created a virtual or reference ground to create a negative reference voltage. Not sure if this approach is going to work... Tom - Thanks for the advice on the ICL7660...I'll checkout the datasheet.
    1024 x 865 - 67K
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2011-09-27 08:38
    The virtual ground from the 18V supply would somehow have to be connected to the VLC ground, but it is not in that schematic. Hmmmmm... What is really confusing are the power supplies, shown as 3 batteries, 18V, 10V and 3.3V. Are there really 3 isolated power supplies? Do you have any flexibility in the design, or is it set in stone except for tweaks here and there?
  • JeremyJJeremyJ Posts: 30
    edited 2011-09-27 09:23
    I am working on a breadboard and I have a dual DC power supply. On one rail I have 10V, which I am using for Vref(+). I step this down on another rail to 3.3V (with voltage regulators) to power the MCU. On a separate rail I have 18V, again from the othe side of my DC power supply, which gives me my V(+), V(-). OK...I put in a battery instead of a DC source symbol (a little sloppy). But yes...you hit my main question dead on. How do I connect the grounds, because there are two grounding points.

    To answer your question, this is not set in stone in any way, shape or form. I am literally just trying to get my DAC to work and output an analog signal. I don't have an IC to create a negative voltage reference, so I'm trying to "make" one myself. I'd like to get this DAC working with a negative voltage reference.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2011-09-27 10:49
    Please explain "On a separate rail I have 18V, again from the othe side of my DC power supply, which gives me my V(+), V(-)." Does that mean that the 18V supply is completely isolated from the other supply that gives you the 10V and the 3.3V? Your schematic shows the 10V and 3.3V with a common ground, and it looks like you are trying to make the 18V supply pretend a +/- 9 V supply. What are these supplies, AC mains powered?
  • JeremyJJeremyJ Posts: 30
    edited 2011-09-27 11:52
    Yes...I have a variable voltage DC power supply (HY5005D-2). Yes...completely isolated. I've reconnected all grounds for the DAC to my virtual ground, which I thought should work....then I realized that my logic pins (tied to the MCU) are outputting either 0 or 3.3V, as seen from the MCU ground. If you look at the appication note for operating this DAC (see attached), it looks like they fix this problem by superimposing the output of the logic pins onto a 10V reference voltage. I need to do the same thing, I suppose.

    I think I am going to switch strategies and just try operating this IC without the negative reference voltage. I'm looking at other DACs, too - the LTC1257 or LTC1446 look like they may be a better fit for what I am trying to do (output a 40kHz sine wave). They are serial ICs with a voltage output that operate from a single voltage supply. I'm also looking in the OBEX to see what DACs other people have used.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2011-09-27 12:39
    Yes, you could save a lot of hassle--Ditch the DAC0800 and get a more up-to-date DAC.

    Did you just say you want a 40kHz sine wave? If so, the rate of data output to a DAC will have to be pretty high, much higher than 40kHz if you want a smooth sine wave. That could be done with a parallel interface but may well be a challenge with a serial DAC.

    Have you considered simply using the Propeller counters to generate the sine wave using the Duty mode? There are several objects available for doing that, and a number of discussions here on the forum. At the output it takes a simple filter to remove the high frequencies, and maybe an op-amp to shift the voltage level.

    Yet another solution would be a dedicated DDS chip, which works by the prop loading it with a tuning word, and it outputs a nice sine wave.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2011-09-27 12:53
    Did you say you need to output a 40kHz sine wave? If so, the update rate to the DAC will have to be much higher than that in order to have smooth sine wave. And much much higher and perhaps impractical with a serial DAC.

    Have you considered using the Propeller counters in duty mode to generate the sine wave? At the output it takes a simple filter to remove the high frequencies and perhaps an op-amp to buffer and shift the level.

    Another option would be a dedicated DDS (direct digital synthesis) chip. There, the prop would give it a "tuning word", and the chip generates the sine wave without further intervention.
  • JeremyJJeremyJ Posts: 30
    edited 2011-09-27 13:59
    Yes, I was wondering about that. You realistically need a data rate above 1MHz to get a 40kHz signal, if you don't want to sacrifice the "precision" of your signal. Any reason why this would be harder with a serial DAC? It's not immediately obvious to me why that would be the case....

    I'll need to look into the DDS chips - this is new to me, but it sounds like exactly what I need (much simpler, too). Glad you mentioned this option.

    I did see D/A conversion exercise in Chpt 7 of th Prop. Ed Manual, but I had doubts as to how clean of a signal it would produce. I'll give it a try.
Sign In or Register to comment.