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.

First ROBOT with L293D problem

Status
Not open for further replies.

c36041254

Member
Hi there !
I been not able to work on my robot for a long time for some reasons and also not on electro-tech, but finaly I have finished it but it has just one problem that output of L293D is just 50mA. I am attaching a schematic of my robo.
The LEDs connected to MCU pins ( in alternate polarity to the same pins ) are the input pins for L293D and the LDR sensor section is shown far right. I know that these LEDs connected directly to MCU drop volatage so I tried removing them but did'nt help. I connected LEDs just for indication that at least digital part is O.K. Please help me I selected this robot for my collage project and have to submit in a week !
I am using 12V adapter for power supply for testing and then will switch to +9V battery.
 

Attachments

  • ROBO 1.jpg
    ROBO 1.jpg
    237.1 KB · Views: 1,089
Last edited:
Hi there !
I been not able to work on my robot for a long time for some reasons and also not on electro-tech, but finaly I have finished it but it has just one problem that output of L293D is just 50mA. I am attaching a schematic of my robo.
The LEDs connected to MCU pins ( in alternate polarity to the same pins ) are the input pins for L293D and the LDR sensor section is shown far right. I know that these LEDs connected directly to MCU drop volatage so I tried removing them but did'nt help. I connected LEDs just for indication that at least digital part is O.K. Please help me I selected this robot for my collage project and have to submit in a week !
I am using 12V adapter for power supply for testing and then will switch to +9V battery.

hi Chris,
A quick look, whats the purpose of the reverse parallel LED's across the PIC pins to the L293.? Depending upon the forwad voltage drop of the LED's wont they clamp the L293 drive signal.?

Whats the current rating of the motor and the 12V adaptor.?
 
Last edited:
Yes it will clamp it and that's why I wrote that I tried with removing those LEDs but then even the current falls to 50mA, so I connected them back just to make sure that at least MCU is doing it's job, and that's why I add them in schematic actually they are not permanently soldered there so please ignore them, and the worst thing is that before I tried removing LEDs the current was at 160mA but that was not enough to carry the load of ROBOT ( the motors were moving ) so I tried removing the LEDs and then THIS HAPPEN JUST 50 mA:confused::confused:
 
Yes it will clamp it and that's why I wrote that I tried with removing those LEDs but then even the current falls to 50mA, so I connected them back just to make sure that at least MCU is doing it's job, and that's why I add them in schematic actually they are not permanently soldered there so please ignore them, and the worst thing is that before I tried removing LEDs the current was at 160mA but that was not enough to carry the load of ROBOT ( the motors were moving ) so I tried removing the LEDs and then THIS HAPPEN JUST 50 mA:confused::confused:

hi,
Sorry, I missed some of the first post detail.:(

Can you give details of the motor current and 12V adaptor.?
 
Sorry ! I also missed some of your post, I actually don't know the current ratings of motor but it reads 2200 rpm, 6V , motors are those bulky one used in cassette players. The adapter reads 9V,500mA but it actually gives 11.56 v at output so I take it as 12 V.I also have two small motors used in china made toys (just like shown here https://www.societyofrobots.com/actuators.shtml as DC motor ) as it is taken from a toy it doesn't have any ratings on it but the toy runs on a single 3V pencil cell. When I connect these motors every thing stops and have to restart the ROBOT but attaching some resistance in series makes the motor run but very slow ( resistor is of 47 ohm)
 
Last edited:
Sorry ! I also missed some of your post, I actually don't know the current ratings of motor but it reads 2200 rpm, 6V , motors are those bulky one used in cassette players. The adapter reads 9V,500mA but it actually gives 11.56 v at output so I take it as 12 V.I also have two small motors used in china made toys (just like shown here https://www.societyofrobots.com/actuators.shtml as DC motor ) as it is taken from a toy it doesn't have any ratings on it but the toy runs on a single 3V pencil cell. When I connect these motors every thing stops and have to restart the ROBOT but attaching some resistance in series makes the motor run but very slow ( resistor is of 47 ohm)

Hi Chris,
The voltage you measuring from the adaptor, is that when the motor is trying to run.?
Some adaptors have a very poor regulation. It also sounds as though when you connect the 3V motors you are pulling the 12V so low its resetting the PIC.
Measure the adaptor when its on load.
 
This is the situation now, connecting those tiny toy motors not those cassette player's

currents at output pins of L293D - 84.5mA :) (for both motors)

