Sunday, 22 September 2013

RC Car Updates 9/22: Soldering components on a PCB

Hey all,

I have been soldering the components on the board this past weekend. Soldering can easily become a nightmare when you have a lot of components, especially if they are surface mount parts.

Surface mount parts are much smaller than through-hole components and their footprints are usually much smaller. This makes it very hard to solder surface mount components when compared to their through-hole counterparts. One might choose to use surface-mount (SMD) components over through hole components when space is a limitation on the board. Also, because SMD components are on the "surface", they take up space on only the layer that they are on. Through hole components require "through holes" to be mounted so the hole goes through all of the layers. This means that you can't use the space underneath the component to route wires.

Space became an issue in some areas of my PCB therefore I had to choose SMD parts. However, I tried to use as much through hole components as possible to make soldering easier. There are some simple rules that I follow when I solder up a board. First, I solder the SMD components before I solder the through hole components. The reason is that I use a technique called "reflowing" to solder the SMD parts. This technique requires solder paste, which kind of speaks for itself. It is like solder but comes in a paste form. You apply the solder paste on all of the SMD component footprints first. Usually, you would use what is called a stencil to make this process easier. Stencil is basically a mask for your PCB with only the footprint areas exposed. Then you would use a spatula to apply the soldering paste which would automatically find its way to the footprints. However, stenciling is quite expensive so I did it the manual way. I applied the solder paste on the footprints using a toothpick being very careful and slow. You want to make sure you don't short footprints together by applying too much solder paste. Once this is done, you carefully place the SMD components on the solder paste-applied footprints. Using tweezers are highly recommended for this step.

Once all of the SMD parts are placed, next step is quite unusual: heat up the board. I know some people use heat guns, frying pans etc. I use frying pans. Turn on your stove and let it heat up the frying pan. Then add the main ingredient: the PCB. I really cannot tell you how long to keep the board on the PCB, but how I know is I watch the solder paste. The solder paste is usually gray colored, and when it is "done" it turns into a silver color just like regular solder. This is when I know my PCB is done cooking!! Check out the picture below:

When the soldering paste turns silver, remove the board and let it cool down. Once it is cool to touch, you can start soldering the regular through hole components. I am not going to talk about how to solder, that is very trivial. But I want to share the current status of the board with most of the components soldered.





You will notice that the 3.3V regulator is not populated on the board.... Unfortunately I messed up a little there. I now understand why people say "the first revision of a PCB never works". But mine will!!! It is a recoverable error. I miscalculated the pinouts of the 3.3 V regulators I ordered but I did find that RadioShack sells 3.3V regulators that will work with my board! So I ordered a new regulator right away and I will solder it when I get it. 

Other than that, the only parts I am waiting for are the dual row female headers for the C2000 LP to sit on and SMD LEDs. I have obviously soldered many through hole components already, so I will not be reflowing the LEDs. It also turns out I am very short of through hole ceramic capacitors so I need to order a bunch of those. Overall, project is going really well so check back for more updates! I should be able to test the board in a couple of weeks!

Anil

Thursday, 19 September 2013

Crazy-Ass Fast RC Car Updates 9/19

Hey everyone,

Quick heads-up: The name of the RC car project has officially changed to Crazy-Ass Fast RC Car.

I am happy to report that my boards are finally in! The PCBs were fabbed in China through SeeedStudio. I highly recommend their service to everyone. The boards seem to be really high quality and well built. Despite the really low price, they are looking really sharp. Also as a plus, I received 9 copies of the board even though I ordered 5 boards. So they are also quite generous.

I haven't had a chance to populate the boards yet. There are going to be a lot of components on the board, so it is taking a long while to gather everything needed. I am on a tight budget so I am buying most of the components on eBay shipped from China. The footprints are spaced out perfectly for the C2000 LP! Boards are looking very promising.

Here are some pictures:

Fresh out of the oven.

C2000 Launchpad Sitting on the footprints


Wednesday, 28 August 2013

RC Car Update 8/28

Hell Everyone!

It has been almost 1.5 months since the last time I posted an update! There is finally an update now, and here I am sharing it. The main PCB that will go into the RC Car is ordered! I am using Seeed Studio PCB services to get my board fabricated. The board is about 8cm-10cm, and I am paying $30 in total for 5 copies of the board.

