![]() | ![]() | ![]() |
| | |||||||
| Robotics Chat Specific to discussions about robots and the making of. |
| | Thread Tools | Display Modes |
| | (permalink) |
| Experienced Member | I need to control a pair of motors using a PIC16f877a for one my projects. The motors would be subjected to an approximate load of 1200 grams to 2000 grams and they would be required to move forward, backward and should be able to respond to commands from the PIC on a dime. I would like to know, what kind of circuit I should be using. I have heard about H-bridge. And I have seen a few here and there. But Im not sure which one to use. Any recommendation with regards to what motors I could use for this purpose would also be helpful. I know my question seems very vague and generic, but Im not much of an electronics guy. I come from a computer science background. Thank you.
__________________ A scientist trys to see the world the way it is An enginneer trys to see a world that has never been |
| | |
| | (permalink) |
| Experienced Member | I think first you have to choose your motor. Look at the information about your motor, how big current it will use under the load and which voltage it needs... then you can use this information to choose a suitable H-bridge. There are many ICs which are integrated H-brigdes - the one often mentioned here (SN754410) is for small motors max. 1A current, there are bigger like L298, L6203 or LMD18200. If you need higher current than 4-5A you will probably have to build the H-bridge with MOSFETs and a MOSFET driver. I have seen a H-bridge with HIP4082 and RFP3055LE (11A) but if needed you can use MOSFETs rated for even higher currents. Petr |
| | |
| | (permalink) |
| Experienced Member | I have a motor with me but unfortunately, the make and name of the motor is not mentioned anywhere on it. I am posting pictures of the motor im talking about. Please check it out. Im using a third party hosting website. I hope its alright. ![]() ![]() ![]() I just bought it from a local store for 40 bucks. It is a small motor. I think its a DC motor. As I mentioned earlier, both the motors will be subjected to a total load of 1200 grams to 2000 grams. So each motor will be subjected to a load of 600 grams to 1000 grams. If I can be recommended any other motors for this purpose, that would be fine as well.
__________________ A scientist trys to see the world the way it is An enginneer trys to see a world that has never been |
| | |
| | (permalink) |
| Experienced Member | You'd be better off with the tamiya double/twin gearbox I suspect, would save the hassle of building a gearbox and mounts. See here; http://www.pololu.com/catalog/category/34 |
| | |
| | (permalink) | |
| Experienced Member | Quote:
I was thinking more along the lines of getting some kind of circuit(H-bridge for example) to control the two motors I already have. I'll try to dig up the specs of the motor I have, so I can be suggested a circuit that can control them. I'll specify the details as soon as i can dig up their specifications. Thanks
__________________ A scientist trys to see the world the way it is An enginneer trys to see a world that has never been | |
| | |
| | (permalink) |
| Experienced Member | I was more thinking the 3rd item down that page. |
| | |
| | (permalink) |
| Experienced Member | Anyway if you have the motors you can take your multimeter and measure the current your motor needs - try measure free running, with the load and stalled. Assuming you will power your motor with the correct voltage ... then you can choose the h-bridge accordingly. |
| | |
| | (permalink) |
| Experienced Member | The OP will still need to use a gearbox |
| | |
| | (permalink) |
| Experienced Member | if you have the cash maybe you can hack up some hobby servos for full rotation. they already have all the gears and make for excellent small robot propulsion. also they only need one i/o pin so that's always a plus |
| | |
| | (permalink) |
| Experienced Member | One source for servos already designed for continuous rotation is VexLabs. The motor kit stalls at 6.5 in-lbs and no-load 100 rpm, meaning a pair of these (with 4" wheels) could accelerate in about 3-4 seconds and run straight at up to 20 inches per second (on level smooth surface). There's a chart on the website with recommended gears for your chosen speed, and of course slower means more torque. [edit] One nice thing about these motors is the slip clutch (that green thing on the shaft) which reduces the risk of burning it out. [\edit] Last edited by mneary; 9th April 2008 at 10:53 PM. |
| | |
| | (permalink) |
| Experienced Member | I went out and got myself an L298N h-bridge controller. My plan is to get the hang of controlling a motor using the L298 using PWM before getting the motors I would need. As the "rat motor" I am using the motor; pictures, of which I have posted above to test out the pwm. I know the 16f877a has 2 PWM modules, but I thought for now, just to get the hang of it, to code the PWM in software. So this is what I did. I read up on PWM theory. Armed with that knowledge, I coded a PWM routine with period cycle of 1 second. Since this was my first tryst with pwm, I set it at 50% duty cycle. I expected the motor to run for 500ms and do nothing for another 500ms. But when I loaded the program and everything the motor did not move at all. But I heard some ticking noise coming from the motor. When I touched it, I felt vibrations at half a second pulses. And then when I pressed hard on the terminals of the motor that lead to the power supply, it started rotating at half a second pulses. When I removed my hand again, the motor stopped rotating but the vibrations were still there. Whenever I had my fingers on the terminals of the motor, it would conform to the pwm. I know its not a case of loose connection or anything. I don't know whats happening. Anyone know what it is? And could someone guide my to a tutorial or some article dealing with how to use the PWM module in 16f877a. I read the datasheet but it wasn't exactly clear. Thank you
__________________ A scientist trys to see the world the way it is An enginneer trys to see a world that has never been |
| | |
| | (permalink) |
| Experienced Member | The PWM project might help a little. http://www.blueroomelectronics.com/p...s/Projects.htm |
| | |
| | (permalink) | |
| Super Moderator | Quote:
| |
| | |
| | (permalink) |
| Experienced Member | Hard to say what is your problem with the L298 PWM and H-bridge without seeing the schematics, maybe you can post it, the code can help as well. By the way, be sure not to leave out the protection diodes. Petr |
| | |
| | (permalink) | ||
| Experienced Member | Quote:
Quote:
__________________ A scientist trys to see the world the way it is An enginneer trys to see a world that has never been | ||
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| controlling fan motors using pic16f84a | farasue | Electronic Projects Design/Ideas/Reviews | 2 | 4th March 2008 02:36 PM |
| Controlling Switches and Motors via Parallel Port | JobbinJP | General Electronics Chat | 37 | 16th March 2007 05:50 PM |
| PIC16F627 - controlling motors | drage | Micro Controllers | 8 | 22nd October 2006 11:39 AM |
| controlling hard disk motors using lpt | kariem2k | General Electronics Chat | 2 | 14th December 2003 08:56 AM |
| Qbasic program for controlling stepper motors I wrote one | ElectroGeek_87 | General Electronics Chat | 1 | 5th October 2003 05:19 AM |