Author Topic: Raspberry based project, sensors and switches (a/d) board suggestions  (Read 1448 times)

0 Members and 1 Guest are viewing this topic.

Offline cgrenierTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Hi, I'm currently planning my first robot and decided to go for a Raspberry Pi as the platform, and take advantage of I2C to deal with expansion boards. I'm now shopping for an digital / analog data acquisition board that would fit the bill.

I found 2 products that I guess would do what I want, and hope to get your opinion on the subject:

http://www.web4robot.com/RoboticBoard.html

http://www.seeedstudio.com/depot/electronic-brick-shield-v4-p-458.html?cPath=190

The first one seems to be a melting pot of goodies, only thing I fear is 8 input channel total would fall short for future needs... Any thoughts ?

The second one seems to have lots of room for future needs, but my lack of knowledge prevent me to understand if it will work for me (I think Arduino is using 5v i2c whereas RasPI is using 3.3v so if my comprehension is good I would need a logic level converter circuit on the way, but beside that, would it do what I think ?)

Any other suggestions on what would do the trick ?

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,935
  • Helpful? 98
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #1 on: August 31, 2012, 05:31:06 PM »
The first board has a processor on it assumingly to take care of the low level functionality of the motor driver, etc.

The second board just brings out all the IO pins from an Arduino to what they call "bucked" connectors with have the signals plau power and ground pins. I don't see how this board would be an advantage to use with the Rasberry Pi board.

I think something like one of these are what you want (found by googling "raspberry pi expansion board"):
http://www.raspberrypi.org/archives/1521
http://liliputing.com/2012/08/raspberry-pi-gertboard-expansion-board-coming-soon.html
http://www.geek.com/articles/chips/raspberry-pis-gertboard-expansion-board-already-works-video-2012019/
http://www.cnx-software.com/2012/08/03/raspicomm-raspberry-pi-expansion-board/

Or design and build your own.

Offline cgrenierTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #2 on: September 01, 2012, 07:42:45 AM »
Thanks for the input Waltr, so the second board is out of the game. As per the "RoboticBoard" what I like about it is the capacity to connect sensors so the Raspberry can deal with the data, but I would have liked more available channels. I may have to calm my ambitions and still go for that as the solution for my first project and adjust as I become more versed to robots.

Also, in the meantime I found this:

http://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi

That would flirt with your' build your own' idea while being simple enough for me to tackle... (I don't consider myself proficient nor knowledgeable enough to design it myself, and since the plan is to build a robot with my son as a hobby, not willing to invest that kind of energy in this unique part of the project, but I'm willing to hear suggestions)

While googling for 'i2c adc 8 channel raspberry' I found this:

http://fr.hobbytronics.co.uk/adc-i2c-slave
https://tindie.com/upgradeindustries/adc-x-add-on-for-boardx-8-channels-i2c/
http://www.robotshop.com/8-ch-12-bit-i2c-analog-digital-converter.html

How hard would it be to use one of these for my project ?
« Last Edit: September 01, 2012, 07:56:26 AM by cgrenier »

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,935
  • Helpful? 98
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #3 on: September 01, 2012, 11:24:21 AM »
That's a nice little break-out board from adafruit. It just translates the connection on the R-Pi to a 0.1in header that plugs into a proto-board or a standard 0.1" socket.

For servos you just need three pin connector (same type as servos) that connect two pins a +5V and ground buss that can supply the current requires of all the servos. Then a third pin that is an output from the processor or IO bus. The number of servos you can physically connect depends on how many IO pins are available.

All the I2C ADCs would work. The first is just the chip so you would need to wire it or make a PCB. The second is a nice compact configuration but only 8-bit resolution (is this enough for your needs?).
The third has 12-bit resolution and will plug into a proto-board. A full data sheet and example code is also available and it uses a good ADC chip so this one is my choice of the three.

Since you are just starting out with the R-Pi and electronics don't go for having everything you think you'll need. Once you learn a good bit more you'll find that those needs do not match the requirements.
So for now an 8ch ADC should be plenty to learn with.

Offline cgrenierTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #4 on: September 02, 2012, 07:35:44 AM »
Cool, so if my comprehension is accurate I would have to install the http://www.robotshop.com/8-ch-12-bit-i2c-analog-digital-converter.html on a breadboard and just use the surrounding holes to connect wires to the i2c bus, sensors and such without adding circuitry (Don't worry, I will make sure to do my homeworks properly before asking on the forum at every step of my project when time comes, I just don't want to buy something that will end up useless cause I didn't confirm with someone more knowledgeable ;-)

Regarding http://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi the tutorial seems to show how to build a simple enough circuit including an ADC and connect it to Raspberry PI. Although this chip does not interface with I2C I thought it would be a suitable solution, but I will be glad to hear your opinion.

Thank you again for your help,

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,935
  • Helpful? 98
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #5 on: September 02, 2012, 10:59:45 AM »
Yes, that would be a good way to go to learn how to use the I2C ADC board.
When you get to building it into a robot you can connect the two heard with connectors to wire to the R-Pi and your sensors. If space is tight you can remover (un-solder) the header pins then solder wires directly onto the board.

The MCP3008 chip in the Adafruit tutorial uses an SPI serial interface to connect with the R-Pi.
Where I2C uses 2 wires +gnd, SPI uses 4 wires +gnd. Google these to learn more and the advantages and disadvantages of each.

Have you looked at all the goodies Adafruit has for the R-Pi?
http://learn.adafruit.com/search?q=Raspberry+Pi
Do look and read all of their tutorials.
« Last Edit: September 02, 2012, 11:05:18 AM by waltr »

Offline cgrenierTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #6 on: September 02, 2012, 09:00:26 PM »
Great, I actually guessed I could use it with jumper cables directly without breadboard if needed. Thanks for making that clear.

Regarding the things I think I'll need, I plan to keep it simple(ish) and have a Servo controller (to move the robot) and an adc (to acquire data) connected to the Raspberry PI through i2c. I guess that between that and a handful of sensors I can keep myself busy for a moment coding and testing, lol.

I guess I'm not done asking questions here, hope to post some results soon though ;-)

Offline cgrenierTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #7 on: September 03, 2012, 10:06:21 AM »
Also while researching that stuff I stumbled upon some reference schematics for a ADC chip and I begin to think it's not that terrible.

http://www.analog.com/static/imported-files/data_sheets/AD7997_7998.pdf

I think I'll order both the one you recommanded and an AD7998 so I can obtain result quickly with the prebuilt solution and test the chip as a side project so I learn some more stuff. Any pitfall i absolutely need to avoid so I don't toast my Raspberry PI ?

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,935
  • Helpful? 98
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #8 on: September 03, 2012, 10:36:49 AM »
I don't think you want the AD7998. This is in a TSSOP package which is very small and very, very hard to hand solder. Look at the dimensions of the chip and lead spacing near the end of the data sheet.

You are better off for now to stick with DIP packages that can be plugged into a protoboard.

Or buy those small chips already soldered onto a breakout board like what SparkFun sells.

Offline cgrenierTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Raspberry based project, sensors and switches (a/d) board suggestions
« Reply #9 on: September 03, 2012, 04:24:49 PM »
Oh, right. Thanks for pointing that ;-)

 


Get Your Ad Here

data_list