Author Topic: 12vdc motor fwd/rev with photo transistor  (Read 707 times)

0 Members and 1 Guest are viewing this topic.

Offline YankeePirateTopic starter

  • Newbie
  • Posts: 5
  • Country: us
12vdc motor fwd/rev with photo transistor
« on: January 03, 2025, 07:20:42 pm »
Two phototransistors (?5vdc) drive a 12vdc 3 amp motor fwd/rev using the circuit so when light is detected by one motor goes fwd, and other makes it go rev. I have begun buying parts shown. Are resistors and mosfet correct?
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 634
  • Country: ie
    • LinkedIn
Re: 12vdc motor fwd/rev with photo transistor
« Reply #1 on: January 03, 2025, 08:03:13 pm »
This is will not work out. To drive motor you need to apply '+' and '-' for BOTH pins of motor. Your circuit can apply only '+', but this is not enough.
 

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1214
  • Country: gb
Re: 12vdc motor fwd/rev with photo transistor
« Reply #2 on: January 03, 2025, 08:17:25 pm »
Probably better to built your system around a H-bridge chip (assuming the current needed in the motor isn't too high) like a TB6612FNG or the rather inefficient old L293D. Then use an opamp to monitor the phototransistor so as to detect light levels, put this through another op-amp acting as a comparator with hysteresis (op-amps usually come in multi op-amp packages, so you might as well slightly misuse one op-amp to be a comparator rather than get a dedicated comparator chip), then feed this signal to the h-bridge chip. You sound like a beginner, so you'll definitely find it easier to work with IC chips (like op-amps, varous logic gates, and h-bridges) than with discrete transistors or MOSFETs.
 

Offline YankeePirateTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: 12vdc motor fwd/rev with photo transistor
« Reply #3 on: January 03, 2025, 09:16:41 pm »
In this version I added 2 MOSFETs to handle Ground. Will that work?
 

Offline YankeePirateTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: 12vdc motor fwd/rev with photo transistor
« Reply #4 on: January 03, 2025, 09:20:42 pm »
Should I add a resistor to the ground leg or before the 2nd Gates leading to ground?
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 634
  • Country: ie
    • LinkedIn
Re: 12vdc motor fwd/rev with photo transistor
« Reply #5 on: January 03, 2025, 09:27:45 pm »
Quote
In this version I added 2 MOSFETs to handle Ground. Will that work?
No. You have to provide control voltage to Gates of upper MOSFETS relative to these Sources, which now connected to motor, not to Ground.
You need control circuits for so called HiSide MOSFET connection.
 

Offline techninja80

  • Regular Contributor
  • *
  • Posts: 54
  • Country: ca
Re: 12vdc motor fwd/rev with photo transistor
« Reply #6 on: January 04, 2025, 03:11:31 am »
If you need to keep it discreet components, then this seems to be a good schematic. It seems to be what you are trying to do.

https://www.precisionmicrodrives.com/discrete-h-bridge-circuit-enhanced-vibration-motor-control

 

Offline YankeePirateTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: 12vdc motor fwd/rev with photo transistor
« Reply #7 on: January 04, 2025, 04:15:48 am »
Thank you. The H Bridge article suggests the entire circuit also exists in a single package. What is confusing is A A' B B' ?where is input/output. Will try tracing performance.
 

Offline techninja80

  • Regular Contributor
  • *
  • Posts: 54
  • Country: ca
Re: 12vdc motor fwd/rev with photo transistor
« Reply #8 on: January 04, 2025, 04:44:52 am »
You need to address all four pins as inputs. From what I remember there was a truth table to it. But to simpify it. I think it was
A=on A' = off (motor spins clockwise)
B=off B' = ON (motor spins clockwise)
A=off A' = on (motor spins anticlockwise)
B=on B'=off (motor spins antniclockwise)
B=on B'=on (motor breaks applied)
A=on A'=on (motor breaks applied)

The M in the middle is the motor (output), it will have two leads. You will connect the two of them as the schematic shows. It does not matter what way it goes the hbridge will control direction. The capacitor at the bottom is for noise cancellation, that just connects from on side of the motor to the other.

Don't take my word for it. I am just going from memory. But yeah all four need addressing most use some type of IC like Arduino. Or you can just get the H-bridge IC like a L9110H and just use that. You most likely will need heat sync's on all four Transistors if you build it yourself for any real amps. So best to get the IC, and do one heat sink.
« Last Edit: January 04, 2025, 04:51:47 am by techninja80 »
 

Offline YankeePirateTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: 12vdc motor fwd/rev with photo transistor
« Reply #9 on: January 04, 2025, 07:54:49 am »
Found these for $13 for 50A and $6 for 3.6A

This just leaves the trigger signal coming from phototransistors/light detector
 

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1214
  • Country: gb
Re: 12vdc motor fwd/rev with photo transistor
« Reply #10 on: January 09, 2025, 07:27:14 pm »
Yankee pirate, some of those devboards might not be top quality (some are known for not working well at high frequency PWM rates and risking shorting themselves if you screw on a heatsink too tightly), but they'll work well for a basic prototype of your system.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf