Shop OBEX P1 Docs P2 Docs Learn Events
BS2 with LM395 — Parallax Forums

BS2 with LM395

alnajjar1alnajjar1 Posts: 110
edited 2010-10-16 19:01 in BASIC Stamp
Based on a reply to an earlier post, I purchased the LM395 to use as a power transistor with built in current limiting capabilities. I tried to follow the circuits in the documentation to the best of my ability but couldn't get it to work.

I basically want to power up DC lamps and fans (current less than 0.2A per component) from the BS2 but want to make sure that if students short the output or too many components are plugged in, the LM395 is protected as is the Stamp.

Any suggestions or diagrams on how to do this ?

Thanks

Al

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-10-10 15:25
    It would help if you showed us how you were connecting it when you "couldn't get it to work" so we don't go over ground you've already covered.
  • alnajjar1alnajjar1 Posts: 110
    edited 2010-10-10 16:04
    Sorry, here is a jpg of the circuit
    596 x 361 - 72K
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-10 16:14
    Your circuit is basically correct. I would probably use a lower resistor, but 4.7K should work.

    How are you trying to get it to work? Attach your program to a message.
  • alnajjar1alnajjar1 Posts: 110
    edited 2010-10-10 17:27
    It is a really simple test circuit that toggles the pin for 2 seconds on and then off.

    Here is the code

    Al
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-10 18:12
    There's nothing wrong with your code and your schematic looks all right. The most likely thing that's wrong is that your actual wiring isn't what's on the schematic or the compiled code in your Stamp isn't what you've posted (unlikely given how short and simple it is).

    You didn't mention which LM395 package you're using, but check that you've got the right pinout for the package you're using.

    One simple test is to disconnect the LM395 and use a multimeter to make sure the I/O pin is working right in terms of output voltage. You could also use an LED connected in place of the LM395's base and collector (anode to +12V and cathode to the I/O pin through the 4.7K resistor).
  • alnajjar1alnajjar1 Posts: 110
    edited 2010-10-10 18:17
    I will double check wiring and get back to you. thanks
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-10 18:27
    As a general rule, with the LED/resistor to +12V, turn on the power to the Stamp before you turn on the +12V and turn off the +12V first, then turn off the power to the Stamp.
  • alnajjar1alnajjar1 Posts: 110
    edited 2010-10-12 17:52
    Well, I can't get the LM395T to do what it supposed to do. I connected exactly as the diagram indicates and output on EC is always high regardless of the base voltage.

    I am curious, is it possible to control the current output using a TIP120 and at the same time monitor the current/voltage on a sense resistor so that I can shut down the output on the TIP120 when current exceeds a maximum value?

    Before I order stuff (I don't have any low value resistors), do you think this can work in principle?

    Al
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-13 08:32
    Here's one example I found with a quick search for "DIY current limiter". A TIP120 should work just as well. As you can see, the current limit is set by the sense resistor value (R2).
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-10-13 16:04
    I'd like to know how you have the device wired.
    Is it as shown in my attachment?

    PE - this one is common collector (emitter follower)
    484 x 498 - 53K
    395.jpg 52.6K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-10-13 16:30
    Here's a common emitter version (attached.)

    I was looking at the numbers on your dwg, 1-2-3, b-c-e. Is that what you're doing?
    438 x 453 - 20K
  • alnajjar1alnajjar1 Posts: 110
    edited 2010-10-16 08:23
    Great! it worked, I had the pins reversed although that's how the data sheet had them spelled out!

    One more question: The LM395 is supposed to provide current limiting. I did short the end of the I am not sure if that is a fixed limit or it can be varied, if the latter then how can I set that limit? I would like to restrict the current to 1A max.

    Thanks again to both for all your help...

    Al
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-16 08:47
    From the datasheet, the short circuit current appears to be around 2A. In operation, the current will also be limited by total power dissipation, i.e. the device will shut down if it gets too hot. So the limiting current will be a function of how much heat sinking is employed.

    With a normal NPN transistor in a common emitter configuration, you can limit collector current further by adding a resistor in series with the emitter. I don't know if that will work with this device, though, since it has a more complicated internal structure.

    -Phil
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-10-16 09:00
    I got my information from the datasheet, Al.

    Procedure + Wiring + Battery = Success

    N.B., that tab is E.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-10-16 19:01
    Attached is the classic current limiter circuit with bipolar transistors. If the emitter resistor is 2 Ω, then the load current will be limited to about 250 or 300 mA. With 0.3 A across 2 Ω, that puts 0.6 V on the base of the 2N3904, so it turns on and robs current from the base of the load transistor. That feedback makes a nice current limiter, very simple and solid. By choosing R you can set the current limit to whatever you want. The load transistor has to be sized to take the current and power required.

    attachment.php?attachmentid=74509&stc=1&d=1287361351
    131 x 165 - 4K
Sign In or Register to comment.