# Help! Simple circuit!

#### --DANNY--

Joined Oct 4, 2008
6
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

thanks for the help!

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

#### SgtWookie

Joined Jul 17, 2007
22,210
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.

#### --DANNY--

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

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!

#### Attachments

• 17.1 KB Views: 26

#### neon9

Joined Oct 8, 2008
15
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.

#### --DANNY--

Joined Oct 4, 2008
6
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:

#### SgtWookie

Joined Jul 17, 2007
22,210
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.