Or perhaps I just have made a boneheaded electrical mistake? I tried to create a diagram in Fritzing but that got difficult with the extreme lack of parts in the palette but I did attach a crude example of my Arduino tied to the 4051 and a generic voltage regulator. I did succeed in drawing a simplified EagleCAD version of the voltage reference circuit and how I connected it to the CD4051 chip.
Goal:
I wanted a battery powered circuit that could deliver ten voltages from a relatively precise 5V or 3V regulator. This was a prelude to working with using a 4051 for multiplexed sensor inputs. I wanted to characterize any distortions introduced by putting the 4051 into my circuit.
I built up a 10 step voltage divider circuit with the following parts:
- 10 sorted/binned 220 Ohm metal film resistors (total spread of 0.8 Ohms after binning)
- 9V battery source with switch
- 9V feeds through a schottky diode (reverse polarity protection due to bare wire connectors on board)
- ...feeds through an LM7806 voltage regulator (this was a hack to fix Vin limits on my MCP1700 LDO voltage regulators)
- LM7806 Vout feeds to MCP1700-50 (5.0 volt) and MCP1700-30 (3.0 volt) regulators. They have quiescent current in uA range so I don't care both are active all the time.
- A SPDT switch selects whether 5 V or 3V is sent to voltage divder
I routed 8 of the outputs to a 4051 hooked up to my Arduino Uno. The grounds of the battery powered circuit are tied to the Arduino's ground. Output of the MCP1700 was connected to Arduino AREF pin and set EXTERNAL reference in my code. Here's where it gets weird. Per the Arduino example for using a 4051 (see
http://www.arduino.cc/playground/Learning/4051), I tied Vee, Vss, and INH to ground. Vdd was connected to 5V supply from Arduino. The Arduino code saw ~2.8V after conversion. If I unplugged the Arduino from USB port (i.e. it should have powered down), the power light stayed on. 2.8V were backfeeding through the 4051 Vdd pin into the Arduino 5V pin.
I started probing with my scope while the Arduino provided the 5 V Vdd and and clearly saw on Xout the 0V, 5V and half-volt steps as the Arduino cycled channel select pins A, B, C. The steps were clean with no ringing or unstable values. The Arduino continued to see ~2.8V on A0 regardless of which 4051 channel was selected. When I switched to the MCP1700-30, the Arduino worked as expected, showing at most 2 LSB from expected values.
I checked and rechecked my circuit layout and probed the voltage reference board (no problems) and the voltage reference board connected to 4051 but not to Arduino. If I left every pin connected from the voltage reference board to the 4051 (including ground) but left Vdd floating, I saw that same 2.7 - 2.8 V value on the Vdd pin.
Questions:
- What is the real relationship between Vdd, Vee and Vss on the 4051? This is my noobness showing through.
- Is the Arduino Playground linked article correct in tying Vee and Vss to Gnd for 3V and 5V signals?
- How does voltage on a channel bleed back to Vdd?
- How does one supply Vdd = 5V to a CD4051 if I'm connecting it to an Arduino? I assumed that simply tying my Arduino, CD4051 and voltage reference (since it is battery powered) grounds together should have not caused any power issues.