hi,
I want to read 3x13 status leds by sticking fotocells on them (long story). My assumtion is analog multiplexer and I got myself 3x a HI3-506A-5 to connect to an Arduino Mega.
Digital out pin 30-33 control the address lines (orange in the diagram) - rather than doing this 3x and use 12 outputs I thought of putting this in parallel. However not being too ambitious I'm trying 1 first.
The output of the multiplexer goes in analog in 7 (white line). The input (blue wire) goes in the different inputs of the chip and comes from the photocells (only 4 shown for readability). I thought one resistor is enough as the chip exposes only one photocell at a time so I put one on the output of the chip no need to put a resistor between each photocell and the chip.
+5v powers the photocells and the chip (+5v and an enable pin) all shown with a red line and black for GND.
I put a LCD/keypad shield on so I can scroll through the inputs I want to read but it looks like I only get values for input 1.
My code looks ok - if I don't have anything attached to the mega and I measure the voltages on the out pins then I have the right combinations to select the right input. When I connect everything together the voltage on the output drops and I get only a reading for input 1 (it thinks all address pins are low). If I add a resistor on the outputs I have 5 volts but the multiplexer still doesn't seem to notice.
When I look at other multiplex projects I see the digital out going straight in the adress pins so I'm puzzled - questions:
- did I get the right multiplexer chip?
- what do I need for additional resistors? Is there a difference if I use one or 3 chips
- can the arduino power all this?
If you've read this far I owe you a thank you!
Jhh
datasheet.pdf (857 KB)