SparkFun Forums 

Where electronics enthusiasts find answers.

By cosmicray
I have a need to drive a control line on an external piece of equipment. After some investigation, I now understand the control signal that I need to generate. There is one wire that needs these values (constant DC, until I want to change state) with respect to ground:

high - approximately +2.5 volts. This appears to be the default floating value, so if my output is high-Z with no voltage generated or sinking, I believe it would be acceptable.

zero - approximately ground, or sinking a few mA to pull the line low. The standard 'plug' that comes with the device shorts the input to ground to make this happen.

low - approximately -2.5 volts. This value was unknown, but discovered empirically. It was known that the device had a third state, and corresponding control value, but not documented. This is the value that I am trying to envision how to generate.

I have been looking at various 'charge pump' chips (e.g. Microchip TC7660), but I'm not sure how to get the 3-state output from them. I have also looked at a tech write-up at Digikey, on 'Generating Negative Output from Positive Input Voltage' using a synchronous buck regulator. I keep trying to visualize how to use these designs to get the 3-state output that I need. Could someone please nudge me in the correct direction to get to the proper design.

Whatever design I end up with, would need the 3 states controlled from a couple of output lines on a MCU.

By lyndon
You're going to need a 3-way selector of some kind. A 4051 multiplexer powered by +5V & the -2.5V from the 7660 should work. Then on the first 3 inputs to the 4051, you have +5, -2.5, & ground. Two address bits to select from the MCU, feed the output into your control line and you're golden.

I would not try to switch the 7660 on and off quickly. The old ICL7660 would get into some nasty CMOS latchup situations if the load came up faster than the V+ supply, IIRC. Don't know if newer versions perform any better. Probably not.
By cosmicray
Thanks ! I was unaware of the 4051/4052/4053 series of multiplexers. I'm leaning towards using one of the 3 selector lines to choose a value (ground or negative voltage) and using the inhibit pin for when I want the positive (default floating) input.
By Mee_n_Mac
I have a need to drive a control line on an external piece of equipment.
Can you describe said equipment ? That it needs -2.5V sounds ... not quite right. It's sounds (mebbe) like a bi-directional current loop.

Just curious ...
By cosmicray
It's an external 13V-15V battery charger / power source. It comes in a variety of amperage capacities. The internal circuitry has a small jack on the rear, which is used either with a dumb plug (basically shorts one pin to ground) or an optional semi-smart controller. The controller monitors the voltage being supplied to the batteries, and (based on hard wired time constraints) commands the charger to emit 13.6V, 14.2V or 14.8V.

The 14.8V trigger has been a mystery, until a few days ago. My original theory was that it wanted to see a 5V, or 3.3V signal, but those did nothing (other than slightly depressed the voltage being produced). On a wild hunch, I took two AA batteries and wired them up reversed so that I supplied -3V to the control line, and bingo, the output voltage jumped up to 15V.

If this a current loop, that has not been something that I considered. Any other was to differentiate what is really happening ?

ETA: I'm reasonably sure, there is little (if any) regular digital electronics inside this device. What I'm dealing with here is mostly analog circuits (which may explain the odd voltages).
By cosmicray
Some measured data ...
when I short the control line to ground (changes output from 13.6 to 14.2V), the current thru the control line is 22 uA.

When I apply a single AA battery to supply -1.5V on the control line (changes output from 13.6 to 14.6V), I measure 44 uA on the control line.

Using 2xAA batteries to supply -3.0V (changes output from 13.6 to 15.0V) measured current is 61 uA.

Whatever is happening, it is a low current signal.