Again LED dimming and fading on

Thread Starter

Chillum

Joined Nov 13, 2014
546
That's not really important, as long as you have both the pot and the series resistor in proper range for things to start working... after that you can fine tune the values to get the performance you want.
Have you tested ronv's circuit yet?
I have, is that startup 0 line adjustable? otherwise looks like what we need edit: the 0 line is before the first pulse? edit: see it's the on of the pulse that produces 0.1ms pause

edit: and I have the components, could the 10uF be electrolytic?
 
Last edited:

#12

Joined Nov 30, 2010
18,224
1) click on my name and click on my blogs in the box that pops up.
2) I drew the current generator upside down because it looks better that way. You can turn it the other way by using the other polarity of transistor.
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
how much does the peak voltage matter? If its 9V, I'll use a battery, if it's 5v I'll use a wall wart (USB 5v charger)
"LED ramp up 04" is elegantly simple, but I dunno how to get it to make a straight upwards line, been playing in LTspice, dunno what to do. also a circuit I have all the components for, but what was that which #12 said about a switch and capacitor and dump transistor, is that included in "LED ramp up 04"?
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
@cmartinez if we can't get #12's circuit to work ronv's one does work, I'm just wondering if we can make the ramp longer say max 2.5 seconds, so I changed the max of the potentiometer to 40k and set the simulation time to 5seonds; now it's ramp ends at 3s :) I'm happy, I'm learning (slowly)

edit: changed pulse and battery to 5v, now 40k gives me just more than 1.5s -- just increase the potentiometer a bit more!
 

cmartinez

Joined Jan 17, 2007
8,253
@cmartinez if we can't get #12's circuit to work ronv's one does work, I'm just wondering if we can make the ramp longer say max 2.5 seconds, so I changed the max of the potentiometer to 40k and set the simulation time to 5seonds; now it's ramp ends at 3s :) I'm happy, I'm learning (slowly)

edit: changed pulse and battery to 5v, now 40k gives me just more than 1.5s -- just increase the potentiometer a bit more!
You need to remember to choose a commercially available pot... and I can't recall seeing a 40k one... what you can also do is increase the value of the capacitor, say to 22uf
 

#12

Joined Nov 30, 2010
18,224
Please stop calling a bipolar constant current generator, "my" circuit. It's as textbook as a common emitter amplifier.

Now that you can guess that this circuit is all over the internet, try using a +/- 15 volt power supply setup, replace the 2 diodes with a 6.2 volt Zener, and thus give it room to swing some voltage. That way the ramp will have about 23 volts to work with and the current regulator will use up about 7 of the 30 volts.

The best reason to use a transistor and 2 diodes is that the voltage wasted is small compared to an LM317. If you are planning to design this whole machine to run on 5 volts, low voltage circuits are important. If you can afford (2) 9 volt batteries, you have room to use other devices.
 

cmartinez

Joined Jan 17, 2007
8,253
Please stop calling a bipolar constant current generator, "my" circuit. It's as textbook as a common emitter amplifier.

Now that you can guess that this circuit is all over the internet, try using a +/- 15 volt power supply setup, replace the 2 diodes with a 6.2 volt Zener, and thus give it room to swing some voltage. That way the ramp will have about 23 volts to work with and the current regulator will use up about 7 of the 30 volts.

The best reason to use a transistor and 2 diodes is that the voltage wasted is small compared to an LM317. If you are planning to design this whole machine to run on 5 volts, low voltage circuits are important. If you can afford (2) 9 volt batteries, you have room to use other devices.
Thanks... will do as you suggest
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
You need to remember to choose a commercially available pot... and I can't recall seeing a 40k one... what you can also do is increase the value of the capacitor, say to 22uf
I know about the constraints of commercially available pots, that was just a theoretical number to test the slope, a commercially available can do 50k can also do my theoretical value, but thanks!
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
which needs more volts? ronv's circuit or the circuit contributed by #12. If ronv's circuit can run on 5v it'll be best, but If the circuit contributed by #12 will run on 12V, I CAN use 12V because I have switch mode power supply for 12V, BUT also I can afford x2 9v batteries... but if we can keep this thing in the wall (5v or 12v) It'll be way better; I have more 5v PSUs than I have 12v PSU (7x12V 11x5V)
 

cmartinez

Joined Jan 17, 2007
8,253
@cmartinez did you get something out of the circuit contributed by #12? I don't know what I'm doing
I've been trying to make it work, but I can't figure head from tails out of it... the circuit makes perfect sense, but I'm sure I've been doing something wrong.
Have you tried building the original theremin circuit? You'd have to replace the optotransistors with variable voltage sources, but that's easy to do. Once you make it work, you could output a wav file and see how it behaves. After that we could add the ramp up circuit and start delay for the second one, then tweak it some more, and you're done.
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
cmartinez, #12, and everybody else: I wish I could build it now, but me, my mom (who I don't see often) and step dad are going to our holiday home this Easter (my brother and sister *might* be joining us) from tomorrow till Sunday...
Here's the breadboard layout and VeeCAD file if anybody is interested in actually breadboarding this thing / before *I* build it Sunday/Monday. I think you meant build it in LTspice, which I'll do aswell and I don't have a laptop so I can only start on that when I get back, then we finish this thing, I'm sure it'll work, just tweaking left and a 555 delay circuit.

