Let's Make Robots!

8 ADC inputs Need Slave Chip

****UPDATE****

It looks like I am going the brain/ multiplexer route here and will make the ultimate line-follow sensor of death. Led's will be off of PWM for brightness control, white/black threasholds will be adjustable and now I have decided that adjustable pull-up resistors would be handy too. I figure that a simple trimmer pot connected to the common of my resistor array would do the trick, but I would not mind some feedback on the issue. I have added a second video with an explaination. Thanks in advance.

 

**Original Post***

I have been plugging away at my line follow sensor and my related I/O expander issue and have hit a bit of an impasse. My original idea of using a digital I/O expander to keep an eye on all 8 sensors has fallen-through and in hindsight, was probably not the way to go in the first place. As it stands now, I have a simple problem of reading 8 IR sensors via ADC without using 8 pins on the main microcontroller. I simply need a support chip to sit on the line follow board itself and communicate with the main brain. Here are my requirements:

  • Must speak UART serial or preferably I2c
  • Must have a minimum of 6 ADC's preferably 8 --I really want 8
  • Must be smaller than a 28-pin dip (a full-size arduino will not fit --I can use a SMD atmega 328 though)

The main options in my mind are an Arduino 328 or a Picaxe 18m2 (or something else). The arduino, even in SMD form, is a little cheaper than the picaxe but only allows for 6 ADC inputs. There are 8 ADC pins on the SMD version, but I have yet to figure out if I can get a hold of them. Whether I can or I can't, I am still going to loose 2 of them if I want to use the I2C lines (my preference).

The next choice is the Picaxe 18m2 which has a ton of ADC's (more than I need) and is only about $.50 more than the Arduino. This so far, seems to be the option I want to use, but alas, the picaxe has no provisions to become a I2C slave. It can actually, but unfortunately  only to access it's memory functions (when in I2c slave mode, the picaxe becomes a fancy EEPROM really). This puts me back to using UART serial again which I would prefer not to do.

One more: I cannot use any of the MCP320x chips (which would solve all my problems) as they are SPI and the new Picaxe chips don't speak SPI. Arrggg.

At this point, I open the floor...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
What about a SMD sanguino?

Maybe --that is a atmega 644 right? --Googling now...

Looks like somewhere around $7 minimum up to around 15 bucks for the chip. Plus, I have to bootload it. Not to mention, that is a TON of chip for such a simple task. Nope. Shucks.

http://www.arduino.cc/playground/Learning/4051

3 digital and one analog pin gives you up to 8 analog inputs. Easy to code, no need to waste a UART.

 

 

 

Hey Chris,

Someone in this site suggested an analogue multiplexer to me some time ago. I can´t remember who it was. Sorry (if you are reading). I pass on the suggestion to you. It was the CD4097B. It has 8 channels and comes in a 24 pin IC package. I can´t remember about I2C, however.

Hope this helps.

PS: Remember to read the datasheet before soldering... (sorry, I couldn´t resist the temptation! :P)

Andrés

Yup, I have my tiny soldering tip and my flux pen all ready! Some of the SMD parts I ordered are actually starting to come in now. I am getting excited. And yes, I will follow the rules when soldering these guys...  :)

Mouser has this guy for $.51 in an SMT version. I think I like this. I tell ya, one of these 4051's, a SMD Atmega 328 and I got myself one fancy (and smart) line-follow board --Not to mention, I get the I2C I wanted.

Nice work, Cliick --Thanks

A quick search led me to this: http://docs-europe.electrocomponents.com/webdocs/0c95/0900766b80c9530d.pdf

An 8 ADC to I2C chip... looks to me what you need... 2.5-3 euros, so about $4 ;)

Yup, that is the nightmare chip. I have it, I have tried it, it is just way too complicated to communicate with. I could not imagine the tutorial needed to get a picaxe person through this guy...

Are you sure you want to give up on the ADS7830? Did you post anything on the issues you ran into? The chip doesn't look to shabby, and could be quite useful if you could get it going. Aside from that, an MSP430 chip might work out.  :D ...but I digress.....I hesitate to recommend using a proc actually for doing this sort of thing, I'd just get that support chip working....

EDIT: I haven't looked, but you really can't do spi with the new chips? You could always do it bitbang style, they have the source in the manual for it....shiftin/shiftout I think it was...