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.

please tell if i have something wrong

Status
Not open for further replies.

watzmann

New Member
Hi All ,

i have made a schematic for a PIC 16f877 controlling 2 DC-Motors .

here is the photo attached for this schematic ..... i used optocoupler pc817 to recieve the signal from the pic and to then the optocoupler send a signal of 12 volt to the H-Bridge.

i'm using 4 optocouplers ....each two for one H-Bridge.



please look at it and tell me in case i have something wrong.
 

Attachments

  • photo.jpg
    photo.jpg
    152.6 KB · Views: 230
I can't see anything wrong with it in a technical sense - that PIC should easilly be able to activate each opto-isolato with no trouble.

However, practically speaking, this is a totally stupid idea, for a start, how small's your motor? Secondly there's no point in using expensive opto-isolators on two circuits that don't need to be isolated from on another when cheap transistors will do.
 
o.k , but my H-Bridge circvuit doesn't work below 12 volt signal.

so how can i send 12 volt signal wih the PIC.............i'm looking forward to hear your smart idea
 
o.k you're talking about transistors..............i think optocouplers are so cheap too.

it cost hear in egypt 1pound = 15 cent
 
watzmann said:
o.k , but my H-Bridge circvuit doesn't work below 12 volt signal.
Why not?

Probably because it's poorly designed?

so how can i send 12 volt signal wih the PIC.............i'm looking forward to hear your smart idea
Use PNP transistors for the high side drivers and NPN transistors for the low side.

If the motor is small and the transistors have a high gain you can drive the bottom transistors directly from the PIC using an approprietly sized base resistor. If not, use PNP transistors to connect their bases to the +5V rail.

The high side transistors can be driven by using a NPN to switch them to 0V.

Plenty of examples of h-bridge circuit can be found using Google.
 
watzmann said:
o.k , but my H-Bridge circvuit doesn't work below 12 volt signal.

so how can i send 12 volt signal wih the PIC?
The PIC drives the base of an NPN transistor through a current-limiting resistor. The negative wire of the motor is connected to the collector of the transistor. The emitter is at ground.

The PIC drives the base of another NPN transistor. It drives the base of a PNP transistor through a current-limiting resistor. The positive wire of the motor is connected to the collector of the PNP transistor. the emitter is at +12V.

Make another circuit as above to reverse the motor.
 
o.k , look here is the H-Bridge i'm using........if i sent a signal 5 volt or anyway below 12 volt.......motors work but very slow.....for that i decided to send the 12 volt as a signal .

why my motors work so slow with 5 volt signal?
 

Attachments

  • H-Bridge.jpg
    H-Bridge.jpg
    301.4 KB · Views: 219
watzmann said:
o.k , look here is the H-Bridge i'm using........if i sent a signal 5 volt or anyway below 12 volt.......motors work but very slow.....for that i decided to send the 12 volt as a signal .

why my motors work so slow with 5 volt signal?

hi,
If your Hbridge supply voltage is +12V then you should use a +12V signal to switch the top two transistors, connected as emitter followers hard ON.

Use the same Voltage drive as the voltage supply to the Hbridge.

As I dont know the specification of the motor I have to assume its 12V.
I dont know what current it requires, BUT the current from the opto transistor output is probably insufficient to drive the Hbridge transistors hard enough.

What the spec on the motor?
 
Or, as audioguru and me have been saying use PNP transistors for the top two transistors.

Like I said before, it's bad design practice; this circuit isn't supposed to operate a 12V motor from a 5V circuit. It will be fine operating 6V motors from a 12V control circuit, but not the other way round.
 
Hero999 said:
Or, as audioguru and me have been saying use PNP transistors for the top two transistors.

Like I said before, it's bad design practice; this circuit isn't supposed to operate a 12V motor from a 5V circuit. It will be fine operating 6V motors from a 12V control circuit, but not the other way round.

hi hero,
I 'think' what he trying to do, is to use the opto's as level shifters from +5V to +12V, which is an acceptable way to do it. I agree its not the best way.