@cmartinez Tell me, 2N3904, how common a transistor is it, at the supplier I have prices for 1-50 @0.36; 51-100 @0.32; 101-500 @0.30, I'm thinking of buying 106, will it be a waste? I mean its only R32 (106 and 100 cost the same)
If I'm building ronv's circuit, I mean I need 2 of those per channel with 8 channels is 16 circuits with 3 transistors per circuit thats 48 transistors just like that! ;-) oh baby yeah ;-)


PS just remove .txt from theremin.per (and theremin_LDR.per) and you can load it in VeeCAD its free (with limitations) and not that expensive (without limitations) google it.
theremin.png <-- the breadboard layout, no guarantees! building these layouts is tricky work; and I'm not driving the LEDS in the MCT6
theremin_LDR.png <--the breadboard layout of the theremin using LDRs, won't be the same as transistors
 

Attachments

cmartinez

Joined Jan 17, 2007
8,253
cmartinez, #12, and everybody else: I wish I could build it now, but me, my mom (who I don't see often) and step dad are going to our holiday home this Easter (my brother and sister *might* be joining us) from tomorrow till Sunday...
Here's the breadboard layout and VeeCAD file if anybody is interested in actually breadboarding this thing / before *I* build it Sunday/Monday. I think you meant build it in LTspice, which I'll do aswell and I don't have a laptop so I can only start on that when I get back, then we finish this thing, I'm sure it'll work, just tweaking left and a 555 delay circuit.

@cmartinez Tell me, 2N3904, how common a transistor is it, at the supplier I have prices for 1-50 @0.36; 51-100 @0.32; 101-500 @0.30, I'm thinking of buying 106, will it be a waste? I mean its only R32 (106 and 100 cost the same)
If I'm building ronv's circuit, I mean I need 2 of those per channel with 8 channels is 16 circuits with 3 transistors per circuit thats 48 transistors just like that! ;-) oh baby yeah ;-)


PS just remove .txt from theremin.per (and theremin_LDR.per) and you can load it in VeeCAD its free (with limitations) and not that expensive (without limitations) google it.
View attachment 83225 <-- the breadboard layout, no guarantees! building these layouts is tricky work; and I'm not driving the LEDS in the MCT6
View attachment 83226 <--the breadboard layout of the theremin using LDRs, won't be the same as transistors
2N3904 is a very common transistor that should be easy to find and at discount quantities, even where you are.
I'm kind of busy right now, but I'll follow up with a few comments later. Promise.
Have a good one!
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
2N3904 is a very common transistor that should be easy to find and at discount quantities, even where you are.
I'm kind of busy right now, but I'll follow up with a few comments later. Promise.
Have a good one!
thanks then I'll go for it 106x 2N3904
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
@cmartinez do we have to use the optocoupler to up the voltage, (tell me where I fall off?) were driving a ramp to drive voltage to driving an LED to drive a transistor to drive a voltage level? why not connect the 2 ramps directly to the 2 inputs of the theremin or the base of a 2N3904?
 
Last edited:

cmartinez

Joined Jan 17, 2007
8,253
@cmartinez do we have to use the optocoupler to up the voltage, (tell me where I fall off?) were driving a ramp to drive voltage to driving an LED to drive a transistor to drive a voltage level? why not connect the 2 ramps directly to the 2 inputs of the theremin or the base of a 2N3904?
No we don't... we could do away with the optos altogether in connect the ramp up directly... but that's why I suggest you sim the theremin first, so that you can tweak it and modify it until you get the results that you want... then you can build a sample circuit, and if everything checks out ok, you could then build the rest of your project.
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
@cmartinez I'm back :) stayed at our beach house longer than expected... you said build the opto-theremin, I think you meant in LTspice? well, I took a breadboard and some components along (you're going to the beach and you take your electronics kit along -- you know there's something wrong ;-) So without having access to computer, I built the theremin on breadboard, and I built ronv's circuit... now this is entirely likely, I made an error, but if I built it correctly, it does the same as every other fading circuit has ever done on me, and that is: NOTHING. led goes on as soon as power goes on, and stays on. now a curve in the circuit contributed by #12 isn't necessarily a bad thing. Oh! which file reflects #12's newest revelations (I think it was divorcing the emmitor or collector) or should that file still be created? Now I know we can get the theremin in LTspice, but I have it here beside me, if I could do it in real life, oh how satisfying would it be... but I WILL build it in LTspice aswell! errands and then I'm on it!
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
which one is it 1 or 2?, dunno exactly how the "ON" flag would implement? edit: I think its 1, 2 would just short high and low; edit: I built 1 over the weekend, but I'll check with VeeCAD if I did the layout correctly
 

Attachments

Top