Asked — Edited

How To Add More Digital And Analog Ports Tutorial

Started this post on how to add more digital and analog ports to your EZB without losing speed or spending over $70 for another EZB

EDIT 3-31 ITS $69 FOR EZB and to usa its $25.56 CHEAPEST rate without tracking to other countries its a lot more. BOARD COST for circuit is under $3

BUT in my post there is disadvantage and advantages of both ideas ,EZB and multiplexer circuit

                            PART ONE ANALOG MULTIPLEXING

Analog multiplexing is using only one ADC port and have more then 16 analog inputs and depending on analog ports needed will depend on how many digital ports are used to switch it

VERY simple circuit only one chip under $1 will post a schematic up in a day or 2 and part # of the chip

Its analog switch so it very fast ,not much coding is needed ,not like using 2 EZB and have to pass info back and forth using bluetooth or USB or wifi

Analog ports the EZB only has a few,and needed for analog sensors or other boards like battery monitor ,or current on digital there is more then twice as much

PART 2 will be digital multiplexing PART 3 will be using I2C bus


ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.

#1  

HERE IS THE CHIP and in a day or 2 can show you how to easy hook up to EZB ,right now in china so i c an make the super simple circuit ,but all is needed is the chip ,.1 mfd bypass cap and thats it on perfboard its CD4051 Here is one link on the price $.52 cd4051 analog multiplexer and the circuit of the chip

User-inserted image

as you can see pin 3 goes in ADC port and 11,10,9 is digital ports ,dont need 3 digital ports unless you need 8 inputs

Another item about using a chip like this ,if a analog port on EZB is not protected from over voltage you lose $70 or more, on this chip only $.51 so you get the more speed,more ADC ports ,ultra low cost and protection of over voltage

#2  

looking forward for the next parts of this project. i am wanting to use it with the polulu ir beacon

#3  

PART 2 GETTING MORE DIGITAL PORTS

this one is hard and 2 ways to do it one is using logic chips

You need TWO CD4066BE $.48 and 1 CD4555BE address chip to get bi-directional data and 4 digital I/O pins to get 8 digital I/0 ,now there is a way to use only 5 digital I/O and get 16 digital I/O'S

PART 3 will be using digital I/O to I2C buss

WILL put up a SCHEMATIC up soon of the circuit

cd4066 datasheet

cd4555 datasheet

#4  

PART3 using I2C PORT

TO get more digital I/O ports there is a very common chip called PCF8574 that has 8 inputs andd fairly easy to use.

pcf8574 i/o expander

chip is $1.64 or ebay has a board from china for $5

pcf8574 i/o expander digikey

pcf8574 i/o expander ebay

NOW for analog the chip is MAX127

8 INPUT A-D CHIP $22

MAX127 8 INPUT A-D CHIP

Pretty soon i will be back home from my work trip and will make the boards

ALSO we be putting up other electronic circuits to help the EZB GET A LOT BETTER

LIKE a tracking microphone i made and only need to charge arduino code to EZB code

#5  

Here is another chip thats cheap and add 16 analog or digital I/O to EZB using 5 lines CD4067 it uses 1 I/O and 4 control lines so in digital you will have 20-5 +16 =31 digital I/O total on analog you will have 8 - 1 + 16 = 23 analog inputs

Speed is same and faster then connecting 2 or more EZB

SOON AS i get home will build all the boards of the circuits i mention and schematic and truth table

#6  

Thanks Fred,

I am looking forward to this. I will have an application for it later on in my build.

Rex

#7  

REX will have the design up after easter,i will return from my trip friday night and build the boards monday and take photos.

COST is well under $3 only a chip,radio shack board and few pins or connectors.

Code is very easy using a truth table using BCD

Will make all designs that day.

#8  

Cool thanks.

One of my favorite chips to use is 74154 (4-line to 16-line decoder/multiplexer)

SN74154

I also like the CD4066.

What's the weather like in China? In what part of China are you staying?