He is trying to drive TIP transistors directly with the output from the opto transistor and there is not enough TIP base current to get the maximum drive from the TIP, I think thats where the problem lies. [he still hasn't told us the motor specification Volts, Amps???}
 
The weak opto-couplers have a current transfer ratio of 50% to 600%.
So if their LEDs are driven with 25mA (the max allowed from a PIC) then the TIP41 power transistors get a base current as low as 6.3mA each!

Replace the optos with BC337 transistors that can amplify the 25ma from the PIC to the transistor's max allowed output current of 800mA which is plenty to drive each pair of TIP41 power transistors.
 
o.k , my motor specification is 12 Volt-2Amp......but i'm sorry i'm not convinced about that my motors will not be able to work well because the limited current ....

i just need 12 volt signal from the opto coupler , but the current is not important at all.

this signal from the optocoupler works as a trigger for my H-Bridge circuits....but my motors draw it's volt and current from the H-Bridge Circuit.

Anyway you can look at this block diagram ...i have made it to avoid any misunderstanding and to show you my idea....may be it still a stupid one but i'm still beginner.:)

finally i think even if i run a motor with 5Amp it will work too because i don't draw anything from the optocoupler.

look at the block diagram and tell me if i'm still wrong or not !!
 

Attachments

  • Block Diagram.jpg
    Block Diagram.jpg
    82.9 KB · Views: 222
watzmann said:
o.k , my motor specification is 12 Volt-2Amp......but i'm sorry i'm not convinced about that my motors will not be able to work well because the limited current ....

i just need 12 volt signal from the opto coupler , but the current is not important at all.

this signal from the optocoupler works as a trigger for my H-Bridge circuits....but my motors draw it's volt and current from the H-Bridge Circuit.

Anyway you can look at this block diagram ...i have made it to avoid any misunderstanding and to show you my idea....may be it still a stupid one but i'm still beginner.:)

finally i think even if i run a motor with 5Amp it will work too because i don't draw anything from the optocoupler.

look at the block diagram and tell me if i'm still wrong or not !!

hi,
Its important to remember that transistors are current controlled devices not voltage, FET's are voltage controlled.

So as transistors are current amplifiers they require a base-emitter current.
If the current gain of a power transistor is say *20 and you want it to have a collector current of 2amp, it requires a base curren of 2/20, that is 0.1amp.

As the output current from the opto transistor is only about 0.01amp [10mA] you will only get a collector current of about 20 * 0.01 = 0.2amp!!! [thru the motor]

Do you follow this?, please ask if you dont.:)
 
solution is using the bc337 transistor?

anyway i have build the optocoupler circuit and it worked well with a small motors which draw a very low current .... i haven't tried it yet with the 12 volt motors...

o.k i'll build a new one with the BC 337 and hope it will work too.
at least i'm happy now that i have learnet something new
 
watzmann said:
this is correct ?
hi,

No, if you consider the two top transistors in your Hbridge, they will not be turned ON.

I'll draw a sketch and post it, explains it easier.
 
hi,
Does this make it clearer.


Think about driving with PNP transistors, draw a diagram.


EDIT: added transistors.
Problem with this Hbridge is that both sides of the 'H' could be easily turned ON, which would damage the power transistors.
Its usual to use a cross coupled Hbridge in order to minimize that problem
 

Attachments

  • hb2.gif
    0 bytes · Views: 16
  • hb3.gif
    hb3.gif
    74.1 KB · Views: 197
Last edited:
If the absolute max current for the motor is 3A (starting, driving a heavy load and when stalled) then I think this circuit is best since it doesn't have the voltage loss of an emitter-follower:
 

Attachments

  • h-bridge transistors.PNG
    h-bridge transistors.PNG
    12.3 KB · Views: 256
hi agu,
I agree, thats a far superior circuit than the version he got from elsewhere.:)
 
o.k i think i'll go on with this new modification as you posted.....but you here using two differant transistors one is bc337 but the other one i don't know .

about the resitisors i assume it's 1 Kohm

anyway could you please write the name of the other transistor.
 

Attachments

  • hb3.gif
    hb3.gif
    74.1 KB · Views: 225
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top