Voltage at output pins without connecting motors - 8.05V

Voltage at adapter with motors connected - 8.05V

currents through motors while connected - 83.5mA

hope this will help you to help me :)

By the way I don't get that how a motor that runs on three volts connected at the output of L293D and not to MCU can reset the micro controller, I mean we are connecting it to output and not to input and a motor is a passive device, it runs on 3V doesn't generate 3V :confused:
 
Last edited:
This is the situation now, connecting those tiny toy motors not those cassette player's

currents at output pins of L293D - 84.5mA :) (for both motors)

Voltage at output pins without connecting motors - 8.05V

Voltage at adapter with motors connected - 8.05V

currents through motors while connected - 83.5mA

hope this will help you to help me :)

By the way I don't get that how a motor that runs on three volts connected at the output of L293D and not to MCU can reset the micro controller, I mean we are connecting it to output and not to input and a motor is a passive device, it runs on 3V doesn't generate 3V :confused:

hi Chris,
Taking the second part first, as I understand you said, when I connect the 3V mtrs the robot stops and you have to restart, is that correct.

If yes, most likely whats happening is that the +5V is being pulled so low that the PIC is crashing, so you have to restart.

Some of these small mtrs [3v and the like] can draw a heavy current when starting up, a battery will be able to supply this heavy current, but the regulator probably not.
Your drawing is not showing a large value capacitor on the +5V line. A large cap is usually fitted in order to supply current surges required by the mtr.

I would measure the current drawn by both types of motor using a 3V battery for toy mtrs and a 5V supply for the cassette mtr.

When doing this test apply finger pressure to the shaft of the mtrs so that they have a load.
 
Last edited:
Hi Eric,
I tried the 1000uF capacitor between +5v and GND of 7805 and the motor runs like a harly devidson :) for few seconds and then it stops, I think the capacitor is not discharging its self, though there is only 59mV charge in it as I measured it and it start increasing during measurement ( I disconnected it from ckt and then measured ). Don't know what to do about this.
Here is the data you asked for:

Current through toy motor with 1.5 V ( with 3V more than 200mA and less than a Ampere ) 127mA

Current through cassette ply. motor with 5V 110mA

I still don't get why capacitor increase current , I thought it is just for the filtering purpose.
 
After posting above reply I just strike with weird problem, that adapter is not giving 11.50V when connected to ckt, while disconnected it works fine , though ckt also works fine with 9V battery. The adapter has an LED and it becomes very light when connected to ckt. I tried another 7805 but doesn't work. Is it possible that though voltage of adapter is O.K. it might not giving current (rated 500mA ) ?

Edit :

I tried it with just a 7805 on bread board but then even it didn't work, there must be a diode got fused in the bridge of adapter.
 
Last edited:
After posting above reply I just strike with weird problem, that adapter is not giving 11.50V when connected to ckt, while disconnected it works fine , though ckt also works fine with 9V battery. The adapter has an LED and it becomes very light when connected to ckt. I tried another 7805 but doesn't work. Is it possible that though voltage of adapter is O.K. it might not giving current (rated 500mA ) ?

Edit :

I tried it with just a 7805 on bread board but then even it didn't work, there must be a diode got fused in the bridge of adapter.

hi Chris,
I have been convinced from the start that the problems that you describe are related to the adaptor and series regulator not having the voltage/current capacity to drive the mtrs.

The fact that it runs for a while with a 1000uF cap then slows/stops suggests that the 7805 or adaptor are overheating.
If the 7805 gets HOT it will go into thermal shut down, it may require a heatsink.
Also a 500mA adaptor is IMO under rated for the job, try a 9Vdc at say at least 1Amp.

Lets know how it goes.:)

