Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MIDI alarm powered blinking LED's

Status
Not open for further replies.

unseen wombat

New Member
Okay, so I thought I figured out an easy way to make this circuit for a lucid dreaming mask. (I'm still looking into programming the parallel port of my computer, but I'd like to make something smaller).

I figured I'd use a headphone plug and plug it into my palm pilot, this will go to the base of a transistor (2N3904 from Radio Shack) which will direct 9V to the LED's when the alarm goes off.

For some reason however, my circuit isn't working. The LED doesn't blink when sound comes from the palm pilot.

I've attached a diagram of my circuit. Can anyone see what I'm doing wrong?
 

Attachments

  • circuit.jpg
    circuit.jpg
    42.8 KB · Views: 201
hi again.!

The LED needs at least 2V across it to work, add to this the 0.7V to switch the transistor ON, means that the palm output has be greater than +2.7V.
Which is unlikely.

Any help.

EDIT: try putting the LED resistor in the transistor collector, then you need only greater than +0.7v. add a 100R resistor in series with palm output to the transistor base.
 
Last edited:
Hi Eric. Thanks. Okay, unless I misunderstood, I just tried your suggestion. I think you meant that I should take the LED off of the emitter side of the transistor, and put it on the collector side, right?

If that's what you meant, it didn't work either. Could it be that my palm pilot just doesn't have enough juice to even turn on a simple little transistor? When I use headphones with it, it's enough to blast my ears off though.
 
Last edited:
unseen wombat said:
Hi Eric. Thanks. Okay, unless I misunderstood, I just tried your suggestion. I think you meant that I should take the LED off of the emitter side of the transistor, and put it on the collector side, right?

If that's what you meant, it didn't work either. Could it be that my palm pilot just doesn't have enough juice to even turn on a simple little transistor?

hi,
Its sounds like your palm output hasn't got enough uumph!.

You may have to amplify the output before you try to light the LED.

Perhaps audioguru has some info on the output of a palm unit.???
 
crap. You're right. I tested the output of my palm pilot with a multimeter. I have about .4 volts and .02 mA.

So how do I amplified signal?

Any suggestions?
 
Try this circuit to drive the LED.
When there is no audio then the input is at 0V and the diode's forward voltage is about the same as the transistor's base-emitter junction's voltage so the transistor is barely turned on.
When the signal swings positive a little then the transistor turns on and lights the LED.
 

Attachments

  • low level LED driver.PNG
    low level LED driver.PNG
    5.9 KB · Views: 195
audioguru said:
Try this circuit to drive the LED.
When there is no audio then the input is at 0V and the diode's forward voltage is about the same as the transistor's base-emitter junction's voltage so the transistor is barely turned on.
When the signal swings positive a little then the transistor turns on and lights the LED.
Verrrrry smart. Thanks! I can see how that would work. Isn't the reversed diode preventing my audio input from going into the base though?

Sorry I'm not too smart about electronics stuff.
 
Last edited:
unseen wombat said:
Verrrrry smart. Thanks! I can see how that would work. Isn't the reversed diode preventing my audio input from going into the base though?

Sorry I'm not too smart about electronics stuff.

hi Trevor,
As 'agu' says when the output from the palm is 0V then the diode virtually switches OFF the transistor. [ a transistor requires about 0.7V between base and emitter to turn it ON]

When the 0.4V is output from the palm, the path for the base biassing resistor goes to 0v via the +0.7v of the diode and the 0.4V of the palm, that is 1.1V. The current via the base resistor now flows into the base of the transistor and makes it conduct.

Lets know how it goes.:)
 
Okay, I'll go get some of those 1N4148 diodes at lunchtime, but let me try to understand how this will work. The 1N4148 diode keeps the current going through the 5k resistor from going back up into my audio jack, right? Because the forward voltage across the diode is less than it's turn on voltage? Then when there's audio output, the reverse voltage is enough to turn on the diode in reverse and send some current into the base. I'm looking at the data sheet for the 1N4148, and it looks like the max reverse current is like a few nanoamps. That won't be too little to turn on the transistor?
 
unseen wombat said:
Okay, I'll go get some of those 1N4148 diodes at lunchtime, but let me try to understand how this will work. The 1N4148 diode keeps the current going through the 5k resistor from going back up into my audio jack, right? Because the forward voltage across the diode is less than it's turn on voltage? Then when there's audio output, the reverse voltage is enough to turn on the diode in reverse and send some current into the base. I'm looking at the data sheet for the 1N4148, and it looks like the max reverse current is like a few nanoamps. That won't be too little to turn on the transistor?

hi,
The base current for the transistor flows via the resistor from the battery.
If the palm output is low [0v] then this current flows to 0V thru the diode.

