Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Mastermime on October 14, 2012, 10:07:13 AM

Title: Designing a controller system
Post by: Mastermime on October 14, 2012, 10:07:13 AM
Hello everyone,

I am designing a controller system for my search and rescue robot.  I'll start off by stating the requirements:

- Robot controlled by Logitech joystick http://www.logitech.com/en-us/gaming/joysticks/extreme-3d-pro (http://www.logitech.com/en-us/gaming/joysticks/extreme-3d-pro)
          - Servo control for panning camera
          - Directional control (forward, backward, turn left, turn right)
          - Turn LEDs On/Off
          - Turn motors off (relay on robot connected to 5v signal to keep activated, when there is no signal, the                                motors shut off)

- Live video display on LCD

- Output of sensor results from robot ie temperature sensors, battery level (voltage divider connected ADC on Axon II)

- Xbee data transceiver (simple serial)

- Video Receiver


Would it be possible to use a Raspberry Pi to process the joystick commands and send them through the Xbee and output the sensor results on the LCD?

Thanks
Title: Re: Designing a controller system
Post by: waltr on October 14, 2012, 10:39:31 AM

Would it be possible to use a Raspberry Pi to process the joystick commands and send them through the Xbee and output the sensor results on the LCD?
Yes you could. Look at Adafruit's web site for P-pi tutorials for serial communications to the XBee.

From what I've read on the R-pi, it has good build-in video hardware so study which display would be best (it has composite video, VGA & HDMI outputs).
Title: Re: Designing a controller system
Post by: Mastermime on October 17, 2012, 02:15:14 PM
Actually instead of a joystick, I am going to use a Playstation controller.  Should I buy a PS2 or PS3 controller or does it matter?

Also is it possible to output data from the Pi on a small corner the LCD, but also the live video video on the LCD?  If so how would do this?

Below is a schematic of my circuit.  Tell me if you guys see any issues with it.
Title: Re: Designing a controller system
Post by: Gertlex on October 17, 2012, 09:25:02 PM
One small thing I see is that you'd probably want a regulated supply to the display rather than the straight voltage from a 3S LiPo.  I'm assuming LCDs don't use 12V, but I could be wrong as I don't speak from experience.
Title: Re: Designing a controller system
Post by: Mastermime on October 17, 2012, 10:43:58 PM
Quote
One small thing I see is that you'd probably want a regulated supply to the display rather than the straight voltage from a 3S LiPo.
Yeah that would be a good idea to get a regulated 12v. 

Quote
I'm assuming LCDs don't use 12V, but I could be wrong as I don't speak from experience.
Actually when I was looking at some LCDS, they all said they required 12v
Title: Re: Designing a controller system
Post by: Gertlex on October 18, 2012, 12:00:06 AM
I'm so used to everything except servos/motors being 5V or 3.3V that I just wasn't expecting that. The data sheet is right far more often than I am :)
Title: Re: Designing a controller system
Post by: Mastermime on October 21, 2012, 04:47:25 PM
I've decided I'm going to use an Arduino instead of a Raspberry Pi.  What's the best Xbee shield for the Arduino Uno?

 I'm not too familiar with shields on the Xbee.  Can you have more than one?  For example, if I wanted to use this http://adafruit.com/products/772 (http://adafruit.com/products/772) and an Xbee, how would I do this?
