i think you have the wrong definition of DC. DC stands for Direct Current, not Constant Current. DC can be pulsing, steady, or variable voltage without being AC. If by that you want a higher voltage or current then is available in AC, you just use a transistor to get DC. But other then that, a signal diode will rectify half wave, and a bridge will rectify full wave. Here’s some pics courtesy of http://home.planet.nl/~heuve345/electronics/course/lesson5.html 1 diode: 4 diodes, or bridge: hope this clears things up
I don't think so. I understand that by definition, AC at some interval reverses polarity. I've read abit about rectification too. Though I've also read that AC can have a DC component, "Superimposed direct current" I believe. That if the dc component added is greater than the peak of the AC, pulsating DC is the result.
That's how an audio (AC) amplifier powered by a single-rail psu works - input music signal is biased to 1/2 supply level so the output music signal swings between ground and positive rails. Feed the input through a capacitor so the DC bias can't get to the source, and feed the output through another capacitor so the DC component doesn't damage the speaker. For this bass throbber, the final signal needs to go low enough to turn the final transistor (and leds) off between beats, so needs the final capacitor if an amplifier circuit is used, but also probably needs a final rectifier after that so the transistor base doesn't see the negative-going part of the output signal. Gets a bit messy, mimicking one level of an LM3914 is much simpler IMO. Velleman used to do a kit vu-meter, mashie used it in his antique radio mod, circuit here could be used with just the input amplifier and the lowest frequency channel, ignoring the multiplexer and bargraph bits.
Thanks for the explaination. (I'm pretty sure you explained it before but I can't for the life of my find the post) Do you need to use polarized caps? Another question, as far as ADC with the PIC, if the signal varies (sound for instance), will the sample represent (roughly) the average over the sampling time?
See LM1875 datasheet for examples of single & dual rail circuits for the same amplifier. Input end doesn't matter, an audiophile would use non-polarised, but for audio the output cap needs to be very large so its reactance at bass frequencies is negligible compared to the speaker impedance. That means electrolytics. I should think so. Isn't CD music 16-bit sampled at 44kHz to keep the error low? I know my multimeter just averages variable DC like a square-wave, but that's quite a long sample time.
yes, but "pulsating DC" is not special... the HDD light of your computer has "pulsating DC". this means that it can go through a DC comparator and get intelligible results. well, you can, but thats not what we want. we want half of the AC wave, NOT superimposed AC. if i think of a good way to explain this, i will, but until then your gonna have to trust me ADC's have registers of voltage... only one can be checked at a time. for 8 bit, it has to do 8 checks... if the voltage changes from one register to another, you will get an false reading. some ADCs have an averaging cap, but others do not. the sample rate for a CD is what is recorded at. sound cards used to only be 16khz, remember that? thats because AD and DA have gotten faster and better. but both of those are going to be special DSP chips, meant to sample audio. the general purpose run of the mill AD that your going to find lying around when working with PICs just doesnt have the resolution to pick out audio (note: why are there no pic based audio players/recorders?) but there is no reason that for a light organ you need 44khz sample rate... hell you dont need 8khz. im sure that 1khz would look fine. most audio doesnt change that radically from one sample to the next (note: the mp3 algorithm works because of this) and bass thumps are particulary long lasting. so if you used a standard AD with a rectifier and averaging (connecting signal and ground) caps, you would get great results. but IMO again, there is no need for 1khz 12 or even 10 bit sampling for a light organ... counting pulse frequency or pulse length after a comparator could get the same results...
If you don't convert it to pulsed DC and are sampling it with a pic's ADC, aren't you simply throwing half (potentially) of the signal away? Perhaps for this particular project it's not going to make a big difference, but I don't see why having the ability to sample the full range of the signal would be bad. That being said, I'll probably try counting pulses as it's the simplest thing to do. I'm not worried about fast sampling rates, just some reaction. I was just wondering on the behaviour of the ADC over the sampling time. Somewhere, I've seen a pic based wav player. Obviously the fidelity isn't great, but it was still neat. I'll try and find the link.
in audio, 99% of the time the + is a mirror image of the - the fact that its still AC is a relic of the old days when there was analogue all the way to the speakers, which need an AC signal to (mechanically) pull and push a speaker cone.
As much as I love PICs... I would go for a LM3915 for this, the ADC and DSP stuff for a PIC would be a pain to get done. You would have to have the pwm for the light organ running on top of that, and unless you got hardware with 3 PWMs, your stuck with software pwm eating tons of cycles. A LM3915 or two for each channel would take care of the volume for each channel, and just simply put different value resistors on the outputs to vary the brighness. For the green chanel take the audio input, AC-couple it to a DC bias, amplify that with an op-amp, and put the output into a schmitt-trigger inverter or buffer with clamp diodes just in case. Run that to a counter or a chaser chip, and again, different value resistors on the outputs. As for the ADC on the PIC, the input charges a capacitor in the PIC, when the AD conversion starts, the cap is disconnected, and the value is determined from that cap. For more averaging, you could increase the capacitace on the input. According to the example in the mid-ranged MCU reference manual is about 12 µS, so it could take a maximum sampling frequency of 83.333kHz. But that is just pure sampling, no processing the data, rather useless to us, unless you just throw it up on the port, and let the LED and your eye do all the averaging and the DSP But if you do that you might as well just get a parallel output DAC and skip the coding.
The problem with using LM3915's for this, is it has to go through the pic controller at some point in this project. In normal operation, the color is determined by 3 rotary encoders. In mode 2, the encoders set a cycle rate, in mode 3, (not finished yet) by the tach signal of my car, and hopefully mode 4, sound. The other thing I like about using the pic, is I can tweak the operation to my liking. If I can get some sort of decent reaction to the sound, I'll be happy for now. Anything fancier I'll save for version 4
cheap way cost:3 I/O per channel lm3915 (dot mode) -> multiplexer -> PIC expensive way cost: 2 I/O line for 2 channels (clock & data) lm3915 (1 per channel) -> multiplexer -> hex P/A shift register -> PIC EDIT: hmm, can we get back to the subject of the thread... plz start another thread for this... thanks
okay, making some progress... here is a nice diagram of a "neon modulator" from jaycar. it might be overcomplcating it, but we can learn a lot from this circut
Taking the zero-loss rectifier method from the LM3915 datasheet and adding a DC amplifier with gain of 6 (U1a) plus a comparator (U1b) & current-boost switch (Q2) gives a cheap peak detector that will flash LEDs to the beat. LEDs + resistor go in place of R10, pot R8 is the sensitivity control.
1 LED color organ I've created this circuit on a breadboard to test, input is a MP3 mini player about the size of a USB flash drive. the 10K pot seems extremely sensitive, I added a second 10K resistor as suggested but the unit still needs constant adjustment. Any suggestions? BTW, All I am trying to do is create a simple 1 LED color organ. Any suggestions? Aurbo
Well, i assume your using a trimmer pot - This makes exact measurements just imposable. The resistor doesn’t have to be exactly 10k, it just forms a voltage divider. So if you had some random 2k-4k variable resistors lying around you could wire them in series to make a more sensitive control. However, this simple implementation has no gain - the LED is either on or off. i designed that circuit to work with a CCFL bulb - something that wouldn’t like getting less then 12v. If you add a capacitor between input and ground, it will add some histories to the comparator and make it work out a little better. The diagram that I drew was very basic.
Thanks for the reply, I guess I mis-read the original post. I was trying to achive a single led color organ type response from the circuit. any suggestions on trying something else? Cheers Aurbo
Ok, I did a little experimenting last night and found out the following; 1 LED with a 4.7K Pot using the Audio signal to power the LED and the Pot to dial in the trigger point of the led. Simple, but it seems to work. Now, the next problem I have is that the project requires a super bright LED and I'm not sure if it will work. Any suggestions? Aurbo
Greetings, I found this circuit diagram late last night I know the audio transformer - 4.7K pot to single LED circuit works, but the circuit is no where strong enough to fire up a super bright LED. What I would like to know is by changing the 12v lamps to 3-5v LED's and the 25VAC transformer to a 12VDC power supply, What would you change the SCR value to ? My first thought was a L7805 voltage regulator but I think I am starting to mix apples and oranges. I wont have access to test or try this circuit for alt least 2 weeks, but I hope one of you guru's here might guide me in the right direction. I'm NOT an expert in this in any way, but I do like to tinker. Any help would be greatly appreciated. Cheers Aurbo
Getting closer to my goal. Here is a schem of a kit for what I think is what the orginator of this thread was looking for. It will also suit my purpose with a little modification. What I do know about this circuit, its an LM324 quad op-amp I have all the values for the components, and for my purposes, U1A and U1B circuits are all I need for my project. In fact, changing two pin assignments on U1A (4 and 11) to (8 and 4) and you can eleminate the U1C and U1D circuits and components entirely and use an LM385. What confuses me is the use of the Capacitors in this kit, C4 and C5 are 56nF polyester, C6, C7 are 4.7uF Ceramic and C2 and C3 are 15nF Ceramic Would the different values on the caps dictate a fequency range resulting in 3 separate color channels? Cheers Aurbo
How to draw a confusing schematic. It is a unity-gain buffer (U1), the top line is its output, feeding 3 band-pass filters, so will split the audio band up and vary the led intensities over the 3 channels. 4.7uF ceramic? could be a typo, 1uF is the biggest ceramic in my catalogue. 47nF would be more in the ball-park.