Need help applying L239N circuit

Discussion in 'The Projects Forum' started by msalvati, Mar 10, 2012.

  1. msalvati

    Thread Starter New Member

    Jan 28, 2012
    7
    1
    I bought an L239N circuit and I just want to make sure it will work for what I need it for. I've seen plenty of wiring diagrams for use with a stepper motor, but not much else.

    I have a controller that I can access from my mobile devices, PCs, etc. It has several variable analog outputs that can drive 0~24VDC up to 250mV. I want to use this to control the speed of a model train, which needs roughly 0~20VDC but draws more current – 1A or more. The train switches direction with polarity, so I am using 2 Outputs from the controller. Hence one or the other output will always be at ground.

    So if someone could verify if the attached wiring will accomplish this, that would be very helpful, and could potentially prevent me frying something. :)

    Thanks,
    -Mark
     
  2. msalvati

    Thread Starter New Member

    Jan 28, 2012
    7
    1
    ...oops, I meant L298N.

    Darn, nobody will read it if they don't recognize the circuit, and I'm past the point of being able to edit. Oh well, hopefully there are some curious minds out there. :)
     
  3. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,525
    You would probably get more help with the right part number in the heading:) The part should be "L293N" not L239N.

    Why not use a L298N? It has a 2 amp output per channel. But both of them drop ~2-5 volts depending on the current through them. So they will need a good heat sink.
     
    msalvati likes this.
  4. msalvati

    Thread Starter New Member

    Jan 28, 2012
    7
    1
    Yep, that is in fact an L298N, and the module includes what looks like a decent enough heat sink. Check out the picture.

    So can you tell me if it'll work as wired in my PDF? I'm sure I could just try it, but being the cheap b**tard that I am I bought it from China and don't want to wait another month of shipping if I fry it. :)

    (lol @ "shortbus")
     
  5. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,525
    Just down load the data sheets and see if the pins correspond. If so your good to go. If not just rearrange the wiring so they do.
     
  6. msalvati

    Thread Starter New Member

    Jan 28, 2012
    7
    1
    Well.....thank you, but I think you're giving me a little too much credit. I'm a pretty smart guy and I think I've figured it out even with a limited knowledge of most of the components involved. But I'm also smart enough to know when to ask for a more experienced pair of eyes. :)

    I'm not aware of a data sheet for this module, or any kind of model number to look it up, just that schematic that's non-application specific. The data sheet for the L298N chip doesn't include the other components in this module, and I'm only about 80% sure I'm interpreting everything correctly. I believe the module is more designed for a stepper motor, as every reference I've seen to it has the inputs connected to a motor controller with a pulsed constant voltage, motor feedback, etc etc. ...not how I'm using it.

    Basically what I think I've figured out is the following: Connect a power supply (with enough voltage and current to run the motor) to "VCC". Connect a small 5V power supply for the board logic to "5V". Connect all grounds together. Then the voltage to the motor will match the Inputs, minus a bit, and at the current capacity of VCC. Hence if I use a 24V 2A supply on VCC and swing In1 from 0~24V, I should see a swing of maybe 0~20V on the motor, which is exactly what I'm looking for.

    Sound right? Maybe 80% certainty is enough and I should just go for it?
     
  7. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,525
    Now you have me confused(easy to do:) ) I originally thought you wanted to know if you could use a l298n in your l293n circuit, but now not sure what you want?

    Are you wanting to know how to hook up the l298 module? In the photo of the module there doesn't seem to be any place for signal(control) inputs. Do you have a link to module? Or a copy of the information sheet that came with it? If so please post.

    This module will only switch between the two outputs, it will not control speed, you do know that, right? The Vcc terminal will need to go to your speed controller, not a full voltage source. And the 5V terminal needs to go to a 5V regulated supply.
     
  8. sohailimdad

    New Member

    Mar 11, 2012
    2
    0
    hi
    please check this one may help you for your project. use L297 & L298 to drive and control your motor using a controller.
    for reference please read data sheets of both components.
    regards
    sohail
     
    Last edited: Mar 11, 2012
  9. msalvati

    Thread Starter New Member

    Jan 28, 2012
    7
    1
    I do not have anything for that module besides what I posted originally (the one with my annotations). But I think I am now realizing where i went wrong. The Inputs on the module are digital TTL inputs not analog.

    So let me back up and get to what I really need - maybe there's something out there. I would like to control the speed of a model train with an analog control voltage. The control source I need to use can swing from 0~24V but only provides 250mA. The train is at full speed at about 20V drawing more than that - I think about 1A.

    It's probably obvious now that I'm not quite at the level where I can interpret component level data sheets. But I have to believe I'm not the first person who has a need for this, and I would hope there is a similar module out there for what I need. I'm ok with the purchasing and building part, but if I need to design this too I would have to ask a whole lot more questions about values, etc..

    Here's a secondary question... I have 4 of these analog control outputs on the controller I am using. If I parallel them together and ramp the voltages simultaniously, would that work? i.e Would 4 x .25A capacity turn into 1 x 1A capacity? (For sake of discussion lets forget about the fact that this leaves no safety margin - I'm not sure exactly what the locomotive draws.)

    Thanks :)
    -Mark
     
  10. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,525
  11. B F Clanton

    New Member

    Mar 12, 2012
    3
    1
    So your basic problem is you have a 0-20V AC 250mA output you want to use to control a motor with variable speed @ 1-2A and it be reversible?
    Couple of things I would try.
    1. Run your control voltage from one output through a Full-Wave Bridge and use that signal to drive a power transistor. Use your other output to drive a DPDT relay to reverse the motor. This might work but you get less torque at low speeds.
    2. From your FWB go through a digital volt meter chip. http://electronics-diy.com/ICL7107_volt_meter.php Replace the 7seg display outputs with a bank of resisters and tie that to a PWM. http://www.dprg.org/tutorials/2005-11a/index.html (I used an IRFZ24N, the power says 3-18v. But you need to set it to 5V for it to work) Use your other output for the DPDT reversing relay.
    Other resources:
    The best free circuit design software I have ever used and practically no learning curve. http://www.expresspcb.com/ExpressPCBHtm/Download.htm
    If you have access to a laser printer check out YouTube for PCB videos. I could not find the original video I saw but this one is not bad.
    http://www.youtube.com/watch?v=nnzdS3l60Wo
     
  12. msalvati

    Thread Starter New Member

    Jan 28, 2012
    7
    1
    You got it, except the control voltage is also DC.

    Ok, thanks everybody for your help. I think I'm going to give up on this. I have no problem building a circuit (as I have with color organs and various other pre-designed circuits). But designing something using components that I don't fully understand and calculating/experimenting with a bunch of component values is a little, or maybe a lot, beyond me. I guess it seemed like something common enough that I'd be able to find a module or kit like the $5 stepper module. From your responses it seems like I'm the first person who ever wanted to control the speed of a DC motor.

    Speaking of color organ - it seems like this is the DC equivalent. Big voltage source, big load, small analog control voltage.
     
Loading...