PDA

View Full Version : [Question(s)] Raspberry Pi



Robonaut
12-30-2011, 08:02 AM
I recently stumbled upon this website. http://www.raspberrypi.org/ They are releasing a credit-card sized computer board next month for 25 bucks. It seems to be very powerful (700 MHG ARM11) for it's size and I was thinking it may be a good canidate for "Robot Brain". This is the block layout they have on their site along with an image of the RaspBerry PI.

3701

I found it interesting that it has a "Camera In" port. Currently I use arduino based boards and I have ponder about using something a little more powerful. This would be a big change for me because it uses Linux for an OS. I found these tidbits on the FAQ page.



Will it run WINE (or Windows, or other x86 software)?
No.

What Linux distros will be supported at launch?
Debian, Fedora and ArchLinux will be supported from the start. We hope to see support from other distros later. We will be selling SD cards with the distros preloaded. (Sept 4 2011 – originally, this FAQ suggested that Ubuntu would be supported. Because of issues with newer releases of Ubuntu and the ARM processor we are using, Ubuntu can’t commit to support Raspberry Pi at the moment.)

Will it run <insert name of program here>?
In general, you need to look to see whether the program you want can be compiled for the ARMv6 architecture. In most cases the answer will be yes. Specific programs are discussed on our forum (http://www.raspberrypi.org/?page_id=43), so you might want to look there for an answer.

What are the power requirements?
The device is powered by 5v micro USB. You can read more about it here (http://www.raspberrypi.org/?p=260).

Can I run power Raspberry Pi from batteries as well as from a wall socket?
Yes. The device should run well off 4xAA cells.

Does the device support networking? Is there Wi-Fi?
The Model B version of the device includes 10/100 wired Ethernet. There is no Ethernet on the Model A version (which we expect to be taken up mostly by the education market), but Wi-Fi will be available via a standard USB dongle.

How do I connect a mouse and keyboard?
Mice, keyboards, network adapters and external storage will all connect via a USB hub.

Does the device support networking? Is there Wi-Fi?
The Model B version of the device includes 10/100 wired Ethernet. There is no Ethernet on the Model A version (which we expect to be taken up mostly by the education market), but Wi-Fi will be available via a standard USB dongle.



There are more FAQ's listed on their website along with a wiki that has a lot of info http://elinux.org/RaspberryPiBoard

(http://elinux.org/RaspberryPiBoard)Something else that caught my interest was the expansion board. Seems it will also cost $25. About all they say about it is:


It's a GPIO expansion board. Use it to flash LEDs on and off, drive motors, run sensors and all that other fun stuff.

3702

I posted this because I am interested in what folks think about it. Does it have potential to be a good robotic platform? Is there a better way to go? Does it look like it will run current robotic software? Does it have enough power? The price point looks decent.

ArduTank
11-23-2012, 01:42 PM
I plan to use this for my Arduino based Mech Warfare bot to control the system using remote desktop over Wifi.

SteamAutomaton
11-26-2012, 08:44 AM
Camera input, digital outputs, WIFI, low power. Now if it can control AX series servos. Hint, hint, hint.

jwatte
11-26-2012, 12:19 PM
It has USB. There exists USB to Dynamixel controllers. :-)

Although finding a camera that works for the input that's not just a bare lens+sensor seems to be impossible. You can use a USB camera instead.

Then you'll want a USB WiFi dongle (there's no native WiFi onboard, just wired Ethernet.) Which brings you to 3 USB devices, and only 2 ports. Which means you need a 4 port hub to attach it to :-(

It does have I2C and SPI, so something could possibly be built that controls servos without USB, but the I/O is 3.3V and *not* 5V tolerant, so that's additional circuitry.

SteamAutomaton
12-01-2012, 11:07 PM
It has USB. There exists USB to Dynamixel controllers. :-)

Although finding a camera that works for the input that's not just a bare lens+sensor seems to be impossible. You can use a USB camera instead.

Then you'll want a USB WiFi dongle (there's no native WiFi onboard, just wired Ethernet.) Which brings you to 3 USB devices, and only 2 ports. Which means you need a 4 port hub to attach it to :-(

It does have I2C and SPI, so something could possibly be built that controls servos without USB, but the I/O is 3.3V and *not* 5V tolerant, so that's additional circuitry.

From my understanding, they are trying to have a camera for the camera port. I am not sure if it is flat mounted or 90°.

jwatte
12-02-2012, 12:59 AM
I ended up with a hub anyway. Allows me to hook up a keyboard (and display on HDMI) for direct control, if nothing else.
Also, the same USB hub has one of the ports going out to power the Raspberry Pi itself. It's almost like the self-charging laptop :-)
(Except this hub is powered, from a 5V switching regulator hooked to the LiPo)

TXBDan
06-24-2013, 08:41 AM
So i recently picked up a Raspberry Pi and have been laying out the game plan for using it with the hex.

Software:
I'm running Raspbian with the WiringPi GPIO libraries. I'm programming in C using Geany as an IDE (until i setup something up on my PC, the Pi is still very slow running X). I'm doing floating point math for now.

Hardware:
Raspberry Pi is overclocked to full "Turbo" mode
D-Link DWA-131 USB wifi adapter (supported out of the box)
USB2AX Dynamixel driver (Robotis libraries with Xeve's one replacement file)
6 port AX Power Hub
6 port AX Hub
Xbee radio connected to UART (need to find a handy breakout board/mounting solution)
Belkin 4-port hub (doesn't upfeed power)
CC BEC for converting lipo/supply power to 5V for hub/electronics

Does it sound like I'm on the right track? Any tips or advice for moving forward with this?

Thanks!

KurtEck
06-24-2013, 09:25 AM
*** Warning *** - I am not a Linux expert, but have been playing around with RPI and BBBk and hopefully have learned a few things along the way. Mostly with the help of KevinO! I now have both the Phoenix code base as well as a simple Rover running on both platforms.

Both Kevin and myself have ported the Phoenix code base from the Arduino over to linux. His port uses floating point, while mine is still using integer math... Not sure which is better as RPI has floating point math support. Note: I am running the code on a Lynxmotion T-Hex robot that uses standard servos with an SSC-32 controlling the servos. His code base is running on a PhantomX with the AX18 (or 12) servos

My code base as well as notes is up on github\kurte\Raspberry_Pi

I do not have a USB2AX Dynamixel converter so I can not comment on this one. I do have a DFRorbot interface (http://www.robotshop.com/productinfo.aspx?pc=RB-Dfr-142&lang=en-US), which I have done a little experimenting with. Keep meaning to get back to it. Will probably order one of the others at some point.

Sounds like you are on the right track. I have code in my code base to handle things like the Arbotix Commander over XBee. I make use of having Symbolic Links setup such that I have the code talk to "/dev/ttyXBEE". I have this working for both USB connected xbees (which is what I am using on Rpis) as well as direct USART xbees (using on BBBk). This code also has option support for receiving Commander packets using Sockets over the Wifi... (Having some fun playing around). One thing I keep meaning to try on RPI is to connect the XBee up to the USART on the expansion connector of the RPI. Can probably directly hook up Rx/Tx. If you have an old Sparkfun XBee regulated adapter, you can probably hook it directly up to +5v for power. It did not do proper voltage conversion on it's Tx line so it would work fine (What I am using on BBBk). New ones do proper voltage conversion, so you would probably want to tap into the Tx line directly off of the Xbee...

I assume your Belkin USB hub is powered as the RPI does not output enough on the USB to run much... With some of mine what I have done is run the +5v into the USB hub, I then use a usb cable out of the hub to the RPI to power it, plus take a USB cable from the RPI to the hub. This works fine on some USB hubs, but did not work with Linksys one that had more smarts in it. It first detects power coming from the Host, before enabling power to the output ports...

Advice: start experimenting. I tried to keep a set of comments about what I tried and the like in the readme.md file part of the project I mentioned. This has helped me set up 2nd one, plus recover when the original SD card became corrupted.

Hope this helps
Kurt

TXBDan
06-24-2013, 10:12 AM
Thanks for the feedback. Yes, i was reading up over on lynxmotion about how you guys used the sym links to setup the devices so they wouldn't move around on the USB. That's really helpful.

Yep, the Belkin hub is powered. I originally got a cheap powered hub, but i noticed that it would apply power to the RPI itself through its USB ports even without the RPI's microUSB power connector being connected. I read up on and found that this is a bad thing so i found a recommended hub which doesn't do that. I'm also running a short microUSB lead from the hub to the RPI's power so that the power jack to the hub acts as a master power switch. So that works with this hub as well. I'll edit this and add the model number tonight.

Thanks for taking care of the Commander stuff for RPI. That will be very handy!

I finished my arduino hex code and it has all the basic functionality i need. walk, straffe, rotate, as well as bodyFK "dance" functionality. It can do tripod and ripple gaits which is enough for now. So i plan to start porting this over. I'm hoping the wiringPi libraries make this relatively easy as I'm not a strong proper C programmer. I barely scrape by using Visual Studios to do all the dirty work for me. But so far so good, I have LEDs blinking!

KurtEck
06-24-2013, 11:28 AM
Sounds good!

I did not worry about if the USB bled power back in on some of these as I am having the USB hub power the RPI anyway, so I am not sure if it is an issue or not.

I have not seen the winingPi library so I rolled my own. There is a library directory as part of my RPI/BBk project that has some simple stuff in it, like defines for the timing functions, plus I wrapper Serial class that I brought over from Arduino the Stream, Print classes, such that I could continue to use the same stuff like: Serial.print()... Also has some code to enable sound output generation as well as support for Espeak. It also has support for some other stuff, like for the Basic Micro Roboclaw (Motor controller)...

Now back to playing with Rover. Want to add some simple support for it to talk back over the socket to the code running on a PC...

Kurt

TXBDan
06-29-2013, 08:57 PM
Kurt,

I'm playing with your Raspberry Pi commander code and am having trouble. Basically i can't get the commander.begin to return happily. It's returning nonzero.

I'm using a UARTsbee with a header strip soldered onto it to give me access to the Xbee pins. I have this on a bread board and wired to the Pi using a Pi Cobbler. I'm wiring the Xbee to the Pi's UART pins. Pi's TX is set to output and RX to input using wiringPi.

When i power on the Pi, the UARTsbee lights up green happily and when i turn on the Commander Controller itself, i get the red TX/RX leds like i should. So i believe the two Xbees are communicating properly.

I basically just can't get commander.begin() to return happily. I'm sending it the ttyAMA0 device which should be correct for the Pi's UART. If i send it the wrong device i see a "Open Failed". I'm not getting that with the ttyAMA0 so i assume that much is ok. The other parameter is B38400. Just like in your Commander Test program.

Any ideas? Thanks

Also, its certainly possibly that my hardware setup won't work since i'm using the UARTsBee in sort of a strange way. the IO on the device is being driven but there is no 5V power for the FTDI stuff. I don't need that now, but i'm not sure what sort of interactions might be going on. I'll order a proper breakout board soon.
http://www.seeedstudio.com/wiki/images/d/d5/UartSBee_V4.0_Sch.png

KurtEck
06-29-2013, 09:44 PM
I have not used the Usart on the expansion header so I am only guessing.

My code tries to use /dev/ttyXBEE to talk to. On my Raspberry Pi's I have done this by using the mapping stuff to automatically assign this at boot time. (Instructions are in my Readme.md file of the Raspberry_Pi project. On the BBBk I am using Usarts that are part of that expansion header. On that one you have to do some other stuff to get those to work (again more in the readme). In that one I create the symbolic links at startup (I believe in the .profile) file. So the question is, did you create this link. Alternatively you could edit the code to point to the actual device...

Also if memory serves me correctly. on the Raspberry Pi, the ttyAMA0 is configured as the system console. If you wish to use it for something else. I vaguely remember that you need to update at least two places to free this usart up. I don't remember the exact details (but Google should find it). Maybe someone else remembers the details

Kurt

TXBDan
06-29-2013, 10:02 PM
Yep, i disabled the default UART console functionality so it should be free. I've changed the code to point to my device, ttyAMA0. I'll keep digging :)

KurtEck
06-29-2013, 10:22 PM
Do you have permission? Are you running on the root (pi) or your own user. If your own user have you added yourself to the appropriate group like dialout? Have you tried running the program under sudo does that help?

Kurt

ArduTank
06-30-2013, 12:45 PM
Have you disabled the startup output on the UART? Are your Xbees running at the proper baud? Are your UART connections flipped??

I have done a connection to an Xbee using the UART, and you have to disable the console and the output of the results of strtup on the console that is dumped to the UART.

TXBDan
06-30-2013, 07:06 PM
ah ha, got it! I was setting the TX pin to OUTPUT mode and RX to INPUT mode, but it turns out they need both be 'ALT0' mode. Kurt's CommanderEX code for Pi is working great.

My code is ported over and i think its all ready to go. I'm just waiting on the USB2AX to arrive. Well and wiring up the robot itself...

ArduTank
07-02-2013, 05:20 PM
The reason that fixed it is because putting them in input or output mode makes them a digital input or output, which don't support TTL serial communication.

TXBDan
07-06-2013, 08:29 PM
I got my USB2AX in the mail a few days ago and finally had a chance to mess with it today. Amazingly the code i had in place waiting for it worked and the hex is moving properly under Pi+USB2AX power. Sweet!

KevinO
07-06-2013, 09:21 PM
It's great isn't it! I was surprised how easy it was. I wish there was a US distributor for them.

TXBDan
07-07-2013, 10:12 AM
Yep. So far so good with parts scattered all over the table. Packing it all into the hex is proving difficult. I might end up just glue gunning everything down for now.

KevinO
07-07-2013, 10:46 AM
Take a look in my member gallery. I have pictures in there of how I mounted my raspi inside the hex. I was able to fit the Raspi, two hubs, a smps2dynamixel and a BEC inside the body frame. Take a look maybe it'll give you some ideas.