wiring a motor to a uln2003

hey there its me again. i managed to het hold of a uln2003 and i wired a motor to it. the motor struggled to run and after about 5-30 seconds. then it stopped completly. the battries are still pretty new. the voltage measured through the motor was 5-6v and the current through it was 0.3-0.8A. when the motor stopped both measurements were 0. the motor needs 3-12V to run. i tried with another motor and the same thing happens.
can you guys tell me what is wrong please. the code on the picaxe 08m is :

start:
high 4
goto start

and the schematic can be found on this site:
http://i12.tinypic.com/2elh021.jpg
(i wired so many outputs to the motor because it wouldn't run at all if i wired only 1 output. i eventually ran out of wire so couldn't wire more)

ak

Edited by - annoyin_kid on 19/12/2006 04:33:30
 

moxhamj

New Member
Flat batteries? Will the motor run for > 1 minute straight across the batteries? Will the circuit run using a 5V supply?
 

SD2100

New Member
Have you included the 22k & 10k download resistors in the circuit ??

If the motor is drawing too much from the batteries then it might be causing the 08m shut down. If the motor wouldn't run on one 2003 output so must be more than 500mA then it maybe overloading your battery supply.

If it's a toy motor does it have a capacitor across the motor connections if not then it might be causing noise problems with the 08m

Do you have a capacitor across the 08m supply ?.
 

jodicalhon

New Member
It seems strange to have 5-6V across your motor when you show a 4.5V supply in your schematic.

Is this motor the P9000 you linked to in your first post? If so, it should not be drawing anywhere near the current you measured. Unloaded current would be around 50mA, I think. It sounds like the motor is stalled.

I suggest taking the picaxe out of the circuit for the time being. <A href='http://tinypic.com/view/?pic=2aad44l' Target=_Blank>External Web Link</a>.

Does this run your motor?
 

jodicalhon

New Member
While I'm here I'll ask a question I've sometimes pondered:

What is the purpose of the internal base-emitter shunt resistors in these darlington driver chips? I've never added them when building discrete darlington drivers.

Just, y'know, idly wonderin'...
 

hippy

Ex-Staff (retired)
From the datasheet I have, &quot;The ULN2003 has a 2.7K series base resistor for each darlington pair for operation directly with TTL or 5V CMOS devices&quot;, and I guess the entire design ( including base-emitter shunts ) is to allow it to be plug and play regardless of what's driving it. No doubt there's a more detailed electrical explanation for it.
 
what are the capacitors i need across the 08m power supply and across the toy motor?
and what does you mean by the the motor is stalled?
ill try the schematic without the 08m in a second and get back to you guys.

like dr_acula suggested the battries aren't flat and the motor runs perfectly when conneted straight to the battrey, and yes it is the p9000 from my 1st and 2nd post. it also has the 22k and 10k programming cable resistors.

and like jo_c said it does seem strange it draws that much voltage, it might be just that the multi meter is screwed up - it was a cheap $10NZ one but its measured the voltage across the 4.5 battrey pack, 9v battrey and 3v battrey pretty accurately. sometimes the voltage drops to 3V but goes back up pretty soon. the voltage also doesn't stay constant - it keeps going up to 6v and down to 3v constantly.

ak
 
like jo_c said the motor does run with just the uln2003 but with only with one output. it makes no difference how many outputs i jack up to the motor it doesn't seem to get any faster. also when the motor is connected directly to the battrey pack it goes faster. do you guys out there know what is wrong and instead of using technical jargon can you please break it down to simple words that a beginer can understand.

ak
 

hippy

Ex-Staff (retired)
You can remove the PICAXE from your board, locate the I/O pin which drives the darlington input which controls your motor and use a bit of wire to switch it directly between +V and 0V.

If that controls the motor okay and can keep it running for a minute or more then there's some issue with the PICAXE ( hardware or software ), but if that doesn't work then you'll know the problem is with the power supply, darlington or wiring.
 
is it possible to somehow use the picaxe as a switch so that if the command is high 1 then it completes the circuit going to i/o 1 and the motor runs on a separate power supply to the picaxe such as a 9v battery like the one in this schematic:
http://i14.tinypic.com/29mljqb.jpg

if it is can you please post a schematic or a discription of the parts i need and how to set them up and warn me of any problems.

Edited by - annoyin_kid on 19/12/2006 22:17:13
 

BeanieBots

Moderator
Have a look at manual3 page 6.
It shows how to connect a motor to the ULN2003 darlington driver chip using a seperate power supply.

