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.

Student in need of assistance

Status
Not open for further replies.

Gondwana

New Member
Dear all,

I am a final year student in Computer Systems and Software Engineering, and for my final year project i have to build an autonomous robot. i am using the PIC16F876 for my interrupts, A/D conversions from sensors, and PWM to the motor controller. I used 2 cordless drill motors of 12V each, and a 12V Sealed Lead Acid of 7AH. for my motor controller, i used a L298N as a dual H-bridge. this chip can handle up to 4A but i managed to damage 2 of them. i changed my design and used one motor controller from magnevation, the full version (Dual channel, PWM can be seen at this site http://www.totalrobots.com/access_files/dc_motors.htm). i need help with the proper way to interface the outputs from my pic to that motor controller. basically i need to send just 3 signals per channel to the controller: one for the PWM, another for the direction, the third for the brakes. i am quite experienced with assembler language, C programming and the PIC too.i would be very grateful if i can get any insight on how to drive this motor controller. my knowledge in electronics is limited since i am a software engineer.

thanks
 
Please forward the solution .

Please mail me if you find anything about your problem because .. i have the same situation here..

thanks
 
Gondwana said:
Dear all,

I am a final year student in Computer Systems and Software Engineering, and for my final year project i have to build an autonomous robot. i am using the PIC16F876 for my interrupts, A/D conversions from sensors, and PWM to the motor controller. I used 2 cordless drill motors of 12V each, and a 12V Sealed Lead Acid of 7AH. for my motor controller, i used a L298N as a dual H-bridge. this chip can handle up to 4A but i managed to damage 2 of them. i changed my design and used one motor controller from magnevation, the full version (Dual channel, PWM can be seen at this site http://www.totalrobots.com/access_files/dc_motors.htm). i need help with the proper way to interface the outputs from my pic to that motor controller. basically i need to send just 3 signals per channel to the controller: one for the PWM, another for the direction, the third for the brakes. i am quite experienced with assembler language, C programming and the PIC too.i would be very grateful if i can get any insight on how to drive this motor controller. my knowledge in electronics is limited since i am a software engineer.

There is a simple demo of PWM for a robot in my tutorials, but you probably have the software side sorted already?.

I would suggest you have probably killed your drivers because they are far too small, a 12 drill motor will take vastly more than 4A under load or stall conditions.

Have a look at Bob Blicks site at **broken link removed** which uses darlington transistors in an H bridge. He rates it at only 5A, but it's a lot 'better' 5A than the L298N 4A.
 
The interface to your controller is fairly simple (it doesn't sound like a controller its just a power amplifier). Like you said you need 3 pins. First you need to generate a PWM signal, either in hardware on the PIC, or in software. PWM is a easy way to apply different power levels to a device. The longer the pulse is high the more power applised to the device - this will effectively be you speed/ torque input to the motor. The direction input lets you specify the direction that the power is applied, forwards/ backwards on the motor. The Brake input just connects the two terminals of the motor. Try this yourself - the motor will be much more difficult to turn with the terminals connected together.

You will probably want speed feedback on your motors which is esential to good motor control. You can use either optical encoders or small motors as a feedback mechanism. Optical encoders use a wheel with holes in it to block and unblock a LED/ Photodiode to give a digital signal whose frequency depends on speed. The Small motors act as generator giving a voltage thats dependant on speed. With the feedback signal you can progam a PID controller into the PIC to precicely control the speed of your motors. You should be able to Google for more info on PID controllers.

Brent
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top