EDIT:
I am suggesting an adaptor voltage that will give at least 3v to 4v drop across the 7805.
If an adaptor of a higher voltage is used the 7805 has to dissipate more heat.!
If for example the mtrs draw 0.5A, with a 12V adaptor there is 7V across the 7805.

Heat/power = 7 * 0.5 = 3.5Watts!......... for the 9v adaptor it becomes 4 * 0.5 = 2Watts.
 
Last edited:
I faced similar problems in my first robots as well. The problem WAS teh adaptor. I was using a 12 v 500mA adaptor.

Thanks to this foroum, I started suspecting the adaptor. I then open my computer and used teh 12 V supply from it. and wow The robot got mad with power !!!

so Chris, go for it !!! try running your robot on the 12 V from your computer. Then when you are convinced on how much power you need to put into the robot to get more power from it, go buy a 1A or 2A adaptor of say 9 V.
 
Hey ! that works but not so well, The motor runs really fast but only when the robot is on the black line as it gets off the line on either side the MCU and whole ckt gets hang ( every thing stops), I thought the back emf of motor might be the problem and attached 0.1uF capacitor across each motor but that did not solve the problem .:confused:

And Pradeep you have suggested the computer source but I have an ATX 2.03 that has 12V but 16A and 15 A, I tried that once before and had my ckt fused, How to use that ? Will a simple current divider do the job ?
 
Hey ! that works but not so well, The motor runs really fast but only when the robot is on the black line as it gets off the line on either side the MCU and whole ckt gets hang ( every thing stops), I thought the back emf of motor might be the problem and attached 0.1uF capacitor across each motor but that did not solve the problem .:confused:

And Pradeep you have suggested the computer source but I have an ATX 2.03 that has 12V but 16A and 15 A, I tried that once before and had my ckt fused, How to use that ? Will a simple current divider do the job ?

Hi Chris,
I wouldnt recommend connecting the motor to the PC internal supply lines.

You could use a separate +5V regulator just for the PIC's supply.

EDIT:
The 4 diodes shown in the dwg will reduce the back emf.
 

Attachments

  • esp06 Aug. 31.gif
    esp06 Aug. 31.gif
    14.5 KB · Views: 501
Last edited:
Is that 9 squares I see. Congratulations, couldn't happen to a more deserving poster.:D

Mike.
 
Is that 9 squares I see. Congratulations, couldn't happen to a more deserving poster.:D

Mike.

hi,
I hadnt noticed, oh crap.!
Im going to get even more unsolicited PM's asking, heeeeelp meeee plzzzzz.
 
I don't get that how that reduce the back emf, I don't understand how the back emf voltage get grounded with those diode.

I am not sure that the problem I have asked about in the last post is because of back emf or is it ?

By the way what you (Eric) and Mike are talking about ? I don't get it ?:confused:
 
Last edited:
I don't get that how that reduce the back emf, I don't understand how the back emf voltage get grounded with those diode.

I am not sure that the problem I have asked about in the last post is because of back emf or is it ?

hi Chris,
Ref the diodes.
When the back emf from the motor is greater than the suppy voltage [+ diode voltage drop] the diode will conduct and clamp the back emf to to about Vsupply + Vdiode.

If any back emf trys send the motor connection to a minus voltage, the lower diode will conduct and clamp it to about 0V [allow for diode drop]

Back emf on the power rails can get back into the PIC and other logic, thats why its essential with motor and relays etc, the decoupling caps are present.

I would have at least a 470uF and say 4 or so 100nF on the +V rail to 0V.
A 100nF should be close to the PIC power pins.
 
Last edited:
By the way what you (Eric) and Mike are talking about ? I don't get it ?:confused:

The guys are talking about the reputation squares. See the green squares beneth their names.
 
I tried that diode ckt with zener diodes but didn't work , I am trying to figure out whats wrong, hope will find it. I have a spare ATX PC power supply and I have spent already over my budget so I really need to know how to use that, please tell me because soon I'll be out of battery.

Edit:
I just have those zeners and hope that may work because can't afford to buy 8 new diodes right now.
Adding that diode ckt makes the motors very slow, and now MCU doesn't hangs when the ckt detects light on one side but for the other side it still needs to be reset.:(
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top