A &quot;stalled&quot; motor is one where the mechanical load on the motor is so high that it stops moving even when voltage is applied to it.

Do the tests that Hippy describes. This will help to find out where the problem is. From your previous posts, you were connecting the motor directly to the PICAXE. It is quite possible that doing that has damaged it.

I could not get any information about your motor. (the link no longer shows a motor).

Your diagram shows 4.5v. The driver chip will loose about 1v. Is 3.5v enough to make it work.

Your diagram does not show anything connected to serin. Although you have stated that you have the 10k/22k fitted, it is always a good idea to show the FULL diagram when asking for help when something does not work. The circuit will not work without those components so the obvious reply would be to tell you to fit them.

The capacitors you need are to suppress noise. At least one 100nF capacitor across the motor connections right on the motor itself and another 100nF on the power supply to the PICAXE as close as possible to its power pins. These will not fix your emmediate problem but will help to stop erratic behaviour and program crashes once you have your interfacing working properly.

Not sure what type of batteries you are using but if your motor is pulling about 0.8A and you are using AA type batteries, they will last about 1 hour. That is not very long when tinkering around. Put your voltmeter on the batteries and check that the voltage does not drop when you try to power the motor. Many hours have wasted trying to get projects to work when it was flat batteries all the time!
 

moxhamj

New Member
I agree with BeanieBots and others re all these suggestions. Flat batteries will still show full volts with no load. If I were building this and wanted to be sure it would work:

1) Seperate power supplies for picaxe and motors. If using batteries to run motors, use rechargeables.
2) Ideally, regulated supplies rather than batteries. Use a 9-15V plugpack - regulate with a 7805 for the motor/2003, and a 78L05 for the picaxe.
3) 33uF/0.1uF on output of each 5V regulator.
4) 0.1uF across the picaxe as previously mentioned.
5) include the 22k/10k as previously mentioned.
6) ground the unused pin 3 input with 10k.
7) with that schematic just posted using 9V on the motor, connect the two grounds together.
8) cap on the motor as previonsly mentioned to supress RF interference.
9) Have a spare 2003 and a spare picaxe and swap them to isolate problems.
10) put a led/1k on another output, eg output 2. Use code:
start: high 2
pause 1
low 2
main:high 4
goto main

this debugs the picaxe resetting due to power supply spikes/rf interference etc.

Edited by - Dr_Acula on 20/12/2006 00:08:00
 

steirny

Member
Try running your motor direct from 6v, (4 AA batteries), with a current meter in series. Observe the current increase when you slow the shaft down with your fingers. DO NOT stop it completely. That can be destructive.

When a motor stalls the current rises significantly. With a stopped motor the power is connected across only one winding instead of switching sequentially around them. The current is a function the dc resistance of that winding , (usually only a few ohms). The motor core is magnetically saturated and there is nothing to limit current.

As the motor speeds up saturation reduces, as will current, because the winding current has gone fronm dc to ac with increasing frequency. The windings are now an inductive load not resistive.

Stalled motors will get very hot and the affected winding will burn out. Anything in series could also be thermally stressed or fail, including the battery.

I suspect you may be running your motor from the 9v battery. These are only good for light loads. Currents &gt;20mA will flatten them fast. More current will cook them.

Check everything again.
 
when i run the motor on a separate power supply to the 08m it works fine so it must be the battries that are causing the problem.

im using one of those 9v box shaped battries and u guys said that the battries won't last too long. is this for the motor or the picaxe. if it is for the picaxe how can i reduce the power it uses? and if it is for the battrey im trying to get hold of a &quot;connection thing&quot; for a 7.2V power pack that i already have.

the motor should be able to handle 9v because it's power rating is 3-12v.

the 08m isn't burnt out yet because it still lights up led and does sound and infra in and out.

also is it possible to use a 9v/7.2V battrey to power the 08m without burning out the ic?

what is a 7805 and a 78L05 that dr_acula is talking about in tip 2 ?

and i know this may seem stupid but what do you guys mean by regulate, regulator, rf interference?

info about my motor:
Voltage Range: 3-12V, Nominal Voltage: 3V, Speed (no load): 3600 RPM, Current (no load): 0.07A, Torque@ Max Efficiency: 3.07g-cm. Body size: 20mm (diam.) x 25mm (long), Shaft size: 8.1mm (long), x 2mm (diam.)

Edited by - annoyin_kid on 20/12/2006 17:49:01

Edited by - annoyin_kid on 20/12/2006 17:54:43

Edited by - annoyin_kid on 20/12/2006 17:58:08
 

eclectic

Moderator
AK.

