Triggering AVR pin off a -25V signal, Opto, FET, BJT or something else? - Page 1
Forum section: electronics / beginners

author: Stonent
author_rank: Super Contributor
timestamp: October 05, 2013, 01:09:48 am
content: I'm looking to build an add-on to my Geiger counter once I get it all fixed and ready to go.Basically will consist of the Noritake VFD, an AVR, a LED and a speaker / headphone jack.A tick on the Geiger counter generates a -25V spike at a very low current at the Amphenol 75-PC-1M headphone connector.It was really only ever designed to use the headphones that came with it which had an impedance of 4K Ohm and inductance of around 600 to 700 uH.If you put a 8 or 16 Ohm speaker on it, the tick is barely audible because the current draw is more than it was designed for.There is a Geek Group video where they use an optocoupler tied to an interrupt pin on the AVR and it uses that to do counting of ticks. Would you say that would be the best way to do it? What about a transistor of some kind? I have several 2N2222 and 2N3904's in my collection.Apparently a standard thin piezo element works well with the unamplified signal at a reasonable volume so if providing amplified output would complicate it, I can live with just a piezo.The VFD and the AVR will need +5V and I can figure out how I'm going to do that separately. The VFD will also need 4 pins on the AVR for its own usage. If I can squeeze it down to an ATTiny45/85, then even better, but I'll have to see how big the Hex file is after I write up a program.So for just the signaling part, do you think just a 2n2222 or 2n3904 could work?On the NPN, if the base is higher than the emitter then electricity will flow, but -25V is not higher than +5 (or is it?)On the PNP if the base is lower than the emitter, electricity will flow that sounds more like it except -25 is lower than +5 but also no signal which would be 0V is also lower than +5, right?Sorry if it sounds like rambling, I'm just sort of conceptualizing it right now.

author: SArepairman
author_rank: Frequent Contributor
timestamp: October 05, 2013, 03:54:25 am
content: Well if the current is low you probably need a transistor with gain to be triggered on it in order to pass a signal to an opto coupler.I think an opto coupler is the easiest solution so long the signal is not too fast. They are cheap and very easy to use.

author: c4757p
author_rank: Super Contributor
timestamp: October 05, 2013, 04:11:04 am
content: Bah... optocouplers....How about this?Perhaps add a 3k3 resistor from Q1's base to +5 to make it more reliable (shut off fully)Depending on what "very low current" is you may need to play with the resistor values.The output is on Q2's collector, if that wasn't obvious - forgot to label...

author: Zero999
author_rank: Super Contributor
timestamp: October 05, 2013, 08:54:09 am
content: I don't see why you need two transistors. A single PNP will do. The output will be inverting but that can be solved by software.How about just using a potential divider? 22k and 120k should do.

author: Zero999
author_rank: Super Contributor
timestamp: October 05, 2013, 01:43:14 pm
content: I've just looked at the datasheet. The ATTiny45/85 has an internal pull-up resistor with a value of approximately 36k, so all you need is to connect a 180k resistor in series with the input and enable the pull-up.

author: geraldjhg
author_rank: Regular Contributor
timestamp: October 14, 2013, 07:53:10 pm
content: hi id use a series capacitor with a pull up to vref and diode to ground to avoid negative pulsesif that cant be detected with the mcu then id amlify it an lenghten it with any transistortry with r of 10k and c of .1 to .01 and of course the 1n4148

author: Stonent
author_rank: Super Contributor
timestamp: October 15, 2013, 12:14:21 am
content: Well I did grab some 4N36 optocouplers last week so that should get me started. I'll have to play with them and see how well they work.

author: Psi
author_rank: Super Contributor
timestamp: October 15, 2013, 12:18:43 am
content: Quote from: mojo-chan on October 07, 2013, 08:23:49 amYep, i was about to post the same thing.Here's the appnotehttp://www.atmel.com/images/doc2508.pdfI'm sure his -25V pulse has enough energy to pull down a input pin tied to VCC with 1M.Just have to limit the current absorbed by the low clamp diode.I would probably start with a 1Meg to VCC and 100K in series with the -25V signal and reduce if needed.