Friday, 28 June 2013

RC Updates 6/28 - Awesome Demo!

Hello Everyone!

I have an awesome demo for you all today. I have been busy with other things lately, so haven't had time to post on the blog. However, Christmas came early and I got a highly-anticipated package in the mail today. I dropped $40 on Sparkfun 3 days ago and bought the IR Proximity Sensor I talked about in one of my earlier posts, 2 thumb joystick breakout boards, Lead-free solder paste for reflowing, and SOT-23 breakout boards.

If you remember, I bought a PS3 controller about a month ago. I disassembled it and desoldered one of the thumb joysticks on the controller (desoldering was such a pain, can't even describe it...). So I grabbed a couple of joystick breakout boards from Sparkfun which I received today.

In addition, while I was away from the blog, I did crack the RF modules! I don't remember if I mentioned this in a previous post or not, but RF modules are up and running, so the firmware is really taking shape. The remote unit firmware for the C2000 LP is running SYS/BIOS and is PWMing three seperate pins. One of the pins is the servo control pin, and the other two PWM pins are going to the motor controller (the thing on the breadboard I demoed with an LED a month ago). I don't have a motor here with me, but with these 2 PWM pins, I should have decent speed control of the car.

Time for the demo!! I am not going to say anything, just watch it. It is pretty awesome.



The dead-zone issue is now fixed so the servo doesn't spaz out while it's idling anymore like it was in the video. Let me know what you think, I am pretty excited to see the project taking shape.

Thanks!

Wednesday, 5 June 2013

RC Car Update 6/4

Hey everyone!

I haven't posted in a week but I have made some major progress in the meantime. Let's get right to it!

I received my first set of PCBs from OSHPark last friday! They look amazing and the dimensions seems to be perfect. I had to measure the distance between the two sets of pins on the RF module so I was worried that the pins on the module wouldn't match the holes on the board, but it was a perfect match! I did screw up one thing though, the silk screen with names of the pins were wrong. Because the pins were mislabeled on my board, my MCU couldn't talk to the RF Modules and it took me too long to find out that it was a simple labeling mistake... If I ever make rev 2 boards, I will be sure to fix that. And I am thinking about reducing the ground plane dimensions so it doesn't span the area near the RF antenna as that causes a  decrease in the wireless performance. But here are a few pictures of the board!




I am able to talk to the RF Modules using SPI, and it turns out SPI is a very easy and fast interface, so it is recommended to everyone! The only problem right now is that it turns out I don't have enough female-female jumper cables so I can't connect up the both modules at the same time. So I haven't yet tried to actually get the RF modules talking to each other. No worries, the jumpers are already in the mail.

The firmware is also coming along nicely. I am building a library of drivers for the CC1101 RF Modules for both of the launchpads, the C2K and the MSP430. The C2K library is compatible with SYS/BIOS which is running on my C2000 firmware, and with small modifications it works on the MSP430 LP. I am done with the core functionality required for basic communication, so I will make the MSP430 LP talk to the C2K LP over RF once I get my jumper cables.


Also, I purchased a PlayStation 3 controller which I will modify and make it into the controller of the RC Car! The controller is not a Sony brand controller, but an off-brand one. However, the cheaper the controller is, the easier it is for me to work with it. I already tore apart the controller to see what's inside and how much room there is inside. I suspect the spiral antenna of the RF Module will have to stick out of the controller since there is not enough room to fit it all in there. The controller has a slot for 3 AAA batteries, and I will use a TI Buck-Boost converter TPS63031 which is able to up/down convert to provide a stable 3.3 V power source. And as I mentioned before, an MSP430G2553 will be in the controller. I might go for a surface-mount package rather than DIP, but I don't trust my soldering skills, so we will see depending on the space limitations inside the controller. Here is a picture of the controller, assembled and disassembled:


Power A Pro PlayStation 3 Controller


Controller Assembled

Space in the controller is limited unfortunately. I will design a PCB with the same dimensions and shape as the board seen above, but with my own circuitry. One down-side with this controller is that the triggers aren't connected to potentiometers, they are basically tactile switches, so it is either pressed in or released, and nothing in between. I was hoping to make one of the triggers the throttle for the car, but I can't do it with this one. So I will make the left joystick throttle control and the left joystick will control the steering. One of the push buttons will become motor brake and another will be used to toggle the LEDs on the car. Thanks for reading and do comment below!

-Anil