go_away

Author Topic: H bridge use less inputs with minimal components  (Read 1566 times)

0 Members and 1 Guest are viewing this topic.

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
H bridge use less inputs with minimal components
« on: August 04, 2010, 03:53:06 PM »
ok so i am using an L293D quad half H bridge (my new most favoritest chip in the whole world!) to control some gutted servos in order to allow easier control and overvolting but in order to give all the servos a full range of movement i require 4 pins of I/O if i want to use PWM. now i don't think that i can cut power to the chip in anyway without cutting both motors off. I've thought about using logic gates to lower that down to 3 pins but that will take more weight and space then i would like.
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: H bridge use less inputs with minimal components
« Reply #1 on: August 05, 2010, 10:50:46 AM »
So you want to use less pins in general or less PWM pins?

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: H bridge use less inputs with minimal components
« Reply #2 on: August 05, 2010, 12:18:46 PM »
less pins in general. all the vcc pins are conected inside the chip so i can't have 2 different speeds on both motors without using all 4 pins. the grounds all need to be connected in order for the chip to work as well it seems.
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,136
  • Helpful? 109
Re: H bridge use less inputs with minimal components
« Reply #3 on: August 05, 2010, 12:20:30 PM »
See my motor controller tutorial http://www.societyofrobots.com/member_tutorials/node/164

It only requires two pins per motor: one for PWM (ie speed) and one for direction (Fwd/Reverse).
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: H bridge use less inputs with minimal components
« Reply #4 on: August 05, 2010, 12:45:08 PM »
See my motor controller tutorial http://www.societyofrobots.com/member_tutorials/node/164

It only requires two pins per motor: one for PWM (ie speed) and one for direction (Fwd/Reverse).



ya that's what i'm at now. i'm thinking the only way to make it use less pins on my mcu would be to have a tiny mcu that would recieve a byte from my "main" mcu and act upon it but that's getting a bit redundant. i'm thinking 4 pins on my arduino is not going to KILL me but i hate wasting just about any resource be it weight, pins ect. now i need to sort out my sensors
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,136
  • Helpful? 109
Re: H bridge use less inputs with minimal components
« Reply #5 on: August 05, 2010, 12:49:24 PM »
The 'special' thing on my circuit is that the transistor is not just acting as an inverter. If you change the pin to an input pin (ie it becomes a high impedance output) then it also allows you to 'brake' the motors.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: H bridge use less inputs with minimal components
« Reply #6 on: August 05, 2010, 01:05:51 PM »
If you don't want to waste pins check out shift registers and multiplexers, very handy  :)

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: H bridge use less inputs with minimal components
« Reply #7 on: August 05, 2010, 03:41:45 PM »
If you don't want to waste pins check out shift registers and multiplexers, very handy  :)

oh ya i've thought about shift registers and am familiar with multiplexers. i love going down to the basics with digital logic but my biggest concern in my current project is weight (150g autonomous antweight robot). right now i'm making the basic prototype of the robot i want to have in the end (only on protoboard instead of a pcb) so i can do a bit of experimenting
« Last Edit: August 05, 2010, 03:43:55 PM by blackbeard »
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: H bridge use less inputs with minimal components
« Reply #8 on: August 05, 2010, 03:43:05 PM »
ST micro do other L29x devices that work in conjunction with each other. for example:
 I used the L298 full bridge driver to control stepper motors with. this required 6 outputs per driver. I'm just in the middle of making a new motor controller and incorporating the L297 which connects to the L298. The new controller will require just 2 outputs from my microcontroller rather than the 6 it used to need(per motor).
Maybe theres an L29x device that can be used in conjunction with your L293

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: H bridge use less inputs with minimal components
« Reply #9 on: August 05, 2010, 03:45:23 PM »
alternatively, check this out http://www.robotroom.com/HBridge.html
motor controller with just 2 pins

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: H bridge use less inputs with minimal components
« Reply #10 on: August 05, 2010, 04:09:21 PM »
oh ya it still only uses 2 pins but i'm just OCD about pin usage sometimes :P.
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: H bridge use less inputs with minimal components
« Reply #11 on: August 05, 2010, 05:17:44 PM »
so....

Ive just got to ask ;D

 Why did you gut the servos? if you had just modified them, you could have controlled them with just 1 pin as in the $50 robot tutorial. ???

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: H bridge use less inputs with minimal components
« Reply #12 on: August 05, 2010, 06:39:39 PM »
well funny story that. so i was intrigued when i got this servo controller at my local electronics parts store.
http://www.solarbotics.com/products/k_smd/

