Shop OBEX P1 Docs P2 Docs Learn Events
Fly-back Diodes for L298, and determining a diode specs. — Parallax Forums

Fly-back Diodes for L298, and determining a diode specs.

Martin_HMartin_H Posts: 4,051
edited 2011-05-11 09:13 in General Discussion
I bought an L298 because I want to build a simple motor controller for toy motors. The schematics I've seen call for fly-back diodes across the motor leads to prevent voltage spikes. But they are vague about what sort of diodes to use.

I have a bag of miscellaneous diodes, but I don't know how to tell what their specs. Resistors are easy to tell by their size and color banding. But how do you tell diodes apart?

For small toy motors what size fly-back diodes should be used?

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-05-09 09:07
    Flyback diodes are pretty much about two issues - the amount of power they have to remove and how quickly they have to remove it.

    In general, you don't really have to worry too much about either of these issues with a small toy motor. I use simple recifier diodes as they are cheap and everywhere. In some cases, you may see examples using smaller and faster signal diodes. They can work as well with toy motors. It is only when you start using big motors that you might have to re-evaluate your diode selection.

    I might add that the same pretty much applies to flyback diodes on relays. Small relays can use pretty much anything.

    These type of diodes are usually rated by peak voltage and peak amp. Rectifier diodes are intended for 120 cycles per second or less, while signal diodes are intended to handle much higher frequencies of on and off. In real practice, the toy motor on an L298 is so undemanding that you usually won't blow up a diode if it can at least handle the voltage rating.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-05-09 09:14
    Martin_H wrote: »
    I bought an L298 because I want to build a simple motor controller for toy motors. The schematics I've seen call for fly-back diodes across the motor leads to prevent voltage spikes. But they are vague about what sort of diodes to use.

    I have a bag of miscellaneous diodes, but I don't know how to tell what their specs. Resistors are easy to tell by their size and color banding. But how do you tell diodes apart?

    For small toy motors what size fly-back diodes should be used?

    Have you looked at the datasheet: http://www.st.com/stonline/books/pdf/docs/1773.pdf

    It mentions some specs for the diodes in the example schematic.

    This one has part #'s: http://optimus.meleeisland.net/downloads/misc/l298_board.pdf

    Robert
  • Martin_HMartin_H Posts: 4,051
    edited 2011-05-09 09:54
    Loopy Byteloose, thanks.

    RobotWorkshop, I did look at the data sheet. It only said Schottky diode were preferred, but didn't specify any ratings on them. Thanks for the second link, it does mention a part number (1N4001) which is a 1 amp rectifier which matches what Loopy Byteloose said above.

    As to the second part of my question. Do diodes carry marks on them which indicate their rating? Most of the ones I've seen are black with a white band to indicate polarity.
  • PublisonPublison Posts: 12,366
    edited 2011-05-09 10:12
    Martin,

    The part number determines the rating, per the data sheet.

    Here is a breakdown of the 1N4000 series of diodes:

    http://en.wikipedia.org/wiki/1N4001_and_1N5400_series_diodes

    I usually just get a bunch of 1N4004's for everything.


    Martin_H wrote: »
    Loopy Byteloose, thanks.

    RobotWorkshop, I did look at the data sheet. It only said Schottky diode were preferred, but didn't specify any ratings on them. Thanks for the second link, it does mention a part number (1N4001) which is a 1 amp rectifier which matches what Loopy Byteloose said above.

    As to the second part of my question. Do diodes carry marks on them which indicate their rating? Most of the ones I've seen are black with a white band to indicate polarity.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-05-10 16:32
    Publison, thanks.

    I should be all set to work on this project and my robot arm this weekend.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-05-10 18:09
    Schottky diodes are usually called out in H-bridge circuits because they're faster, and the 1N400x series aren't Schottky.

    The spec sheet calls for 2A fast acting diodes, and Schottky would fit the bill there. You want a good reverse voltage, too, as the spike from the motor can get pretty big. The SR2010 is 2A and 100 volts, for example. They're fairly large physically, so take that into consideration.

    That said, the L298 is not a great choice for the 3V Mabuchi toy motors. It really wants to see the supply voltage at least 2.5 volts above logic input HIGH voltage, which is a minimum of 2.3V (max = Vss). Assuming 3.3V logic input, Vs needs to be at a minimum 3.3 + 2.5 volts. There is some drop through the bridge, but at >5V those 3V motors will run hot and hard. At 3V and stall they'll over-rate the L298, which is only 2A per channel.

    -- Gordon
  • Martin_HMartin_H Posts: 4,051
    edited 2011-05-10 19:00
    Gordon, that's good to know. I will use a higher voltage motor as I have the flexibility. I plan to recreate a project from "Programming the Propeller with Spin" to learn to use the Propeller's counters for PWM. I plan to read a potentiometer and use that input to control the motor's PWM signal. So the specifics are less critical as the goal is learning more about PWM on the Propeller.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-05-11 02:16
    One really can approach this from two points of view.

    1. The source of the flyback voltage - if it isn't much and isn't fast, one can use less hefty diodes

    2. The capacity of the L298 chip - Consider how much protection is ideal for the ultimate power capacity - the highest voltage at the greatest amperage at the highest switching speed.

    The problem with number 2 is that when coils collapse, they can create rather large spikes that need to be observed in actual use on a good oscilloscope. Most of us don't have the equipment.

    I would use 2amp Shotky diodes if the board were likely to be used with bigger motors at some later date, but 1n4004 are likely to be adequate for a long long time.

    PWM will generally require you to use higher speed diodes than the rectifier diodes.

    PWM will generally require that you use higher speed diodes than mere rectifier diodes.

    And I would look around at some boards that support the L298 (Solarbotics has one) and see what they specify.

    As you can see, it is all pretty much a guess, but ample protection is so cheap that it really isn't worthwhile to make the protection diodes the weak link.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-05-11 09:13
    Martin_H wrote: »
    I plan to recreate a project from "Programming the Propeller with Spin" to learn to use the Propeller's counters for PWM. I plan to read a potentiometer and use that input to control the motor's PWM signal. So the specifics are less critical as the goal is learning more about PWM on the Propeller.

    Sounds good. Keep in mind that the low cost motors often need >50% duty-cycle to operate (though this also depends on the PWM frequency). So don't be surprised if nothing happens at low PWM rates! It's not your code, but the motors.

    Another quick cheap method to learning PWM is with an LED. The brightness variation is more apparent over a wider PWM duty cycle range.

    -- Gordon
Sign In or Register to comment.