Friday, 26 April 2013

Motor Controller Design Update

So, it took me much less than anticipated to figure out how Eagle works. I was thinking it would take me the whole summer, but it only took 2 days. I downloaded the free version from their website and got cracking right away. I found an awesome tutorial on Youtube that walked me through the basics, and then I got the hang of it.

I did a little research on how I can actually get the PCB manufactured, and it turns out it is not so cheap. As you would expect, the price goes up as the board gets larger. Therefore, I tried to keep my design as minimal as possible. My original plan was to have the "big" MOSFETs (I explained what I meant by big in my last post) laid horizontally so I can use some large copper plates on the board as heat sinks. The MOSFETs I am using come in TO-220 packaging which means you can mount them to heatsinks since they come with a big area of expose metal in the back. Here is a picture of TO-220 packaging (source: Wikipedia).


However, I had to ditch that idea because the boards became too big for me to be able to afford. I am going to use oshpark.com's service to get the board manufactured and they charge $5 per square inch for a 2-layer board. However, they do give you three copies of your board for that price. Anyways, here is a screenshot from Eagle of how the PCB currently looks like. 


I actually really like oshpark's website. It looks really simple and it is very easy to use. To get a quick quote and to get your design verified, all you have to do is upload your Eagle PCB design files. Then they automatically process it online and give pictures of how your board is going to look like when it is printed. My board is going to be 2-layers, and its dimensions are 3.44x1.5 inches. This is going to cost me a tad over $25 for 3 copies. Check out the OSH Park renderings below. 

Board Top
Board Bottom
Top Layer
Bottom Layer
You might spot weird connections on the board. This is only my first time, and it turns out routing wires on 2-layer boards is very tricky. This is probably the design that is going to be manufactured. I go back to the design files every once in a while and try to spot any mistakes. But because the transistors will be vertical rather than horizontal, there won't be any heatsinks on them. This means that I can't pull more than a couple of Amps continuously (hopefully). Trying to pull more than that will cause the transistors to overheat.

Let me know what you guys think!

Anil



Wednesday, 24 April 2013

Update on the RC Car

Hey all,

Don't think that I gave up on the RC car project. I have been extremely busy with school, but I have also been doing my research. Here are the updates, firstly, I ditched the Bluetooth idea for the car. Instead I am going to use a 433 MHz RF transceiver. This will give me a range of at least 500 ft hopefully.
I am also currently in the market for a higher RPM motor. For initial testing, I will stick with the motor that came with the car. Good news is that I am building my own motor controller!



Here is the background info: you can't just drive a motor directly off of a pin on your microcontroller, you will literally blow up that MC if you try that. DC motors require a lot of current, especially when they stall. And for that, you need beefy transistors. In my design I have 8 transistors. 2 of them are p channel MOSFET s and the rest are all n channel MOSFETs. The 2 of the 6 NFETs are what I call "big" which means the motor current runs through them. Similarly, the PFETs are also "big" since they are directly interfaced with the motor. The other 4 "small" NFETs are used to drive the big MOSFETs.


The design is attached to this article. You basically don't want the wrong combination of MOSFETs on simultaneously since you will short your power source. To make sure this never happens, I am adding a logic protection layer. The logic circuitry has one 2-4 decoder, 1 NAND gate and one inverter. I have the logic on the design schematic. Basically, as far as the MCU is concerned, there will only be two wires between the MCU and the motor controller. 0-0 means neutral motor, 1-0 means forwards, 0-1 means backwards and finally 1-1 means motor brake. Motor braking is achieved by shorting the terminals of the motor.



Anyways, I am currently waiting on the last part, which is the decoder. I currently have the circuit partially wired up for testing. I am also attaching a picture of it. I was able to run my motor in both directions successfully. Once I have all the parts and finish testing, I will start to learn how to use Eagle. I want to make a PCB with this circuit on it. Once that is done, this baby will go on the car!


You might ask, why build your own motor controller? Because theoretically, I can pull nearly 20 AMPs (if I had heatsinks) from this circuit and the generic motor controllers out there only provide 1 A continuous current. I am making this car OVERKILL!!! Which means I want 25 million amps of current!

But no, realistically, I am shooting for about 2 amps of current, given that I find a battery that is comfortable with that. Anyways, hope you enjoyed the update.


Anil