Shop OBEX P1 Docs P2 Docs Learn Events
pwm or pulse out? — Parallax Forums

pwm or pulse out?

mobile_bobmobile_bob Posts: 50
edited 2007-08-07 13:21 in BASIC Stamp
Guys:

the next step of the project requires a pwm output on a pin that i can feed a mosfet such as
an irl540

anyone have a simple circuit to trigger the mosfet, or is there perhaps something better i can use
i need about 10 amps inductive to drive an alternator rotor, and want to build an alternator regulator
for a special application.

and is it possible to drive a pair of mosfets so that i can control two alternators at the same time, so
that i can double the charging capacity?

i also want to use the standard bs2 stamp, and would like to know
are there significant differences in pulse out and pwm

i appreciate the help and any idea's

thanks
bob g

Comments

  • D FaustD Faust Posts: 608
    edited 2007-08-06 18:20
    Pulsout, just gives a high pulse for the designated duration. ie. _______
    _________
    PWM lets you generate an "analog" voltage by turning a line on and off ie. -_-_-_-__--__----_-_
    If you are looking to to control a mosfet then the pulsout command wouldn't work because it would either be one or off. The PWM command would work better because it goes on and off rapidly and averages itself out. I hope I expained that well enough. There is one catch with PWM though, yo can't have the stamp do anything else while it is PWMing, and the pwm can't stop or the mosfet will "float" and randomly go on and off. For a constant pwm you need a co-proccesor to do that so the stamp can do other things. Parallax sells the PWMPal for this purpose. Hope this helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    D Faust
  • mobile_bobmobile_bob Posts: 50
    edited 2007-08-07 05:50
    D Faust:

    thank you for your insights, it is appreciated

    it looks like the pwm command is the way to go,

    i don't need the stamp to do anything while the the pwm is taking place, i figure to use the

    for/next , count and pause to keep it doing its thing for 5 minutes, followed by a resampling of the battery

    bank voltage and a recalc for the next step of pwm.

    wash rinse and repeat until the battery bank voltage indicates approx 80% depth of charge, where the

    process will be terminated.

    i think this will work nicely and fairly simply.

    thanks again

    bob g
  • mobile_bobmobile_bob Posts: 50
    edited 2007-08-07 05:52
    correction

    "80% depth of charge" should have been

    "80% state of charge"

    bob g
  • D FaustD Faust Posts: 608
    edited 2007-08-07 13:21
    Just for clarification, there each time the for loop exucutes you will have a gap in the pwm.· This may or may not be long enough to let the transistor "float away" from the previous signal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    D Faust
Sign In or Register to comment.