What is after the first 1. 2. 3. 4. steps ?
|
Arduino Info USB/FTDI programmer Add libary Remove libary RF transmit / Recive 315 or 433 Mhz CD4051B - 8 port analog multiplexer 74hc595 - 8 port shift register - output 1-Wire ® Temperature (DS18B20) i2c bus + scanner i2c Barometric Pressure + Temp(BMP085) i2c LCD 1602 Display SingleBus Temperature + Humidity(DTH11 + DTH21 + DTH22) |
Arduino extra analog input with CD4051B - 8 port analog multiplexerI had to use more than 8 analog inputs to a project, and desided to play around with analog multiplexers Otherwise i had to use an expensive Arduino, with more analog inputs. But if you just whant a digital I/O the you can choose mcp23017 or shift registers.
Recommended standard reusable hardware
Use donate button if you like my guides, or if you want a new guide ( See missing work ). Datasheet CD4051BE Here my test setup, with 8 to 1 analog input (using 1 analog input and 3 Digital outputs) You can exted this guide in varius ways, i include some samples at the bottom. Here is my sample code. I shift the bits on the multiplexer and read the value, with no delay. I get the right values, if you put in a small delay (2 ms) before reading - it may be bether. Arduino sample code I use putty as console debugging putty or Direct download my server (v0.62) I discovered that i runs more stable than the build in version Here a example to get 32 analog input using only 4 analog inputs and 3 digital outputs If you scale it up using all 8 analog input on this board you get 64 analog input still using only 3 outputs. But you can get more analog inputs - You chose the number !!! Here a example to get 64 analog input using only 1 analog inputs and 6 digital outputs If you scale it up using all 8 analog input on this board you get 512 analog input still using only 6 outputs. If you whant to save digital output, you can make it with shift registers. And only use 3 digital outputs. |