this must look like a really dumb question but please allow me.
say I have a 12V motor that I want to control with a micro (that is powered on 5V)
the normal thing I have done so far is to isolate the circuits with a photocoupler.
Instead of that I have been suggested to connect the output to a transistor and use that as a switch to the 12V circuit. now I dont know if that is stable or not but my question is even MORE BASIC than that.
1) If I connect the output of the micro to the transistor and the ground pin to ground, where do I connect the 5V pin to???
2) do I need a power source with two outputs (12V and 5v)?
3) What if I am using batteries? if I use 8 batteries(12V) where do I connect the micro 5V pin?
You can connect the negative lead of the 5v and the negative lead of the 12v supplies together. This is called "Common earth" or "Common ground" or "Common Chassis."
Connect the output of the micro to the base of the transistor via a 470R resistor. Connect the emitter of the transistor to 0v (chassis - earth) and the collector of the transistor to one terminal of the motor. Connect the other terminal of the motor to 12v.
Connect the microcontroller to the 0v rail and the 5v rail.
thank you for your reply. In conclusion i will join both power sources grounds.
Now for controlling the motor I plan to use a H-bridge (either buy or build with transistors)
I was thinking of using 2N3904 transistors (cause I have a few) but turns out that the maximum Ic is 200 mA. now normally motors require like 1A I read in a tutorial. I called the provider of my motor (cause there is no datasheet) and he told me my motor uses around 250~270 mA.
so in anycase i believe 2N3904 are out.
I am checking and it seems 2N2222 are much better for this (can deal with 800mA) but the Hfe is 75 compared to 2N3904's 100. Still it seems like a good option to build a H-bridge.
Now, my question:
I have also with me one Toshiba TA7291S ( a bridge driver).
TA7291S datasheet (pdf)
Do you think this is a good option for my motor. I cant seem to understand the specs in the datasheet. Are the transistors of this bridge driver adequate for my motor?
Also i dont understand very well what VCC VS and Vref are. i am using a 12V motor and a normal PIC (5V)
The starting current for your motor will be 2 amp and when a load is applied, the current will rise to 600mA.
You need 2A transistors PNP and NPN - unless you use all NPN.
I hve a very clever circuit that allows 12v H-bridge with 5v micro and all NPN transistors. .
The starting current will be 2 amp. As the motor increases in rpm the current will decrease to 200mA. Then when you put a slight load on the motor, the current will rise to 500 to 600 mA. This is what you have to take into account.