Again LED dimming and fading on

cmartinez

Joined Jan 17, 2007
8,257
LTspice rules, I don't need an oscilloscope anymore :)
You won't need it for a while... but you will, eventually.

Anyway you can learn tons of stuff for free now. There's an LTspice yahoo group that you could suscribe to, and learn tips and tricks. I suggest you check it out.
Gotta go for now, but I'll follow through on #12's latest design tonight, promise.
 

cmartinez

Joined Jan 17, 2007
8,257
I thought that it should be simple to do the delay, my guess was a simple capacitor to reset?
Nope, for the second led's delay I was thinking about a simple monostable 555 that would trigger it.
Anyway, one last thing before I go... want to know something really, really cool? LTspice is capable of generating wav files... that means that you can model your entire circuit in it and then actually listen to the sound that it's going to generate.
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
Check this post out. I suggest you run the .asc file and then listen to the results.
OK, we know it's possible to make a fart sound out of the opto theremin (he does it in the video), but do we KNOW it can make it at other notes? just by the speed of the slopes and startup delay? We can model that right? in LTspice? see if the model checks out (export wavs), and then invest in expensive components, cause I have no problem paying R50 for 8 components each as long as I KNOW it's not a gamble? but then you need that language that the .asc files have... will see if I can get my head around it!
 

cmartinez

Joined Jan 17, 2007
8,257
OK, we know it's possible to make a fart sound out of the opto theremin (he does it in the video), but do we KNOW it can make it at other notes? just by the speed of the slopes and startup delay? We can model that right? in LTspice? see if the model checks out (export wavs), and then invest in expensive components, cause I have no problem paying R50 for 8 components each as long as I KNOW it's not a gamble? but then you need that language that the .asc files have... will see if I can get my head around it!
One step at a time dude... I'm pretty sure you can make slight modifications to the circuit to change its frequency output, and model it in LTspice... And that language that you're talking about is also a bit of a mystery to me, but you (we) can learn lots more by looking for help and studying the manuals.
Let's first model #12's constant current circuit and then take it from there.
Really gotta go for now... have a good one. ;)
 

cmartinez

Joined Jan 17, 2007
8,257
Oops. Forgot a resistor.
That's a constant current generator with rate adjustment. If you plug it in to a capacitor, the voltage on the cap will ramp very straight until it gets to about Vcc-2V.

What I'm doing here is throwing in sub-assemblies without taking responsibility for understanding and designing the whole thing.
Well, I've been playing with the thing and no matter how many different range of values I plug in, I just can't seem to make it work.
Can you give me ballpark figures on the values of the components?
 

Attachments

#12

Joined Nov 30, 2010
18,224
The first thing I think is that you are sending a lot more current down the 470 ohm leg than the 400 ua through the transistor. You can put a lot more resistance in the left leg.

Then I see that the "waste" current is going to be significant, even if you design for a gain of ten because the voltage across the 470 ohm position changes constantly. Then I realize that this circuit is much better suited to the output of a power supply than a precision analog circuit. I think I'm just going to have to apologize for this one. It certainly explains why I chose a jfet when I was building circuits. There is no "waste" leg in a jfet KI circuit.
 

cmartinez

Joined Jan 17, 2007
8,257
The first thing I think is that you are sending a lot more current down the 470 ohm leg than the 400 ua through the transistor. You can put a lot more resistance in the left leg.

Then I see that the "waste" current is going to be significant, even if you design for a gain of ten because the voltage across the 470 ohm position changes constantly. Then I realize that this circuit is much better suited to the output of a power supply than a precision analog circuit. I think I'm just going to have to apologize for this one. It certainly explains why I chose a jfet when I was building circuits. There is no "waste" leg in a jfet KI circuit.
Geeezzzz an apology? from YOU???? mind if I send you a pre-written note for you to sign and send back to me so I can frame it and hang it on my desktop? :p ha ha ha... no worries, my friend... I've been learning a lot anyways... thanks!
 

cmartinez