This flow causes a 0.7v drop across the diode, this 0.7V turns ON the transistor slightly. [as agu explained]. LED very dim.

When the palm outputs the 0.4V the diode becomes reversed biassed and stops conducting to 0V. All the base resistor current now flows into the transistor turning it hard ON, LED full glow.

So its not the reverse current thru the diode.

Is this explanation OK.?
 
I hope the forward voltage of the diode and of the base-emitter junction of the transistor match. If your LED is turned on or turned off most of the time then try another diode and/or transistor.

The current in the transistor and in the LED should increase a lot when the input voltage from the palm rises only 0.1V.
 
Okay, I just tried it. It only left the LED in the "on" state the whole time. It didn't fade or intensify or anything.

Except... and this was interesting, when I turned the device on or off (I was using my PSP rather than my palm pilot this time, because I left my palm at home), the LED turned off, and then back on. I don't see any reason for that. It doesn't make a noise when on, unless there's some residual EM waves creating some noise in the headphone output, but then after it's off, why would the LED come back on?. And it doesn't make a noise when it's turned off. Strange.

I checked the diode with my diode checker on my multi-meter. In reverse it read OL, obviously, and in forward, it was 0.69, like I expected. I don't know if this means anything at all, but when I put the diode checker on the transistor base and emitter, I got a reading of 1.828. Does that mean the transistor's turn on voltage is 1.828V? If so, would putting a resistor in series with the input diode help boost up the voltage?

Just some thoughts.

If I'm going to have to be collecting a half dozen components for this thing though, do you think it might be easier to just use 2 resistors and a single 741 op amp and make a simple non-inverting amplifier? Would that work?
 
My simple LED driver circuit needs to be fed from an audio source that has DC coupling to ground. Yours probably has an output coupling capacitor so the voltage was at 0V only when it was first connected.

My circuit can be driven from the output of an opamp if it can go to 0V. Most opamps need a dual polarity power supply to go to 0V.
 
Oh. Well I don't know what to do then. Is this just impossible without two 9 volt batteries, an op amp, transistor, and a half dozen various components?

I had a leftover 741 op amp and tried to make a simple non-inverting amplifier, but the LED just stayed on the whole time. I then tried to make a comparator, using a variable resistor to adjust the voltage into the inverting input and the audio input into the non-inverting input, but the LED just stayed off.

I can't believe making an LED blink in time to sound is such a difficult task. :(
 
Last edited:
unseen wombat said:
I had a leftover 741 op amp and tried to make a simple non-inverting amplifier, but the LED just stayed on the whole time.
The 741 is an old, low spec device

I then tried to make a comparator, using a variable resistor to adjust the voltage into the inverting input and the audio input into the non-inverting input, but the LED just stayed off.
Did you try to use the 741 as a comparator.?

I can't believe making an LED blink in time to sound is such a difficult task. :(

hi,
Look at the LM392 ic datasheet, its a opa and comparator in one package.
Its oldish, but you not looking for 'quality' of the audio, just a 'ac' amp and a level detector/comparator to flicker an LED, using a single 9Vbty.
 
Yes, I tried using the 741 as a comparator. I put one lead of the audio input into the non-inv input, the other to ground. I grounded the inverting input. Then the output was high all the time.

So I also tried connecting the inverting input to +9V through a 100K variable resistor. I turned it up til the voltage was a little less than what I was reading from the audio jack, but the output just stayed low the whole time. :(

The LM392 looks nice, but I don't know if it would work either, so I'd prefer not to go through the hassle of mail ordering. Thanks for the suggestion though.
 
Hey!

I just found this while Googling color organ in my despair.

https://www.electro-tech-online.com/threads/pulsing-led-to-audio-using-a-2n2222-transistor.35599/

That's exactly what I want. I tried it, and it works! It seems to work better when there's audio has a lot of bass, which is what I would expect, because that has the highest voltage. But my little MIDI alarms are kinda high pitched, so I'll have to use my palm's voice recorder to record some deep sounds and turn it into an alarm.

This is great. I'm so going to get lucid with this. And when I'm getting it on with Jessica Alba, I'll be sure to think of you guys. Well, actually I won't, but after! Afterwards, I'll think of you guys. ;)
 
unseen wombat said:
Hey!

This is great. I'm so going to get lucid with this. And when I'm getting it on with Jessica Alba, I'll be sure to think of you guys. Well, actually I won't, but after! Afterwards, I'll think of you guys. ;)

Hi,
Well done, looked at your link, nice simple circuit.!

Now we know why you want to lucid dream...:D

PS: Lets know how it goes, I have a 2N2222 and LED on the shelf.:rolleyes:
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top