Shop OBEX P1 Docs P2 Docs Learn Events
Best options for -2.5 to +2.5 voltage from a protoboard — Parallax Forums

Best options for -2.5 to +2.5 voltage from a protoboard

Prophead100Prophead100 Posts: 192
edited 2011-05-25 00:33 in Propeller 1
What is the simplest and way to provide roughly -2.5 to +2.5 voltage from a protoboard to simulate a +/- DC signal to old fashion RPM gauge. I am reading RPMs and direction from a pair of hall sensors then want to send signals back to the 1960's era analog gauges as well as the screen.

It doesn't need to be super accurate just repeatable so I can calibrate it. I think that current is fairly low ( e.g. 20mA) on th egauge3 which appears to be a modified volt meter but I have not measured it yet. The fewest components would be best so I can fit it onto th eboard and of course repair it easy when it gets crunched but battery life is not an issue so the circuit doesn't need to be too efficient. The options I thought of were:

1) Simple Duty Cycle from Prop pin X to Prop pin Y using an inline resistor is needed. (reverse source & sink for polarity)
2) An h-bridge setup with pulse width or duty cycle.
3) Use a voltage divider from the 5 volt supply running to a couple transistors to vss and 5 v
4) Use a commerical DAC chip with breakout board with an OpAmp to make it bipolar.

How would you do it?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-07 17:36
    You could PWM a MAX3232. Clamp the outputs with 2.5V zeners.

    Or you could use a TLE2425 or op amp as a virtual 2.5V ground and PWM a 5V driver IC.

    -Phil
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-02-07 18:23
    Does ground have to be ground?

    ie when you say +/-2.5V, would it be ok to have 0V to 5V, and connect the "gnd" of the meter to a referenced 2.5V.

    If you can do that, well this could be done with an op amp. You could use a CA3140 as this can go rail to rail. Set the gain with two resistors at 5/3.3. So then 3.3V from the propeller gives 5V, and 0V gives 0V. Set the reference voltage as 0 (this won't work for most op amps as most can only swing to within 1.5V of the rail, eg 741, 324. But it will work with the 3140)

    And then you want a solid 2.5V on the 'gnd' of the meter. By 'solid', a voltage that will not change whether you are sourcing or sinking current. I'm not sure if a voltage regulator will work there - not sure if they still regulate when they are 'sinking' current.

    For ballpark 20ma, a couple of 100 ohm resistors in series is not going to regulate very well.

    I'd think about using another op amp (and here you could use a 3140 or a 741 or a 324 or anything really) and bias the +ve to 2.5V with a couple of 10k resistors from a 5V supply, then connect the negative to the output and you have a voltage follower that will output a steady voltage of 2.5V.

    I'm thinking two op amp chips eg 3140, and four resistors and a 5V regulator plus assoc capacitors.

    Can you measure the DC resistance of the meter?

    The max output of a lot of op amps is 10mA or so, and you said 20mA, so you might end up needing to boost the current. There is an op amp circuit plus two transistors that can do this but if you have a meter with a higher impedance then it won't matter.
  • TubularTubular Posts: 4,717
    edited 2011-02-07 19:26
    I second Phil's suggestion, TLE2425 or 2426 rail splitter off the 5V rail. 3 terminals, TO-92 style package (or other). Assuming the gage isn't grounded, of course
  • Prophead100Prophead100 Posts: 192
    edited 2011-02-07 21:55
    Thanks for the ideas. I am going to try to dig into the harness this weekend to get the resistance of the gauge so I get the exact amps. The gauge's ground floats relative to the propeller with only two wires going in, DC one direct rotates the gauge clockwise and DC reversed goes clockwise.
  • Prophead100Prophead100 Posts: 192
    edited 2011-05-20 15:53
    The simple solution ended up being a differential duty cycle between two pins as described in the PE Kit. The resistance was about 1.3K with a full deflection at ~4.0 volts. So the 3.3 volts worked quite well to give a well controlled output of roughly 5mV per RPM. Adjusting the duty cycle allows you to zero in. For an old fashion gauge the solution is very straight forward and I can echo the output to remote stations via a serial output to another propeller.
  • Prophead100Prophead100 Posts: 192
    edited 2011-05-24 19:44
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-05-24 22:07
    Well done! There is something retro and steampunk about using analog guages with modern chips behind the scenes. I like it.
  • LeonLeon Posts: 7,620
    edited 2011-05-25 00:22
    Use a couple of diodes and capacitors with a timer output to generate the negative voltage.
  • kwinnkwinn Posts: 8,697
    edited 2011-05-25 00:33
    Leon wrote: »
    Use a couple of diodes and capacitors with a timer output to generate the negative voltage.

    Have to go with prophead on this one. It is by far the simplest most elegant way of producing a bipolar signal for an analog meter and what I would have suggested if he did not beat me to the punch.
Sign In or Register to comment.