To start to answer some of your questions,
please read these pages of the Picaxe manuals.

Manual 1 pages 15 and 16
(power/7805)
Manual 3 page 11
(capacitor/motor/interference)

e.
 

hippy

Ex-Staff (retired)
<i>Is it possible to use a 9v/7.2V battery to power the 08m without burning out the ic? </i>

Not without putting that voltage through a regulator (7805/78L05) first, to drop it to a safe to use 5V.

There's no reason though that you cannot run the motor from the 9V/7.2V battery ( if your motor will take that ) while running the PICAXE from 4.5V ( 3 x AA ). Join the negative sides of the two battery packs together and connect them to the circuit's 0V.
 
one question about the capacitors:
i looked up 100nf capacitor on an electric store online catalogue (www.jaycar.co.nz) and i came with two types of capacitors:
1. 0.1UF/100NF GREENCAP METALLISED POLYESTER CAPACITOR
2. 0.1UF/100NF 630 VOLT GREENCAP METALLISED POLYESTER CAPACITOR

the same thing happened when i looked up 100uf capacitors but i got 17 results:

1. SMD CAPACITOR ELECTROLYTIC 100UF 10V - PACK 10
2. SMD CAPACITOR ELECTROLYTIC 100UF 16V - PACK 10
3. SMD CAPACITOR ELECTROLYTIC 100UF 25V - PACK 10
4. SMD CAPACITOR ELECTROLYTIC 100UF 35V - PACK 10
5. 100UF 16V RB ELECTROLYTIC CAPACITOR - 105OC
6. 100UF 25V RB ELECTROLYTIC CAPACITOR - 105OC
7. 100UF 63V RB ELECTROLYTIC CAPACITOR - 105OC
8. 100UF 400V RB ELECTROLYTIC CAPACITOR - 105OC
9. CAPACITOR ELECTROLYTIC 100UF 16V 105C L/ESR
10. CAPACITOR ELECTROLYTIC 100UF 25V 105C L/ESR
11. CAPACITOR ELECTROLYTIC 100UF 35V L/ESR
12. CAPACITOR ELECTROLYTIC 100UF 63V 105C L/ESR
13. 100UF 25V RBLL LOW LEAKAGE ELECTROLYTIC CAPACITOR
14. 100UF 50V BI-POLAR RB ELECTROLYTIC CAPACITOR
15. 100UF 100V NON-POLARISED ELECTROLYTIC CAPACITOR
16. SMD CAPACITOR TANTALUM 100UF 10V - PACK 10
17. SMD CAPACITOR TANTALUM 100UF 16V - PACK 10

which one of these do i use? the 100nf is for the motor supression and for a voltage regulator and the 100uf is for the voltage regulator. the voltage regulator circuit is from picaxe manual 1 page 16
please reply asap

Edited by - annoyin_kid on 20/12/2006 22:33:33
 

hippy

Ex-Staff (retired)
You've asked some very basic questions in this thread and appear to be out of your depth for what you are trying to do. There's nothing wrong with that, and I'm all for diving in, but I think you'll move along a lot faster overall and with more confidence and success if you take a short time out to do some research into basic electronics and peruse the web to read up on what others have done for their projects.

As to the capacitors, as you don't need 630V protection the first 100nF is probably what you are looking for. For the electrolytics, unless you have SMD soldering capability those can be scrubbed from the list. Likewise bi-polar and non-polarised aren't what you are looking for. Low leakage, low ESR probably aren't necessary and are likely more expensive so you can ignore those.

That leaves a handful of various voltage ratings; so what voltage are you putting across them, then add a little to be on the safe side. The regulated side is 5V and the unregulated input about 9V, so 16V should be fine to allow for any over-charge / over-voltage of the batteries.

You can usually use the same voltage rated electrolytic on the regulated side as the unregulated which keeps cost down when they come in multi-packs, but larger voltage often means larger size. Whether you want axial ( legs at each end ) or radial ( both legs at one end ) depends on your preference.

I usually grab whatever I have to hand, close to the value I want of anything above the voltage rating required and have had no problems. There's probably a lot of information and advice out there on better ways to choose and what is actually best to use. I'm no electronics expert ( so maybe not the best to advise you ) but have generally got along with just a basic level of understanding which should be very easy to pick up with a little bit of work, and is well worth the effort.

Edited by - hippy on 20/12/2006 23:13:30
 

moxhamj

New Member
Good Morning AK!

