Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
It probably doesn't actually need a relay as a thyristor should do it

Thyristors have a very different switching behaviour compared to a relais. Once triggered by a gate pulse, they stay on until the load current drops (close) to zero. On a DC supply, a thyristor stays on until power is switched off or the motor burns out. However, with pulsing DC current (i.e. AC after a rectifier, but no capacitor), the thyristor will switch off at the end of a half wave. This allows tricks like a crude PWM regulator by triggering the thyristor somewhat after the begin of a half wave (Proxxon uses this trick for their "DC" minimot tools).

For driving AC motors, a thyristor won't help you much, as it either isolates or behaves like a diode, so the AC motor gets either no current or pulsed DC.

For full control of a DC motor on a DC supply, you typically use an H-bridge setup with bipolar or MOSFET transistors. This allows PWM for speed control, turning left and right, braking (not with every controller) and coasting. There are severel very clever H-bridge driver ICs available that add a lot of protection for both motor (e.g. stall and overcurrent detection) and driver transistors (overcurrent, short circuit detection). Some H-bridge driver ICs even include the transistors. And yes, there are cheap, ready-to-use modules with H-bridges.

H-Bridge drivers either accept a direction and a speed signal (on/off or PWM), or a left-turn and a right-turn signal (again either on/off or PWM). If breaking is supported, the direction-and-speed signals need a third signal to switch between breaking and coasting, the left/right approach can use the illegal state (left and right on at the same time) for breaking, or also use a third signal line. After all, driving a solid-state H-bridge is not too different from driving two relays. Two "slow" bits are sufficient for switching left/off/right, you may need to add a third bit for breaking. With a direction-and-speed driver, change one "slow" bit to PWM output to allow speed control.

L298-based modules seem to be very popular (two motor up to 46 V, each 3 A abs max peak, each 2 A operating, logic supply 4.5 V to 7 V, logic levels should be just about compatible with 3.3 V signals, motor drivers can be paralleled for double output current), just add a heatsink, four diodes per motor and some passives to the chip and you have a driver module. Only downside is that the L298 is everything but smart, no protection except for shorting out the motor supply.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^3: Controlling USB on Raspberry Pi by afoken
in thread Controlling USB on Raspberry Pi by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2022-05-20 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (76 votes). Check out past polls.

    Notices?