hi all, i was driving a ticket dispenser, like this pic :

heres the spec:

and heres the schematic of the dispenser:

or here for the bigger one.

i was using a buffer to connect to blue wire , and read the sensor from notch pin. i using one power supply to power all. when i make a program to enable the motor periodically, i.e. motor on for a while, motor stop a bit, motor on again, and soon. but i dont know how, sometimes i get stuck , and lately i touch the chip.... sh******! it almost burn my finger!!*&^!!@
so, for short, anybody know what the heck happen here? i have had trying to isolate from ticket dispenser with a, yes, i just use a not schmitt gate, but it cant be leak from there, can it?

Posted on 2003-06-25 07:17:15 by dion
Hi, dion,

You say you are powering everything from the same supply. I hope the 89C51 has its own +5V regulator!

I suspect what happened is you used a 74C14 powered from 12V (the motor voltage) and you fed its output directly to the 89C51. Since the 74C14 was powered from 12V, its output can reach almost 12V when outputting a HIGH. The 89C51 cannot accept such a high input voltage, and that is probably why it got hot.
(If you were to measure the output of the 74C14 under those conditions, you would measure just about 5.6V, since the 89C51 may clamp the input voltage. However, the current into the pin would be very high, overheating the part).

Since the NOTCH output is open-collector (Q3), you do not need any 74C14.
Simply connect the NOTCH signal directly to an input of your 89C51 and use a pullup resistor (1~10K) from that pin to +5V (the uC power).
I think this will solve the problem.
Posted on 2003-07-14 19:21:21 by VVV

VVV, you dont check account mail very often, do you? ;)
Posted on 2003-07-14 20:56:46 by NaN
hi VVV, thanks regarding my thread :)

i take time to draw the pic of my circuit, it so simple, but i have to give it a shot anyway :)

i used all power from ONE power supply. the power supply give me +5V regulated, and 12V regulated. so i dont use any 7805. i was afraid about the ripple it cause. so, the 5V power my circuit, and the 12V power the ticket dispenser circuit.

Since the NOTCH output is open-collector (Q3), you do not need any 74C14.

i understand it already, VVV. what i mean is just to put a barrier/buffer in the middle of my interface to ticket dispenser board. and note that 74C14 is used by ticket dispenser board, NOT mine. i use simple 7404 inverter.

why i bother to use a buffer? it is very often that in real life, improper join in the socket/wrong connection is a thing that mostly happen everytime. so, you can imagine if notch is wrongly connected to +12, or the motor enable, or the +12 and gnd reversed . with a buffer, i can insulate the dangerous area by then.

now, i was very suspicious about this. many and many more of my friend who design/make application with motor was having a pretty bad day! when i was asked why this can be happen, i just say i dont know, you know i have that problem too! and until now i have no idea why such many arcade that only using ONE power supply, and having ticket dispenser too, dont have such problem! darn!!! what the heck i forgot about? for instance, my friend using same mcu to drive a tape motor using L297/? i dont remember, but the wierd thing is, that small motor is make our mcu burned really hot! i just dont believe that. and i just silent when they ask me why :(
i hope that clear what i mean, VVV :)
Posted on 2003-07-15 06:09:24 by dion
Hi, dion,

Yes, it is clear to me now what you were doing. I don't see any problem with that (the pullup is still needed fron NOTCH to +5V). The use of buffers is recommended.
But now I have no clue as to why the micro got hot.

The only thing I can suggest is check with a scope the +5V on the micro while the motor is running. Make sure the grounds are properly connected, because a difference in ground potential can make the inputs appear negative. And a similar problem can occur when the inputs are driven negative.
So check the pins on the micro, under various operating conditions: start, stop, etc. Watch for transients on these pins and on the +5V. They can cause a latch-up, which means the micro will continue to draw a high current from +5V even after the transient is gone.
If you see anything suspicious, add an RC filter to that pin. That can also help if transients are induced by the motor into the circuit wiring.

Sorry, that is all I can offer.
Posted on 2003-07-15 11:58:29 by VVV
thanks anyway VVV, i got confused too because it happen sometimes. actually i had been made it several days ago. its all okay right now. no more hot. but i still have something curious about that, especially when not only mine, but my friend project (thesis actually) was suddenly death, i mean the mcu got really hot meanwhile they said its not like that before, just before the demo, the device was stuck not working. and guess what, they handling motor dc using same L297/somewhat like that, using same mcu, and dc motor. then they say, they had replace the mcu, and then they got their L297 hot. the dc motor still not working. i am not look at their circuit yet, but this is not the only one story about driving motor problem. this is what made me felt really dumb.

