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.

motor pwm making pic go wierd

Status
Not open for further replies.

atntias

New Member
hi,
i connected a motor to a pic via the l298 with diodes and everything and every time i used the motor the pic would act strange so for example leds blinking would dim in and out of view and blink on and off.. so i tryed giving the motor its own voltage regulator and apply the pwm by a transistor and not directly.
but still i get stange behavier when using the motor.
here is my final schem there both of set of 60 leds and a single led act strange both together and each sepretly.

im lost whats going on here?
 

Attachments

  • 12.png
    12.png
    15.2 KB · Views: 358
Last edited:
Check the base current draws for T1 and T2 to be sure they are within the maximum allowed individually and in total for the PIC (maybe put in a small base resistor and measure voltage drop). T2 looks like its collector is grounded. How dose that transistor then supply the LEDs? John
 
about the transistor with 2 gnd's that my mistake thats cus i first built circuit and then drew the schem. i fixed it...

as for the current i conected the led to 12V and mesuered current i got 2.2A wich seems allot or maby not (60 leds after all..) it 2 of these **broken link removed**
and the current in the base of t1 is 10ma if i mesured right, but niether one of the transistors t1 t2 get hot even a bit, what dose get extrmly hot is the l298 but as i understood its suppose to be like that.
but im not quiet sure i understood what we are cheking here can you explain me what could be the problem?
 
well i think i got what the problem is. with 2.2A for the leds and 1A for the motor that 3.2A when my power supply is only 2.3A... so voltage drop and things like that....
is there anything i can do or must i change power supply?
 
I think you still have T2 connected backward. Emitter should go toward ground. As you know, the max per pin of the PIC is 25 mA, and T2 will have a significant base current as drawn. You may consider using a mosfet instead of the TIP41 for T2. If you do that, don't forget to put a small resistor in the gate circuit. There are lots of application sheets to show you how. I typically use something around 10 to 22 ohms, but larger ones can also work. They slow down the turn on of the mosfet, so don't go too big. John
 
well your right once agian colector and emiter are revesed but when i tryed mesuring base current for t2 i dont know wich way is right to mesure it basicly led blinking on and off real fast so it like pwm, when i mesured current a dc i got 10mA but for ac i got 40ma

but like i said the tip41 dosnt get hot so i dont think that the prob..
 
I read each post but I cant tell if your still having problems..

I would say that you need a Large (>47uf) bypass capacitor on the PICs Vdd pin..


Just put a cap between Ground and V+ of the PIC.. directly on the V+ pin of the pick for best results..

I was working with a small motor connected to a PIC when I found a similar problem.. everytime the pic activated the relay it would reset.. (Brown Out)

Adding the cap will supply the extra charge needed to keep the PIC running.

Edit: Hmm I didnt realize your using an extra motor driving IC.. a bit different setup than I had imagined..
 
Last edited:
A bypass cap of 0.1 ufd won't hurt. I would also pull the MCLR pin high with a resistor. John
 
I turned around your backwards darlington transistor and added a base resistor to limit the current from the PIC so the PIC won't melt.

On another website there is a High Power Mood Light project. The PIC drove the base of a driver transistor without a current-limiting resistor. People who made it reported that their PIC got so hot it stopped!
 

Attachments

  • LED driver.PNG
    LED driver.PNG
    16 KB · Views: 422
Status
Not open for further replies.

Latest threads

Back
Top