loading

what is the best microcontroller to use ( pic ?) if i want to drive a motor forward and reverse using a h-bridge ?

im trying to save space in the design and be cost effective( i wanted the pic and h-bridge and the motor to be under 1 inch) . so im trying to use the smallest chips that will do the job.  i was wondering if an 8-bit pic would do the job ?  

edit:
Id prefer using Microchips PIC, i think i have somewhat an idea of using MPLAB. Im planning on using a brushed DC motor, H-bridge, and Voltage regulator.  It has to fit under a 1' area taking up the least possible space because im using it as an unlocking/locking device. i was wondering what would be the best microchip pic that could achieve this with the least cost and size.

sort by: active | newest | oldest
elabz5 years ago
It probably depends on which development environment you prefer more than on anything else. The lower level MCUs from Atmel and Microchip (as well as TI and others) are pretty comparable. The chips themselves would make little difference but the convenience in programming them would be the key.

I develop on a Linux machine and so over time I've migrated from PICs to AVRs under Arduino IDE. Sure, there are other ways all the way down to using a text editor (or command line for that matter) but I like the convenience of an IDE that can be installed without jumping through hoops. So TI and Microchip are out.

That said, the requirements are not very well defined:

What kind of an input the MCU should have? It's a no brainer  to control a brushed DC motor with an H-bridge, but what is it that defines the speed and direction of rotation? Button input? Distance sensor of sorts? Accelerometer? How fast the input signals are coming?

You said you wanted the MCU, the H-Bridge and the motor to be under 1" (square?) . It's doable with an 8- or 6-pin MCU such as an ATtiny13 (or ATtiny9) and a 14-pin SN754410 dual bridge (i.e. good for up to  two motors)  although it will be tight. But the motor itself is a big question. Why does it have to fit in the footprint? Should it be mounted on a PCB? A tiny cell phone vibrator motor may do perhaps.

Anyhow, there's a whole slew of additional questions to be asked before the main one can be answered with any certainty.

Good luck with your project!
dudeitskumar (author)  elabz5 years ago
Id prefer using Microchips PIC, i think i have somewhat an idea of using MPLAB. Im planning on using a brushed DC motor, H-bridge, and Voltage regulator. It has to fit under a 1' area taking up the least possible space because im using it as an unlocking/locking device. i was wondering what would be the best microchip pic that could achieve this with the least cost and size. and how would i determine its the most capable of achieving the task with the least price ? thank you
Locking/ unlocking sounds more like a job for a solenoid rather than a motor. If you use brushed DC motor, your main challenge would probably be on the mechanical side: how to convert the rotary motion of the motor into the linear motion of the latch.

A solenoid is much easier to control, too: no need for direction control and one transistor with one flyback diode would do the job. See if you can locate a broken (or unwanted) laptop CD or DVD drive - they all have a complete miniature latching mechanism inside - the solenoid, the return spring and the magnet (to hold when power isn't applied) - pretty much all parts you'd need and most would fit in 1" square. Some of those I've seen even have a button and an LED attached, all very tiny of course.  It's so small that it's not very easy to work with but it would appear that the miniature size is a self-imposed limitation :) so I'm confident you'll work it out.

Broken laptop CD drives go for pretty much the shipping cost on eBay these days and I've never ever seen one with the latch mechanism broken, whatever other issues with the drive were. I did put some of my tore-down DVD drives' picture online. Check out the picture on that page titled "Useful parts removed from a Toshiba-TS-L462" - on the right hand side there's a small triangular metal part hanging on a flat ribbon cable - that's a complete locking latch mechanism with a membrane button and an LED. I think it's just a tad larger than 1"x1" but a large chunk of it could be removed since your mounting arrangement is most likely going to be different from the original drive.

But as far as Microchip's MCUs, I think PIC12F509 would be the cheapest/most common small (8-pin) chip you can get for the job. They make smaller but SMT ones are not as convenient to work with.

Good luck!
dudeitskumar (author)  elabz5 years ago
thank you
You can build one here. It has forward and reverse, just not variable speed: http://electroniccircuitsforbeginners.blogspot.com/2009/12/h-bridge-circuit.html
If you need the PIC for some other tasks, then this is actually not the solution for you.  Either way, good luck.
Pick one, any will do. They all offer a small SMD package that will fit your needs.
+1