Raspberry Pi + MSP430 controlling Tamiya TT-01 RC car


12 posts
by Robo » Mon Apr 01, 2013 10:16 am
Image

http://i.imgur.com/LVMqyHp.jpg

Here's the video of it working:

http://youtu.be/plBGQRBN6Qo

The Pi is powered by an USB battery pack, the MSP430 is mounted on the breadboard, powered by the 3v3 GPIO from the Pi, commands are sent to MSP430 using UART. This all means there's very little wiring.

The Pi is setup as a wireless access point so devices can very easily connect to it, it runs a server listening to commands. I originally was going to make it run in WiFi ad-hoc mode, but access point is easier to connect.

There's no Arduino because Ti MSP430 is way cheaper and takes up very little space. A huge advantage is it can be detached from the development board.

Currently it's controlled by laptop, but it wouldn't be difficult to make an Android app for it.

The Tamiya TT-01 is way too fast for what I need to do, it gets to 60km/h, and 80km/h with LiPo battery. However, since I bought second hand choices are limited. This car is way more robust than anything home made, it can take a beating, and spare parts will always be available.
Posts: 21
Joined: Fri Sep 21, 2012 6:39 am
by joan » Mon Apr 01, 2013 11:16 am
Good job.

How did you identify the pins to connect to on the car's controller chip?

Pity the Launchpad is now $9.99. It's a more powerful chip now though.
User avatar
Posts: 5153
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK
by Robo » Mon Apr 01, 2013 11:29 am
I'm not sure I understand the question. The only thing I've connected from the car is the servo and the ESC, both use the red/black/white wires, the white one being the signal wire receiving PWM signal.

So, controlling the servo and ESC is identical, in fact in my code I call them servo1 and servo2.

Didn't realise the price gone up on the Launchpad, Element 14 and RS in my area still have stock left at the old price.
Posts: 21
Joined: Fri Sep 21, 2012 6:39 am
by joan » Mon Apr 01, 2013 11:49 am
Robo wrote:I'm not sure I understand the question.
...

You use a different approach. On my cheapo RC cars I try to tap into the controller module and simulate the L/R F/B pulse being received from the radio transmitter. I've not considered detaching the servo cables as I'd assumed I'd then have problems supplying the power. Time to open up the cheapo RC cars again and have another look.

Odd on the TI's. The UK Farnell Launchpads are currently priced at £4.06, which is only 50p or so more than they were some months ago. Perhaps TI has had a change of heart. The USD price went from $4.30 to $9.99, which was reflected in the UK price a couple of weeks ago.
User avatar
Posts: 5153
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK
by simplesi » Mon Apr 01, 2013 11:55 am
I can imagine a little Shrimp circuit http://shrimping.it/blog/shrimp/ would be even lower cost :)

(Mind you - I just googled for the TT-01 - the price of the controller is not significant!!! - its out of my pocket money range)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1990
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by simplesi » Mon Apr 01, 2013 11:56 am
But if there are cheaper vehicles that just need 2 PWM signals then I'd be VERY interested in them :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1990
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by Robo » Tue Apr 02, 2013 1:14 am
simplesi wrote:(Mind you - I just googled for the TT-01 - the price of the controller is not significant!!! - its out of my pocket money range)

Simon


Preciously why I bought second hand! I didn't need to put it together myself, it came with everything, plus the motor, ESC, and other parts were already upgraded.

Having said that, TT-01 is a kit, so it's way more hackable than a cheapo RC car, and a lot more fun.
Posts: 21
Joined: Fri Sep 21, 2012 6:39 am
by Robo » Tue Apr 02, 2013 1:22 am
joan wrote:You use a different approach. On my cheapo RC cars I try to tap into the controller module and simulate the L/R F/B pulse being received from the radio transmitter. I've not considered detaching the servo cables as I'd assumed I'd then have problems supplying the power. Time to open up the cheapo RC cars again and have another look.


I see what you mean now. Yes you will have problem supplying the power, the servo requires 4.8 to 6v.

In a regular TT-01 setup, the car battery is connected to the ESC, and the ESC's red/black cable supplies power to the RC receiver and servo. On my circuit the servo's red/black cable is directly connected to the ESC.
Posts: 21
Joined: Fri Sep 21, 2012 6:39 am
by searchplex » Wed Apr 03, 2013 4:24 am
Hi,

I am doing the same thing with Raspi and MSP430 launch pad, but have a lot of isues reading / writing to the UART over usb (I have connected MSP LP to the USB of the RASPI to power it up and read serial) it is recognized as ACM0 but nothing gets transferred over serial!! seems the driver on Raspi is broken or faulty or it is recognizing the MSP as something else, do you mind explaining if you are using usb to communicate between the two? and would be great to see some of your codes :-)

Cheers
Posts: 1
Joined: Wed Apr 03, 2013 4:20 am
by Robo » Wed Apr 03, 2013 4:59 am
searchplex wrote:Hi,

I am doing the same thing with Raspi and MSP430 launch pad, but have a lot of isues reading / writing to the UART over usb


I'm using UART to communicate, but not over USB. In fact, I don't even know how to do that, is there an advantage?

If you look at my image, the white wire from the Pi to the MSP430 is the one sending UART signal. It goes from Pi's UART pin to MSP430's UART pin (marked TXD on the MSP430 board which was misleading me initially).

On the Pi, I used wiringPi's wiringSerial library, on MSP430, I used this guy's harduart library (uart.c):

https://github.com/wendlers/msp430-harduart

Both libraries work out of the box, no modification needed, simple to use.

I bought the Saleae Logic Analyser for debugging. It's a bit pricey but it really did helped. If you already have an oscilloscope that probably works as well, but I didn't have one to start with.

Let me know if I can help with anything else.
Posts: 21
Joined: Fri Sep 21, 2012 6:39 am
by mikerr » Wed Apr 03, 2013 3:25 pm
joan wrote:
Robo wrote:I'm not sure I understand the question.
...

You use a different approach. On my cheapo RC cars I try to tap into the controller module and simulate the L/R F/B pulse being received from the radio transmitter. I've not considered detaching the servo cables as I'd assumed I'd then have problems supplying the power. Time to open up the cheapo RC cars again and have another look.


This type uses regular servo control as its a more expensive modular car kit - the "cheapie" cars (<£100) are their own non standard electrics.

This thread reminds me I still have old kyosho optima mid and yokomo super dogfighters sat the loft waiting to gut/refurbish,
looking on ebay they seem to have gone up in value :shock: so may have to be the latter
Got a Pi Camera? View it in my android app - Raspicam Remote ! No software required on the pi
User avatar
Posts: 1158
Joined: Thu Jan 12, 2012 12:46 pm
Location: NorthWest, UK
by nicknml » Tue Apr 16, 2013 4:08 pm
searchplex wrote:Hi,

I am doing the same thing with Raspi and MSP430 launch pad, but have a lot of isues reading / writing to the UART over usb (I have connected MSP LP to the USB of the RASPI to power it up and read serial) it is recognized as ACM0 but nothing gets transferred over serial!! seems the driver on Raspi is broken or faulty or it is recognizing the MSP as something else, do you mind explaining if you are using usb to communicate between the two? and would be great to see some of your codes :-)

Cheers

Yea it would be nice to get serial communications to work over USB for the MSP430. At least the Raspberry Pi plays nicely with my Arduino when it comes to serial over USB communications.
User avatar
Posts: 195
Joined: Thu Mar 15, 2012 8:44 pm