Help! Simple circuit!

Discussion in 'The Projects Forum' started by --DANNY--, Oct 4, 2008.

  1. --DANNY--

    Thread Starter New Member

    Oct 4, 2008
    6
    0
    I have a small electronic device that functions by receiving a 12v pulse from any source (only needs to be on for 50ms).

    I'm triggering it, or sending the pulse from a computer's serial port.

    Someone told me I need to use an opto-isolator so that the coil in the device can't send voltage spikes back into the serial port damaging the computer.

    a. what is an opto-isolator?
    b. where can i buy one online?
    c. how would i wire it?

    Also, if I can't get ~12v from the serial port, what are my options?
    Maybe use a capacitor to store up 12v and then using another wire from the serial port to trigger the release of the capacitor or something?

    I'm horrible with circuit design :(
    programming is my thing :p

    thanks for the help! :)

    (oh, and the device I'm powering is this electromechanical impulse counter)
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Skycraft is one of my favorite haunts :)

    Really, all you need is a diode like a 1N914 or 1N4148 connected to absorb the reverse EMF pulse.

    Where is your schematic of your current circuit?
     
  3. --DANNY--

    Thread Starter New Member

    Oct 4, 2008
    6
    0
    I'm not a big schematic guy, but this should be pretty much it. :p

    [​IMG]

    My program will turn on output on pin 3 of the serial port for ~100ms then off to get the counter to tick up once.

    The only complication I can see possibly running into is the serial port not having enough power to register on the counter. I'd check with my multimeter but I haven't been able to find it for the past couple months! :rolleyes:

    (and ya, I've never used Skycraft before but they have the part at about $80 cheaper than anywhere else on the internet for a counter that runs off of 12v or lower and features a push-button reset, so I already like em :))
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You did fine :)

    See the attached; just one more diode.

    The 2nd diode provides a current path for the coil's reverse EMF.
     
  5. --DANNY--

    Thread Starter New Member

    Oct 4, 2008
    6
    0
    Alright, simple enough. :)

    But what if the serial port only outputs like 6v? or only a few mA and it's not enough for the counter?
    How would I get around that obstacle?
     
  6. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    It is possible to build a transistor amp that will amplify current with a minimum parts count, but it may not be necessary. I don't know much about the device you're using, nor the computer. I don't think it would damage either if it didn't work, but there are no guarantees in this life.
     
  7. haytham

    New Member

    Oct 6, 2008
    5
    0
    thank u for this information
     
  8. --DANNY--

    Thread Starter New Member

    Oct 4, 2008
    6
    0
    An article on HackADay.com lead me to a guy's project website. I found exactly the same thing I am wanting to build! Didn't think this kinda thing had been done before, but anyways...

    here is a link to his version of the project
    I've attached the image of his circuitry

    It seems like it would work a lot better.
    From my understanding, pin7 would always be on and outputting ~10v.

    BC547 is a switch that would be triggered by momentarily outputting on pin3 which would momentarily complete the circuit, causing the counter to register a 'count'.

    Questions:
    Is there any noticeable way to improve this circuit design? Different parts? Simplification?
    And what online store could I purchase all these items from?

    So far I have these on a list:
    100uF/16
    BC547
    1N4148 (x2) - not sure which to get???
    10K resistor - again, not sure what kind to get???
    & what gauge wire should I buy for this? I'm all out of my last spool.

    Thanks a lot guys!

    edit: I just noticed there's a $20 shipping fee for the 100uF/16 part from that site. so screw that site! haha jeez!
     
  9. neon9

    Member

    Oct 8, 2008
    15
    0
    I don't think a diode can save your PC from a spike. an optocoupler is the way to go isolate to a couple of kv. not hard to use in-out. the in can be 5v 12v the out can be be 5v12v YOU choose just one $.50 8 pin IC. OR MESS AROUND. you may get lucky.
     
  10. --DANNY--

    Thread Starter New Member

    Oct 4, 2008
    6
    0
    Ya, but the thing is, I am horrible with circuit design.. because I don't understand more than the very simplest basics. Like resisters... that's about it... I understand the functions of most components, but I don't understand how they work or what specs they would need to be.

    So if I just go with the circuit that SgtWookie so kindly posted for me, should I go for optocouplers/opto-isolator or diodes?
    I know the part number for the diodes so I can easily grab those on my break while at work tomorrow from RadioShack which is quite conveniently within 30 seconds walking distance from my work.
    But I can barely find a site that sells optoisolators let alone specific ones and I have no clue what I'd need as far as the specs on it.
    And would I just use 2, in place of the diodes? Do they have a polarity?

    Sorry, I'm just not very knowledgeable when it comes to this stuff...
     
    Last edited: Oct 9, 2008
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Hi Danny,
    Sorry I haven't paid much attention to this thread.

    I don't know what kind of computer you might be attempting to use for your project. Laptops are frequently limited to +-5V output on their RS232 ports. Desktops/towers usually have higher voltages available.

    Radio Shack has packs of 1N914/1N4148 diodes available for less than a couple bucks. It's still highway robbery, but cheaper than ordering something from an online supplier after you add in the shipping costs - when you're buying in small quantity. Besides, RS stands by their products. A few months back, I exchanged a pot that I'd had for years in it's original packaging; it didn't meet the specs on the package.

    A diode in reverse across a relay is the most common way to take care of reverse EMF. No, it is not an absolute guarantee against failure(s), but it will usually last for quite a while.

    Everything in electronics is a tradeoff. If you want absolute reliability, it will cost a bundle. If you just want something that'll last for the next few years - that's a lot cheaper.

    Up to you.
     
  12. --DANNY--

    Thread Starter New Member

    Oct 4, 2008
    6
    0
    Thanks for the reply.
    I think I'll grab some 1N914 diodes and some wire at RS while on break today. I doubt anything will happen, but if it does screw up my computer, I've been looking for a reason to uprade my desktop for a while now =p
     
Loading...