Author Topic: The robot controller of Society Of Robots !  (Read 1664 times)

0 Members and 1 Guest are viewing this topic.

Offline arixIITopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
The robot controller of Society Of Robots !
« on: July 14, 2009, 01:09:46 AM »
On a breadboard I set up the schema given here:
but I used L293B instead to have 1A current for my motors (12vDC, 5W, upt to 1A).
I use a PIC 16F877A, and I connected the pwm lines to its 16 and 17 pins, as usual. Then I used this sample program:
to start trying. I was expecting for the motor to start, turning faster and then slower. It didn't! Motors started to work only with their highest speed, even though the test program was sending pwm varying from 0 to 255! Then I rechecked, but everything was correct. I then took out my PIC, and managed a different circuit on another breadboard with only a transistor, having it's base connected to 17th pin, i.e. pwm, and collector to the motor. when I switched it on, it worked well! motor goes faster, and then slower to stop, showing pwm working. What could be the reason of the main circuit not working? could it be of the sort of freq. setting?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,696
  • Helpful? 173
    • Society of Robots
Re: The robot controller of Society Of Robots !
« Reply #1 on: July 21, 2009, 12:52:55 PM »
Hmmm you should use a multimeter to check all the pins and make sure they have the right voltage, first.

If you have an oscope, or at least a multimeter with a frequency setting, use that too . . .

This will tell you exactly what isn't happening.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
Re: The robot controller of Society Of Robots !
« Reply #2 on: July 21, 2009, 06:41:35 PM »
A word of warning: the L293B does NOT contain the diodes around the motor supply unlike the L293D. (I always remember it as L293D where D is for 'has diodes').

Consequently you will need to add the external diodes (4 per motor) as shown on the other circuits in my motor controller tutorial you gave the link for.

Edit: so you should actually be using this: http://www.societyofrobots.com/member_tutorials/node/165

Since you haven't added the diodes then I hope you haven't fried your L293B.

As you have it breadboarded then: try disconnecting the PWM from PIC and just use some jumper wires (after you've added the external diodes).

Set the PWM input high and then connect the forward/reverse line to +5v to make sure the motor goes fwd, and then to ground to make sure it goes backwards.
« Last Edit: July 21, 2009, 06:46:35 PM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk


Get Your Ad Here