I have finally added the features I have been meaning to add onto the board and created the Gerber files. After carefully reviewing them, I decided it was good to go! I placed the order and paid for it about a couple of hours ago. Bad news is that the boards are being fabbed in China so it could take up to a month until they actually reach me. This my first time working with Seeed Studio's PCB service so I will make sure to let you know how it goes.

On top of that, I have also ordered the transistor that will be used to switch the headlights on the car, the 5V and 3.3V LDOs that will supply power to the components on the board. I am really excited to see that this board is finally getting fabricated after working on it for 4-5 months! I am planning on posting another update when I get the boards from Seeed.
3-D rendering of the main RC car PCB.

Tuesday, 9 July 2013

RC Car Updates 7/9!!

I have another demo today. I have been making solid progress in this project. I am going to keep this one short, so let's get to it.

What's new:

  • The motor controller prototype that I finished building last month is finally being utilized. It is now doing what it is meant to do. The C2000 is fully interfaced with it over MotorA, MotorB and GND lines. I am now utilizing the vertical axis of the joystick to control the DC Motor. Click-in of the joystick does motor braking (very cool).
  • I purchased a DC motor. I bought it just so I could try out the system. It is very big, but not probably not the most efficient or the fastest motor. So it will do for now, but for the real deal, I am going to invest around 20-30 dollars for a very high speed DC motor. I will throw heat sinks on all transistors, so I should be able to pull 5 Amps continuously. (The only limitation is cooling...)
  • I purchased a new servo motor. This servo pulls 1.4 Amps when the rotor is moving so I had a hard time finding a power supply beefy enough to power the servo. When I try to power it from my PC or my 1-Amp phone charger, when the servo pulls current, voltage drops and the C2000 does a brownout reset, kind of funny :)
Aaaaannd here is the demo. Enjoy ;)


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

Monday, 27 May 2013

Building an RC Car Update 5/27

Hey all,

There are many updates! I have been working on the revised motor controller circuit board for weeks now. If you remember, I shared the screenshots and rendering of the original motor controller PCB a few weeks back. However later on, I decided to integrate the C2000 Launchpad, all the pin outs for external components and the motor controller on the same circuit board. So I have been working on this revision and here it is! The following pictures are OSHPark renderings along with 3-D image renderings. Let me know what you think! OSHPark quotes me $60 for 3 of these boards but it looks like I can get 5 of these boards for about $20 from Seeed Studio.



3-D Renderings of the Board. Notice the two sets of double headers where the Launchpad will sit on. 




OSHPark Renderings of the board.

Before I send it out to the fab, I still need to do a few more proof of concepts. First of all, I am still waiting on the breakout boards I made and ordered for the CC1101 Wireless modules. I figured out how SPI works on the C2000 and got it running on SYS/BIOS talking with my Aardvark SPI/I2C Monitor. Now all I need to do (once I receive my breakout boards) is get those wireless modules working! I have been reading the datasheet and I have a rough idea of what I need to do so we will see how it goes.

Major Addition:
I was talking to my dad about this project and he came up with a great idea! He suggested that I add a proximity sensor on the car to avoid collisions. I thought that was a great idea and found this SHARP IR Proximity Sensor. Basically it is an IR emitter and detector coupled in one package that spits out analog voltage between 0-5 V. I will pass that analog output through a voltage divider network to make sure it doesn't exceed 3.3 V going into the ADC of the C2000 Launchpad. So I will place this sensor on the nose of the car where the front bumper is and it will automatically brake the rear wheels if it senses an obstacle that is less than 5~7 inches away. Here is a picture of the sensor:
Sharp IR Sensor capable of sensing obstacles up to 80 cm away.

With the fast motor I am eventually planning on putting on the car, it is a good idea to have this sensor to "preserve" the car. I am really excited about this and I have already compensated for the sensor connections on the main circuit board that I shared above. Thanks for reading and please let me know what you think!

Edit: I just noticed the 3-D renderings differ slightly from the OSHPark renderings. The OSHPark renderings depict the most recent state of the circuit.