Joined Jan 17, 2007
8,257
Ok, so here's a circuit that @ronv generously designed for us, and that I tweaked a bit in order for it to work in range that I think is appropriate. Play with the value of the potentiometer's wiper (which can range from 0 to 100%, that is, from 0.0 to 1.0) and see what happens at the "out" label.

You need to copy the file "potentiomenter.asy" into the directory "C:\Program Files\LTC\LTspiceIV\lib\sym", and the file "potentiometer.sub" into the directory "C:\Program Files\LTC\LTspiceIV\lib\sub" for everything to work properly.

Untitled.png
 

Attachments

#12

Joined Nov 30, 2010
18,224
Finally had time to think about this. Divorce the collector.
The second drawing has a key to dump the capacitor, but it works backwards for a piano.
Is this enough to fire your imagination?
(What am I doing, waking up at 4:30 am to do a little drawing???)
 

Attachments

cmartinez

Joined Jan 17, 2007
8,257
@cmartinez could you please help explaining what divorce the collector means?
It means he left the collector "floating" ... that is, not connected to either ground or positive via a resistor, which is an unusual practice but valid in some cases... I'm gonna try to model his second drawing and see what results I get.
 

cmartinez

Joined Jan 17, 2007
8,257
Finally had time to think about this. Divorce the collector.
The second drawing has a key to dump the capacitor, but it works backwards for a piano.
Is this enough to fire your imagination?
(What am I doing, waking up at 4:30 am to do a little drawing???)
Well, I've modeled the second drawing with and without the transistor that dumps the capacitor, and after playing quite a bit with it I was only able to produce a ramp down, of only about 1 mV, and lasting 3 seconds ... I wonder what we're missing here... also, I fail to understand the presence of the two diodes in series... is it to produce a larger voltage drop at the collector?
 

Attachments

Thread Starter

Chillum

Joined Nov 13, 2014
546
Well, I've modeled the second drawing with and without the transistor that dumps the capacitor, and after playing quite a bit with it I was only able to produce a ramp down, of only about 1 mV, and lasting 3 seconds ... I wonder what we're missing here... also, I fail to understand the presence of the two diodes in series... is it to produce a larger voltage drop at the collector?
from what I see, I think you're adjusting the pot, shouldn't the pot be set at one value and then measure the ramp, or am I missing something here?
 

cmartinez

Joined Jan 17, 2007
8,257
from what I see, I think you're adjusting the pot, shouldn't the pot be set at one value and then measure the ramp, or am I missing something here?
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?
 

#12

Joined Nov 30, 2010
18,224
The 2 diodes hold the base of Q1 at 1.2 volts away from the power supply rail. The base to emitter of the transistor uses up 0.6 of those volts and the other 0.6v is available to be across the adjustment resistor. I=0.6V/R

With the collector divorced, you can run all the current you want through the diodes. Your earlier choice of 470 ohms is only limited to some amount that will not overheat the diodes.

Start by applying voltage to the circuit and C1 should start filling up with current. Constant current/capacitance = linear ramp...until the voltage on the capacitor gets close to the power supply voltage. Then the transistor runs out of voltage.

Done? Push the button switch and dump the capacitor.
D'oh. I didn't really need a transistor for the dump. I could have just placed the switch across the capacitor because you can't burn up a constant current source by grounding its output.
 

cmartinez

Joined Jan 17, 2007
8,257
Start by applying voltage to the circuit and C1 should start filling up with current. Constant current/capacitance = linear ramp...until the voltage on the capacitor gets close to the power supply voltage. Then the transistor runs out of voltage..
Will do, thanks ...

D'oh. I didn't really need a transistor for the dump. I could have just placed the switch across the capacitor because you can't burn up a constant current source by grounding its output.
That proves that it isn't wise to make design decisions after 3:00 AM... ;)
 

KLillie

Joined May 31, 2014
137
Thanks for mentioning it. There is a lack of feedback about blogs and I often think nobody notices them or gets any education from them.
Where is your blog? I tried clicking a link in this website and it said I did not have permission!
 
Top