1) Re 0.1 caps, search the Jaycar catalogue for capacitors &#8211; monolythic. Get at least 10 of these &#8211; you will end up using them all. 25 are even cheaper.
2) 6. 100UF 25V RB ELECTROLYTIC CAPACITOR - 105OC looks about right. You don&#8217;t need SMD (surface mount) and you don&#8217;t need ESR ones. The volts could be 16 or 25 &#8211; just has to be a bit more than the highest volts you ever expect. Make sure the + and &#8211; are connected the right way &#8211; electrolytics get very unhappy if connected the wrong way.
3) 7805 is the standard 5V regulator that has been round forever. It runs to 1 amp. The 78L05 is a smaller package and runs to a max of 100mA. If you use these watch the pinouts as they are different.
4) The 9V square battery doesn&#8217;t have much capacity and is quite expensive. AA batteries are the best value. To keep it simple use 3 for the picaxe, and use 4 to run the motor. Connect the negatives together. The motor uses hundreds of times the power that the picaxe uses, and the motor batteries will go flat quite quickly. Flat batteries will cause all sorts of weird behavior and drive you quite mad.
5) If you are getting into electronics as a hobby then sooner or later you will need a power supply. It is good experience to build it yourself. If you can make PCBs then you are getting quite advanced, but to keep things simple get an 8 way tag strip. Put a 7805 on it and a 78L05. 100uF/0.1 on the output of each. Put it in a small jiffy box. Run it off a 12V plugpack. Put some banana plugs on the front. Label the outputs &#8211; 5V 1A and 5V 100mA. Run the picaxe off the 100mA supply, and motors/lights/small solenoids off the 1A supply. I built one of these when I was 12 and I still use it 25 years later.
6) When you next go past a Dick Smith store, pick up one of their catalogues. The data section at the back has heaps of useful electronics information.
7) A regulator simply gives the same output voltage no matter what its input voltage. Eg a 7805 gives out 5V when its input is anything from 7.5V to 40V. You wouldn&#8217;t usually put 40V in as it wastes a lot of heat, and a common input would be 9V to 12V. Most digital electronics runs on 5V.
8) RF interference is radio frequency interference. It is the pops and crackles you hear on an AM radio when near old mixmasters/vacuum cleaners. RF can get into weird places, like unused picaxe inputs and make them turn on and off when you don&#8217;t expect them to. Ground unused inputs with 10k resistors.
9) The motor looks fine for this application.
10) What is the 7.2V power pack you have? Is it a bunch of rechargeable batteries out of something, or is it something you plug into the wall?
11) Keep us posted!!!
 
i think i need to upgrade my motors to better high speed ones and buy a gearbox. yesterday i cellotaped the motors, bread board and battries to a piece of plastic, added wheels to the motors and added wheels to the opposite side to the motor, wired up my breadboard so it has an infrared reciever and tried to control it like a remote control car with my tv remote but the load was way too heavy. for now i'll stick with these motors untill i have everything working.
the battrey pack i got is actually a 9.6V rechargable battrey pack out of an old remote control car. i've seen them being sold in a hobby store but i cant remember how much they cost.

Edited by - annoyin_kid on 21/12/2006 17:09:56
 

Rickharris

Senior Member
driving wheels directly is almost always a failure. Although the motor will have a good off load speed (perhaps 2000RPM) it will have very little torque (Turning force) and so is easily stopped (stalled) This can damage the motor.

Added on to which if your wheels are about 45mm in diameter the car will do around 17 KPH at 2000 RPM - Fairly fast for a model.

In general either a gear box or drive the rim of the wheel with the motor shaft to slow things down but gain in torque.

Have a look at some robotics sites or a radio controlled car site you will see they use gear boxes. Do this before you buy bigger motors.
 
yea i got my eyes set on an awesome gearbox but im not sure if i can pull the motor out of it and add my own ones in. also i need to find a job because my parents are getting annoyed by me buying all this &quot;crap&quot;.
 

Rickharris

Senior Member
Show them you can actually produce something that works.

Then point out that IT engineers get a) very well paid and b) there is a world shortage of them.
 

steirny

Member
You can get motor / gearbox combinations from various hobby shops around the world. Jaycar in Australia have a good range in their catalog with output torque and rpm specs included.

Alternatively scrounge bits from any discarded equipment you can legitimately get your hands on. Its amazing what you can adapt to your needs. You'll also learn how the pros have done it.
 

SD2100

New Member
Have a look at Altronics, they have motorised bases, the base has 2 motors, gears, 6 wheels &amp; legs for $12. <A href='http://www.altronics.com.au/index.asp?area=item&amp;id=K1102 ' Target=_Blank>External Web Link</a>
 
Top