BS2E PWM Driving H-Bridge
All,
I've done some searching and tinkering and can't really get the PWM
statement on the BS2E to drive an H-bridge properly. All of the resources I
have found so far revolve around what Parallax has in the manual, which is
not what I want to do. PULSOUT works fine, and I've used this before to
control H-bridges with no problems. Any suggestions?
I've done some searching and tinkering and can't really get the PWM
statement on the BS2E to drive an H-bridge properly. All of the resources I
have found so far revolve around what Parallax has in the manual, which is
not what I want to do. PULSOUT works fine, and I've used this before to
control H-bridges with no problems. Any suggestions?
Comments
daweasel@s... writes:
> I've done some searching and tinkering and can't really get the PWM
> statement on the BS2E to drive an H-bridge properly. All of the resources I
> have found so far revolve around what Parallax has in the manual, which is
> not what I want to do. PULSOUT works fine, and I've used this before to
>
Bill:
The PWM from the Stamp is not designed to drive H-Bridge circuits. The
intent is to create a quasi-analog output by charging a cap through a know
resistance. If you look at the PWM signal on a scope you'll see that it
looks random. It's the nature of the algorithm. Over a given period, the
duty cycle is as specified, but it's not regular -- something you need when
driving motors.
There's an old BS1 App Note called "Fun With Trains" that does motor control
directly (through a ULN2803). I don't know if it will work with your app,
but it's worth a shot.
-- Jon Williams
[noparse][[/noparse]Non-text portions of this message have been removed]
>In a message dated 8/7/01 2:22:32 PM Central Daylight Time,
>daweasel@s... writes:
>
>
> > I've done some searching and tinkering and can't really get the PWM
> > statement on the BS2E to drive an H-bridge properly. All of the resources I
> > have found so far revolve around what Parallax has in the manual, which is
> > not what I want to do. PULSOUT works fine, and I've used this before to
> >
>
>Bill:
>
>The PWM from the Stamp is not designed to drive H-Bridge circuits. The
>intent is to create a quasi-analog output by charging a cap through a know
>resistance. If you look at the PWM signal on a scope you'll see that it
>looks random. It's the nature of the algorithm. Over a given period, the
>duty cycle is as specified, but it's not regular -- something you need when
>driving motors.
>
>There's an old BS1 App Note called "Fun With Trains" that does motor control
>directly (through a ULN2803). I don't know if it will work with your app,
>but it's worth a shot.
>
>-- Jon Williams
Bill,
You must first think of the Stamp PWM as a means for setting an
analog value. "quasi-analog" as Jon Williams puts it. There is
a quick and dirty way to do what you want, but it involves a few
external components.
R C
Stamp I/O >----/\/\----o----||----> GND
|
|
100K Pot o
> QA "quasi-analog"
o--/\/\--o |
| | | | |\
| o---o o--|+\
| | | \----> PWM out to "H-Bridge"
| 1|\ 2 | o--|-/
o--| \o--o | |/U2
| |/ U1 |
| |
o
o
> QSAW "quasi-saw"
|
o---||
>GND
.01uF
U1 - 74HC14
- tie ALL unused INPUT pins (3,5,9,11, & 13) to GND (pin 7)
or VCC (pin 14)
- connect a .01uF cap directly across pins 7 & 14
U2 - UA741 Op-Amp
R&C - R and C values should be those suggested in the Stamp Manual.
Note: Adjust the 100K Pot for a base frequency of aprox 3KHz.
Most ESC (Electronic Speed Controllers) use a base
frequency near 3KHz.
With this setup, you can send a PWM signal to your Stamp pin to
set your PWM level. Then you can process other code while this
circuit temporarily maintains the PWM level. You WILL need to
make periodic updates.
Beau Schwabe IC Mask Designer
National Semiconductor Wired Communications Division
500 Pinnacle Court, Suite 525 Mail Stop GA1 Norcross, GA 30071
schematic. Any way you can email me a GIF or something?
Original Message
> > > I've done some searching and tinkering and can't really get the PWM
> > > statement on the BS2E to drive an H-bridge properly. All of the
resources I
> > > have found so far revolve around what Parallax has in the manual,
which is
> > > not what I want to do. PULSOUT works fine, and I've used this before
to
> You must first think of the Stamp PWM as a means for setting an
> analog value. "quasi-analog" as Jon Williams puts it. There is
> a quick and dirty way to do what you want, but it involves a few
> external components.
>
> R C
> Stamp I/O >----/\/\----o----||----> GND
> |
> |
> 100K Pot o
> QA "quasi-analog"
> o--/\/\--o |
> | | | | |\
> | o---o o--|+\
> | | | \----> PWM out to "H-Bridge"
> | 1|\ 2 | o--|-/
> o--| \o--o | |/U2
> | |/ U1 |
> | |
> o
o
> QSAW "quasi-saw"
> |
> o---||
>GND
> .01uF
>
>
>
> U1 - 74HC14
> - tie ALL unused INPUT pins (3,5,9,11, & 13) to GND (pin 7)
> or VCC (pin 14)
> - connect a .01uF cap directly across pins 7 & 14
>
> U2 - UA741 Op-Amp
>
> R&C - R and C values should be those suggested in the Stamp Manual.
>
> Note: Adjust the 100K Pot for a base frequency of aprox 3KHz.
> Most ESC (Electronic Speed Controllers) use a base
> frequency near 3KHz.
>
> With this setup, you can send a PWM signal to your Stamp pin to
> set your PWM level. Then you can process other code while this
> circuit temporarily maintains the PWM level. You WILL need to
> make periodic updates.
If you change your font to a "fixed-width" font, such as "Courier New", you
will be able to read ASCII schematics...
Jared Hoylman
VB Overdrive
http://vboverdrive.extreme-vb.net/main.php3
Original Message
From: "Rodent" <daweasel@s...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, August 07, 2001 4:40 PM
Subject: Re: [noparse][[/noparse]basicstamps] BS2E PWM Driving H-Bridge
> Beau, thanks for the info, but I can't make heads or tails out of your
ASCII
> schematic. Any way you can email me a GIF or something?
>
>
Original Message
>
> > > > I've done some searching and tinkering and can't really get the PWM
> > > > statement on the BS2E to drive an H-bridge properly. All of the
> resources I
> > > > have found so far revolve around what Parallax has in the manual,
> which is
> > > > not what I want to do. PULSOUT works fine, and I've used this before
> to
>
> > You must first think of the Stamp PWM as a means for setting an
> > analog value. "quasi-analog" as Jon Williams puts it. There is
> > a quick and dirty way to do what you want, but it involves a
few
> > external components.
> >
> > R C
> > Stamp I/O >----/\/\----o----||----> GND
> > |
> > |
> > 100K Pot o
> QA "quasi-analog"
> > o--/\/\--o |
> > | | | | |\
> > | o---o o--|+\
> > | | | \----> PWM out to "H-Bridge"
> > | 1|\ 2 | o--|-/
> > o--| \o--o | |/U2
> > | |/ U1 |
> > | |
> > o
o
> QSAW "quasi-saw"
> > |
> > o---||
>GND
> > .01uF
> >
> >
> >
> > U1 - 74HC14
> > - tie ALL unused INPUT pins (3,5,9,11, & 13) to GND (pin 7)
> > or VCC (pin 14)
> > - connect a .01uF cap directly across pins 7 & 14
> >
> > U2 - UA741 Op-Amp
> >
> > R&C - R and C values should be those suggested in the Stamp Manual.
> >
> > Note: Adjust the 100K Pot for a base frequency of aprox 3KHz.
> > Most ESC (Electronic Speed Controllers) use a base
> > frequency near 3KHz.
> >
> > With this setup, you can send a PWM signal to your Stamp pin to
> > set your PWM level. Then you can process other code while this
> > circuit temporarily maintains the PWM level. You WILL need to
> > make periodic updates.
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>Beau, thanks for the info, but I can't make heads or tails out of your ASCII
>schematic. Any way you can email me a GIF or something?
Turn off your proportional spacing, or cut-n-paste it into Windows NotePad
Beau Schwabe IC Mask Designer
National Semiconductor Wired Communications Division
500 Pinnacle Court, Suite 525 Mail Stop GA1 Norcross, GA 30071