i mean there is must be some rules in using L297 chip about the motor feedback or some other reason. i take a look at the datasheet that they had diode inside, so, how come there is stiil feedback from motor winding current? okay, to be foolish, my friend add external diode to the motor. but no effect, the mcu still hot. are we have to add a diode in circuit power supply, like what we did to ensure that the polarity is correct? is it useful? lately but i dont see how, my pal said he add a resistor and everything is allright. shees... i just forgot to ask him where did he add the resistor to? i'll ask him as soon as i met him.

about latch up. you talk about this several times, VVV, but frankly i dont really get what you meant. could you explore more on this?

Posted on 2003-07-17 05:45:50 by dion
Those diodes on the 297 are in reverse biase, and are wired to be parallel to the motor windings. This is to shut inductive spiking (V = L * di / dt). The diodes would be forward biased from an inductive voltage "kick back" and hence allowes current to cycle untill the coil de-energizes.

Posted on 2003-07-17 16:46:15 by NaN
Hi, dion,

I don't think the L297 has anything to do with it. You can post the schematic and I can try to look at it, but I am almost certain the answer is not obvious. It sounds to me like a latchup problem.

As I suggested in the previous post, try monitoring the pins of the 89C51 (whith the motor running in different modes) and see if there are any spikes on them. That could be because of wiring, or because of PCB layout. It is recommended that you have a ground plane on your PCB.

As for latchup, read the following article. It explains very well how latchup occurs, and some things you can do to prevent it. Although not everything is applicable to your application.


Good luck!
Posted on 2003-07-17 18:12:32 by VVV
First of all do you know the impedance of the motor? I would sumize that it is a low impeadance being only the resistance of the wire windings. The output of a schmit trigger is very high. Therefore you have an impedance mismatch. You need a darlington pair or a emitter follower (single stage) common collector circuit inbetween the '14 and the motor (load). Common collector circuits are high impedance in and low impedance out. I would use a large signal transistor like a TIP120 in the impeadance matching network. I have had tremendous success using them as speaker drivers at levels of 15 and 20 watts. LOL , tell me how to paste a schematic here and I'll show you some circuits.
Posted on 2003-07-18 23:44:22 by mrgone
I thought I'd post this to clarify a few things:

The L297 is a stepper motor driver, which means the motor must be a stepper motor. Right, dion?
The L297 is meant to be used with power drivers, such as the L298, or power transistors (Darlington most often).

Impedance of DC motors is kept deliberately low, to minimize the power dissipation. The low resistance of the motor windings does not mean, however, that the current is simply U/R. That is because the back emf comes into play, whenever the motor is running. The current is proportional to the output torque. The current is U/R only when the rotor is locked, or at startup. That is why it is necessary to use current limiting techniques with higher power motors.

For stepper motors, the resistance of the windings can be higher, especially for unipolar motors, where the resistance of the winding is used to limit the winding current. Under those conditons, the current in the phases is really U/R.

With bipolar stepper motors, which is what the L297 is intended for, the resistance of the windings is generally lower, but the current is limited externally. The L297 does that, using a sense resistor to "measure" the current.

Impedance matching is not a real issue in power electronics. It is important when you need to minimize reflections, such as in RF circuits.
In motor drive, the currents are generally switched ON of OFF, so it is necessary to have switches with low voltage drop across them, to minimize power losses. You can not talk about impedance matching. Impedance matching would mean you lose 50% of the power in the drivers. That is not acceptable.

Even an audio power amplifier has an output impedance much lower than that of the speakers. That allows you to drive the speakers at high power levels, while the amplifier dissipates relatively low power, keeping the heatsinks at a reasonable size.

Hope this helps a little.
Posted on 2003-07-21 11:44:53 by VVV
You sound like you know what your talking about VVV but I beg to differ with you in that impedance IS important, no VERY IMPORTANT universally in all types of circuits unless you like wasting power all over the place and running parts much hotter than spec. Too many examples to go into. Impedance matching and buffering when questionable is always the best coice.
Posted on 2003-07-21 12:21:33 by mrgone
thanks you for replying guys :grin:

sorry, i was so busy those days. work till 11 night. thanks mrgone, i would take any point here. i said about L297, its my friend's project. he's driving a tape motor, which i think its dc motor, not stepper. uhm.. maybe thats why he got that problem. about the pairs(L298), yes, it is designed to be like that. shees, i was so forgotful man. i'll need read the AN sheet further. i know little about impedance, but i'll take heed when i have to face it.

mrgone, about using darlington, if you're talking about my circuit, its no need. please see the ticket dispenser board. it is all there. all i have to do, as the spec said, is to drive the motor enable to higher than some volts, which is can be obtain from ttl high level voltage. all the nitty gritty to drive the motor should be take care by the ticket dispenser board.
Posted on 2003-07-22 06:44:17 by dion