Fiddling with the I/O voltages of a transistor switch?

Hi all,

I've built this circuit with some 447 transistors I had lying around:

The problem is it's off voltage is 1.6V and it's on voltage (when a finger connects the two wires labelled 'touch plate') is 2V.

I'm feeding these values through a comparator to make them a clean 0V and 5V respectively, but there is some lag before the 2V settles comfortably back to 1.6V, and I think this is causing the comparator to get a little confused and giving a funny output.

So I either want to widen the gap between the O/I voltages, or speed up the 2V signal's fall back to 1.6V. Is this possible? What components could I go about changing?


If you're interested in why I want to do this, I'm trying to make a musical poster, very very cheaply, using conductive inks.

So far I've constructed Jonathan Heathcote's ATtiny85 Piano: http://jhnet.co.uk/projects/attiny_piano#construction

Here's my own: https://www.youtube.com/watch?v=RJ43_ltgHuk&index=2&list=UUIpIxKThuK7xKn2rwgevaWQ

And in order to get this to work on paper, to my budget, I'm using transistors to create capacitive switches for each of the keys. That's the circuit you can at the top of this post. Because Jonathan's design is using the analogue pins of the ATtiny85, I'm using the comparator to try and give it acceptable voltages from my touch switch.

So I've done this:

https://www.youtube.com/watch?v=UJa_GLbm_lY&list=UUIpIxKThuK7xKn2rwgevaWQ&index=1

But as you can see there is some unwanted noise, which I thiiiiiink is caused by my comparator getting confused due to the lag of the touch switch.

Interesting project. Have you tried putting a pull down resistor between the base of the darlington to the -ve of the supply. something quite big like 1M.

BTW Have you seen this. It seems tailor made for your input.

Edit Oops, forgot the link https://www.youtube.com/watch?v=Rf5HBLzDGQA

That hadn't occurred to me! I have now. I've tried 1M and even 2M and 4M but no change. If I've understood correctly how a pull down resistor works, then thinking about it now, I'm not sure if it will work for this application as there is always current flowing from the VCC through the thing being switched on or off, the voltage just varies slightly. Thanks though.

Thanks also for the PCB link – that's definitely one to bear in mind.

SimonRogers: That hadn't occurred to me! I have now. I've tried 1M and even 2M and 4M but no change. If I've understood correctly how a pull down resistor works, then thinking about it now, I'm not sure if it will work for this application as there is always current flowing from the VCC through the thing being switched on or off, the voltage just varies slightly. Thanks though.

Thanks also for the PCB link – that's definitely one to bear in mind.

If the 1M pull down isn't working then I'd try using a lower value (not higher). Since it's NPN pulling its base down to it's emitter voltage will turn it off. but if the resistance is TOO low it will stop your touch sensor pulling it up again when needed.

447 transistor? Is that a BC447? If so its a low gain high voltage device, you might
do better with something more normal like BC108 or 2N2222.

I don’t understand why they are wired as a darlington when the first transistor could
have its collector go direct to +6V so the second transistor can saturate?

The interesting measurement is the output current, not output voltage - since LEDs are
almost infinite resistance below their Vf you should measure the voltage across the
current-limiting resistor, not across the transistor or LED. The change from 1.6 to 2.0V
might be perfectly fine AFAICT, not knowing the Vf of the LED.

I'm feeding these values through a comparator to make them a clean 0V and 5V respectively, but there is some lag before the 2V settles comfortably back to 1.6V, and I think this is causing the comparator to get a little confused and giving a funny output.

So I either want to widen the gap between the O/I voltages, or speed up the 2V signal's fall back to 1.6V. Is this possible? What components could I go about changing?

You could try this (untested) ===>

• Changed 100R to 220R to lower collector current and improve sensitivity (optional)

• Added 10K pullup to improve "OFF" response and increase voltage swing

• Added capacitor to filter noise

EDIT: Not sure why the pulldown resistor (as suggested by KenF) connected to the base/100K junction did not help with the continuous current draw. Try a 0.1µF capacitor here to lower noise and give a 10 ms response.

I'm using transistors to create capacitive switches...

Those are not capacitive switches, those are conductive touch switches.

You may be picking up stray AC causing the LED to light, adding capacitance between 1st transistor's base and ground might help.

I agree with MarkT, those wires will also serve as an antenna to pick up noise. Electronic ballast fluorescents and CFL bulbs may put out a lot of higher frequency (not HF, but higher than line frequency) hash.

Another yes vote! (polymorph, MarkT, reply #5) Try a 0.1µF capacitor here to lower noise and give a 10 ms response. « Last Edit: Today at 12:00:30 pm by dlloyd »

KenF, nice circuit ... but please don't forget to insulate those connections or move the battery a bit further to the right to prevent spontaneous RFI.

WOW. I never realised that diodes could be so dangerous

An LED is connected to 6V power through a 200 ? resistor. When the switch is closed, the current builds up to approximately 30 amps. When the switch is opened, the LED attempts to keep the current flowing, creating a huge emf which ionizes the air in a huge spark.

http://techtv.mit.edu/collections/physicsdemos/videos/880-mit-physics-demo-back-emf-in-a-large-solenoid

Hi Simon, refering back to your first post, where are you measuring the output voltages?
When you short the touch plates together, does the LED light?
If not is the LED the right way around.

I hope you are measuring all voltages with respect to GND.

Hope to help, Tom… :slight_smile:

Sadly, the actual official description on that MIT video is not very good. The comment by an anonymous user is a much better description.