after looking at it i was wondering why they used a 16 pin IC to control one servo and did so using 3 pins! i knew it had to be some sort of H bridge and i assumed that it wasn't being used to it's full potential. i lacked readily available motors and all i could find were these hacked servos so i gutted them since the boards inside were cheep and low quality anyway. turns out that i was right and that the one chip could work with 2 motors and controlled them much better then the hacked servos. the drive system is much better with the H bridge in my opinion so i think i'd like to stick with it :P

edit: i also found the chips for $2 so it's very economical!
« Last Edit: August 05, 2010, 06:44:47 PM by blackbeard »
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,136
  • Helpful? 109
Re: H bridge use less inputs with minimal components
« Reply #13 on: August 05, 2010, 06:58:53 PM »
ST micro do other L29x devices that work in conjunction with each other. for example:
 I used the L298 full bridge driver to control stepper motors with. this required 6 outputs per driver. I'm just in the middle of making a new motor controller and incorporating the L297 which connects to the L298. The new controller will require just 2 outputs from my microcontroller rather than the 6 it used to need(per motor).
Maybe theres an L29x device that can be used in conjunction with your L293

My motor controller posting referred to earlier also covers stepper motors including the L297/298. In the same way as the L297 can 'front' the L298 to turn pulses into stepper drive outputs then I'm not aware of a similar device for h bridges like the 293. Steppers have to create sequences (done by the 297) but a 293 is just an h-bridge with no sequencing.

But when it comes to IO pins then I can't see how you can get better than 2 pins per motor - providing speed, clockwise/counterclockwise, and a brake.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: H bridge use less inputs with minimal components
« Reply #14 on: August 05, 2010, 08:04:23 PM »
ST micro do other L29x devices that work in conjunction with each other. for example:
 I used the L298 full bridge driver to control stepper motors with. this required 6 outputs per driver. I'm just in the middle of making a new motor controller and incorporating the L297 which connects to the L298. The new controller will require just 2 outputs from my microcontroller rather than the 6 it used to need(per motor).
Maybe theres an L29x device that can be used in conjunction with your L293

My motor controller posting referred to earlier also covers stepper motors including the L297/298. In the same way as the L297 can 'front' the L298 to turn pulses into stepper drive outputs then I'm not aware of a similar device for h bridges like the 293. Steppers have to create sequences (done by the 297) but a 293 is just an h-bridge with no sequencing.

But when it comes to IO pins then I can't see how you can get better than 2 pins per motor - providing speed, clockwise/counterclockwise, and a brake.

i was sort of thinking 3 total since 3 pins have 7 possible combinations but i don't think that's enough for everything i want it to do.
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: H bridge use less inputs with minimal components
« Reply #15 on: August 05, 2010, 08:08:29 PM »
You have 20+ pins to use... stop being OCD  ;D

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: H bridge use less inputs with minimal components
« Reply #16 on: August 06, 2010, 05:24:00 AM »
I see you are building an Antweight robot. I get that you are using gutted servos, but perhaps you'll get to the point where you will want to use low voltage motors and microcontroller powered by a small LiPo. Here is my solution for that:

I am using a mega8 (just because I had some laying around and wanted to use them, you can use 168) with a 3.3V regulator from a 3.7V LiPo. To drive tiny pager motors I still need an H-bridge, so only a low voltage one will work. After much research, I got a $2 FAN8200 from here. This chip needs one or two pins from the micro per motor. The least you can use is 3 pins total, or, if you tie both enable pins high, you can use only the 2 direction pins to drive the motors. here is a quote from the site:
Quote
To implement sign-magnitude PWM, the Enable pin is pulsed and IN1 determines direction. For locked anti-phase, IN1 is pulsed and Enable is used to enable/disable the motor. We have used PWM frequencies up to 20kHz.

Microbot is a small line follower that uses the FAN8200 to control a pair of Solarbotics gear pager motors powered by a single Li-Poly battery. Microbot weighs a mere 1 ounce!


Using this chip allowed me to use the remaining free pins from the microcontroller to light up a 7 segment digit like Axon II has for a nice light show and marquee text.

Good luck on your project!
Check out the uBotino robot controller!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: H bridge use less inputs with minimal components
« Reply #17 on: August 06, 2010, 09:00:32 AM »
You have 20+ pins to use... stop being OCD  ;D
My thought exactly.
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 blackbeardTopic starter

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: H bridge use less inputs with minimal components
« Reply #18 on: August 06, 2010, 09:34:04 AM »
I want to use motors for the end product so the servos are just for prototyping. I'm also going to print a board using surface mount components except for the mcu. I'm thimking that i want to stick with the arduino since the code is simpler to edit on the fly and I can still just drop it in like a standalone atmega mcu. Since I'm making a spinner I want it to be manouverable and fast but don't need it to have real torque in the drive motors
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

 


Get Your Ad Here

data_list