Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Motor controller; software working, refining the hardware

Status
Not open for further replies.

Triode

Well-Known Member
I've talked about this project a lot, so sorry if this is repetitive. I am working on my project to make a dual dc motor controller that takes a signal meant to controll an RC servo and uses it to controll two motors directly.

So I have the firmware for the chip working. Currently my layout follows this schematic exactly except that the chip is a 18F1320, and the supply is two 9V batteries for 18V total, and a 5V regulator is supplying the +5. I plan to add a second control chip and motor arranged identically on the other half of the chip, and protection diodes. I may add a capacitor to smooth out the current to the motor as well, but I need to find out which kind to use.

**broken link removed**
(schematic from PyroElectro News, Projects & Tutorials)

The motors it will be used for are brushed DC motors with an 0.8A stall current, labled for 9V but able to run on up to 24 without damage. I still have a lot to learn with electronics, I started with microcontrollers and I'm building from there. Now that I have this working I want to improve it, here are the things I'm trying to figure out before I make a final schematic:

-Best PWM frequency
-Should I use a capacitor to smooth out the current to the motor? It will need only to be responsive enough to use as a tank drive RC vehicle control, so a little lag is acceptable. What kind and size of cap?
-Size of clamp diodes needed for this much voltage and current
-Any other reccomendations to reduce self interference, or otherwise improve the integrity and reliability of the design.

I also plan to add a push button for each chip that can be used to calibrate the max, min and middle positions of the reciever.

I will post a starter schematic to improve upon soon. If anyone is curious about the code I'm using its in my blog, it would be a lot to repost here.

If anyone does look at my software: is there any real disadvantage to doing bi-directional PWM the way I have done? setting one side to low and pulsing the high side. Alternatively I have seen methods where one side goes low or high to controll direction, and the other pulses for either direction with pull up resistors used on both sides. It seems to me this method would produce a weaker signal, but on the whole I don't think it would be much different at all.

Edit: I think I have most of it figured out and I will post the schematic soon, the thing thats hard to decide is the capacitor and frequency, I've read forums and articles about the freq to use and they cant seem to agree, I like the high frequency+smoothing cap aproach for my application, but I'm not sure what kind to use, all the larger capacitors I have are polarized, and with this switching direction that can't be a good thing. Also I'm just not sure what size cap to use, it seems like I should basically just use the biggest one that wont slow the motors response time too much. That shouldent be difficult as the frequency it would be smoothing could be in the Khz range, and the motor only has to adjust to the new speed withen 1/10 of a second, in a pinch even 1/4 would be acceptable. I'm looking over capacitor equations now, but its hard to figure out. I'm a mechanical engineer, so I know the theory, but I've never applied these equations.
 
Last edited:
I just finished a rough draft of my schematic, this is my first schematic and I just learned eagle, so go easy on me. Any suggestions for improvements are appreciated.

**broken link removed**
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top