Author Topic: Designing simple h-bridge but question on changing current direction  (Read 2120 times)

0 Members and 1 Guest are viewing this topic.

Offline codeblueTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
ok so here is what im trying to do basically i want to use a transistor to build and h-bridge... but i want to be able to switch the direction the motor is running too... so my question is there a way to change current with out having to use two digital outputs on microcontroller, and having two use two different transistors going to the power source per motor

Offline corrado33

  • Supreme Robot
  • *****
  • Posts: 611
  • Helpful? 11
Re: Designing simple h-bridge but question on changing current direction
« Reply #1 on: April 12, 2010, 07:30:58 AM »
For an H-Bridge, four transistors are needed.  Hence the "H".  The motor is in the middle, and the four transistors are at the corners of the H.  You need two outputs on your microcontroller to control it correctly, unless there is some kind of magic H bridge that works using less parts and if there was, I'm pretty sure everybody would know about it.  Check the H-bridge tutorial on this site, it's really useful.  http://www.societyofrobots.com/schematics_h-bridgedes.shtml

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects

Offline corrado33

  • Supreme Robot
  • *****
  • Posts: 611
  • Helpful? 11
Re: Designing simple h-bridge but question on changing current direction
« Reply #3 on: April 12, 2010, 04:03:50 PM »
http://www.societyofrobots.com/member_tutorials/node/161

Hmmm.. cool but you still need to use two MCU outputs, which I think is that the OP wanted to avoid. 

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: Designing simple h-bridge but question on changing current direction
« Reply #4 on: April 12, 2010, 04:13:06 PM »
http://www.societyofrobots.com/member_tutorials/node/161

Hmmm.. cool but you still need to use two MCU outputs, which I think is that the OP wanted to avoid. 

On a "basic" setup you need three (two for direction and one for speed), I thought the OP wanted to avoid the two digital pin for direction.
But maybe I misunderstood :)

Offline corrado33

  • Supreme Robot
  • *****
  • Posts: 611
  • Helpful? 11
Re: Designing simple h-bridge but question on changing current direction
« Reply #5 on: April 12, 2010, 04:45:24 PM »
http://www.societyofrobots.com/member_tutorials/node/161

Hmmm.. cool but you still need to use two MCU outputs, which I think is that the OP wanted to avoid. 

On a "basic" setup you need three (two for direction and one for speed), I thought the OP wanted to avoid the two digital pin for direction.
But maybe I misunderstood :)


Oh!  Maybe I misunderstood.  Thanks for clearing that up!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Designing simple h-bridge but question on changing current direction
« Reply #6 on: April 12, 2010, 06:14:57 PM »
Hi,

i want to be able to switch the direction the motor is running too... so my question is there a way to change current with out having to use two digital outputs on microcontroller, and having two use two different transistors going to the power source per motor
An H-bridge is an H-bridge is an H-bridge (but not a rose), so no, but you can control both the direction and speed of a motor by a single (signal) line (+ power and ground). You need a motor controller which is the functional equivalent of a servo, changing speed instead of angle.

If you just don't wanna shell out for 4 power MOSFETs, a single and relay will go a long way (with the associated "glue" circuitry) and it will need 2 signal lines, one for PWM and one for direction. This circuit shows how that can be done.

Some people (a lot of them in fact) dislikes the relay, but it keeps you from snuffing 4 power MOSFETs in a single moment of distraction while writing your code and you shouldn't ever go directly from forward to reverse at any speed above idle anyway, unless your bridge are designed for serious over voltage (and current), as power braking will give.

That aside, a relay makes the circuit much simpler as well (it can be simpler than the one in the schematic if it isn't going to handle much power).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline codeblueTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: Designing simple h-bridge but question on changing current direction
« Reply #7 on: April 13, 2010, 07:13:17 PM »
ok... i see what your saying... its no problem using 4 MOSFETS just triying to see if it required 4.... I should have looked up a schematic before posting.. dumb me

 


Get Your Ad Here

data_list