Title: Re: Designing a controller system
Post by: waltr on October 21, 2012, 06:55:42 PM
There would be no reason to have more than one XBee on an Arduino (Ahhh...just looked at some daul 'Bee' shields and realized that there are other RF modules that use use the XBee connector fotprint, like Bluetooth. So a daul XBee shield does make sense). Or do you mean more than one shield on an Arduino.
I'm not real familiar with the Arduino shields but thought that they are designed to be stacked. Of course one would not stack another shield on top of the LCD display.
Depending on the antenna used on the XBee, look for a XBee shield that has connectors on the top to plug in the LCD shield and does not use any of the pins required for the LCD.
Title: Re: Designing a controller system
Post by: Mastermime on October 21, 2012, 07:18:57 PM
Quote
I'm not real familiar with the Arduino shields but thought that they are designed to be stacked. Of course one would not stack another shield on top of the LCD display.
Depending on the antenna used on the XBee, look for a XBee shield that has connectors on the top to plug in the LCD shield and does not use any of the pins required for the LCD.
This is what I meant (not stacking Xbees  ;D)  I am using the Xbee Pro XSC, which has a wire antenna.  I'm not real sure how antennas work, but it would seem logical I could extend the antenna by soldering a longer wire to the existing smaller wire.  Which is better solid or stranded wire?
Title: Re: Designing a controller system
Post by: Gertlex on October 21, 2012, 08:09:47 PM
Depending on your flexibility, this might be an option: http://www.trossenrobotics.com/p/arbotix-commander-gamepad-v2.aspx (http://www.trossenrobotics.com/p/arbotix-commander-gamepad-v2.aspx)

Basically it's an Arduino with a shield... Shield has joysticks + buttons + xbee. And it has nice lasercut plastic + standoffs for grips.  It uses a nicely documented communication protocol.  I've had no problem using this protocol with Axon and Wixel boards, and it of course works great with the Arbotix board too...
Title: Re: Designing a controller system
Post by: Mastermime on October 21, 2012, 08:25:55 PM
Quote
Depending on your flexibility, this might be an option: http://www.trossenrobotics.com/p/arbotix-commander-gamepad-v2.aspx (http://www.trossenrobotics.com/p/arbotix-commander-gamepad-v2.aspx)

Basically it's an Arduino with a shield... Shield has joysticks + buttons + xbee. And it has nice lasercut plastic + standoffs for grips.  It uses a nicely documented communication protocol.  I've had no problem using this protocol with Axon and Wixel boards, and it of course works great with the Arbotix board too...
Thanks for the suggestion, but that's a bit out of my price range.  I think you may have misunderstood me, but I am using the xbee as communication between the robot and a controller, not the controller and the controller MCU.
Title: Re: Designing a controller system
Post by: Gertlex on October 21, 2012, 09:16:34 PM
That is a controller for sending information to a robot via xbees.  It's got the Arduino built in, which has some default programming, and like any Arduino can be reprogrammed, or taken out and used for a separate project at a later point.  I have no idea what you mean by 'controller and controller MCU.'

I imagine it to be cheaper than playstation controller + Arduino + xbee shield. But that assumes you don't already have a playstation controller and/or Arduino.

Obviously my suggestion does not handle the LCD desired.  I personally have no experience with a video transmitter connecting directly to a standalone(?) LCD.  Closest I've done is a wireless IP camera's video being viewed on my laptop.
Title: Re: Designing a controller system
Post by: Mastermime on October 22, 2012, 05:35:47 PM
Quote
That is a controller for sending information to a robot via xbees.  It's got the Arduino built in, which has some default programming, and like any Arduino can be reprogrammed, or taken out and used for a separate project at a later point.
Oh I misunderstood the description.  I prefer the Ps2 controller for documentation purposes and the overall look of the controller.  Thanks for the suggestion though.

Has anyone had any experience with this board,http://www.ladyada.net/make/xbee/index.html (http://www.ladyada.net/make/xbee/index.html)

If you have, do you know if its compatible with the Xbee XSC Pro and would it work for what I'm doing?
Title: Re: Designing a controller system
Post by: Gertlex on October 22, 2012, 06:09:31 PM
With that board, you might find that the capacitors get in the way of the XBee Pro XSC's extended PCB size (Pros are larger than the regular Xbees). The controller I recommended has that problem too... (just recalled that problem, whoops)

I've not used that particular board, but this is kind of the definitive thread on xbee-boards: http://www.societyofrobots.com/robotforum/index.php?topic=9790.0 (http://www.societyofrobots.com/robotforum/index.php?topic=9790.0)
Title: Re: Designing a controller system
Post by: waltr on October 22, 2012, 06:43:40 PM
This is what I meant (not stacking Xbees  ;D)  I am using the Xbee Pro XSC, which has a wire antenna.  I'm not real sure how antennas work, but it would seem logical I could extend the antenna by soldering a longer wire to the existing smaller wire.  Which is better solid or stranded wire?

Do not extend the wire antenna on the XBee. The wire antenna is a 1/4 wave vertical and is tuned to the XBee's frequency.
The Audriuo Xbee shield should have the antenna end of the XBee away from the 'stacking' connectors.
I did try some searches for XBee shields but couldn't find the ones I believe I saw a few years ago.
Just found this image that show how the wire antenna protrudes past the display shield:
http://www.arduinodev.com/start-playing-with-xbee/ (http://www.arduinodev.com/start-playing-with-xbee/)



Title: Re: Designing a controller system
Post by: Mastermime on October 22, 2012, 08:06:40 PM
Quote
With that board, you might find that the capacitors get in the way of the XBee Pro XSC's extended PCB size (Pros are larger than the regular Xbees). The controller I recommended has that problem too... (just recalled that problem, whoops)

I've not used that particular board, but this is kind of the definitive thread on xbee-boards: http://www.societyofrobots.com/robotforum/index.php?topic=9790.0 (http://www.societyofrobots.com/robotforum/index.php?topic=9790.0)

Very true.  I didn't notice that.  Good observation.  Edit *I read on the Adafruit website that they replaced the 100uf capacitor with a smaller 47uf capacitor*  I might just try and deal with the development board I purchased a while back.  It's called the Xbib-U-Dev.  Here is an image of it http://tinyurl.com/8tylpzf (http://tinyurl.com/8tylpzf) and here is a link schematic http://ftp1.digi.com/support/images/XBIB-R%20schematic.pdf (http://ftp1.digi.com/support/images/XBIB-R%20schematic.pdf)

*By the way, the same board is used for both transmitting and receiving?*
It's a very complicated board.  I made connections from this board to my Axon II at 'Vcc' (to 3.3v on Axon), 'Dout' (to receive on Axon), Din (to transmit on Axon), and then Gnd of course.  These connections were made on the solder pads in the upper left portion of the board (take a look at the image) 

Do you think these are all the connections that have to be made?

Quote
Do not extend the wire antenna on the XBee. The wire antenna is a 1/4 wave vertical and is tuned to the XBee's frequency.
The Audriuo Xbee shield should have the antenna end of the XBee away from the 'stacking' connectors.
I did try some searches for XBee shields but couldn't find the ones I believe I saw a few years ago.
Just found this image that show how the wire antenna protrudes past the display shield:
http://www.arduinodev.com/start-playing-with-xbee/ (http://www.arduinodev.com/start-playing-with-xbee/)

Oh I see, thanks.  That would've been a huge mistake.


Thanks for the help everyone.  Much appreciated  :)

EDIT:  Uggh.. Now that I look at the schematic, I see those are the diagnostic pads.  I'm probably better getting new boards unless anyone can figure out how to connect this board to a MCU rather than a computer (only information I'm finding is instructions to connect to a computer)
Title: Re: Designing a controller system
Post by: Gertlex on October 22, 2012, 10:40:06 PM
Re: connecting to MCU: With four different xbee boards that I've used, I've only ever needed to deal with the 5V, GND, TX and RX pins.  For working with the axon, make sure the board you get does the 3.3V to 5V level shifting for you (the one you linked DOES do this, so it's fine).
Title: Re: Designing a controller system
Post by: Mastermime on October 22, 2012, 10:51:29 PM
If you are talking about Xbib-U-Dev, do you know where to make the connections then?  It said in the schematic that the solder pads I soldered to were just diagnostic pads
Title: Re: Designing a controller system
Post by: Gertlex on October 23, 2012, 09:08:37 AM
The DIN and DOUT pins on the xbee go to TXD-232 and RXD-232... But I'm not sure you can connect 5V UART (TTL or TTY I forget which acronym..) to either of these.  The small boards do level shifting of the DIN and DOUT pins.  Someone else who actually understands UART/RS232 nuances will have to provide you an answer.
Title: Re: Designing a controller system
Post by: Mastermime on October 23, 2012, 06:17:11 PM
I decided to just buy the Adafruit boards and be done with it