I was doing some tests with a NE555 Timer today, and was wondering if I could control frequency and pwm-duty from 2 arduino PWM outputs? Just curious, as I have no clue on how. I did manage to get pwm-duty working, by replacing the resistor with pwm from pin 3, and it works. But I can't figure out how to handle the frequency...
Replace R1 and R2 with potmeters P1 and P2 and you should be able to change the frequency on pin 3. But be aware that the frequency depends on both potmeters.
With P2 you can change the LOW and HIGH timing : high = ln(2) * (P1 + P2) * C;
with P1 you can change the LOW timing : low = ln(2) * P2 * C;
Thanks, but I think I'm lost. You mean Potentiometers? Sure, I did that, works great. BUT, I want to use the Arduino PWM to control that. Imagine using MIDI messages to fire up multiple 555 timers?
I would think there's a way to use a digital pin to enable/disable the 555 to output a frequency, or not.
Maybe triangle wave instead with some post-filtering to get a cleaner tone out of it.
Gotta read the data sheet ...
(no electronic expert disclaimer)
Dont know how to do it with PWM, my intuition states that the bistable schema should be used and you need one PWM to set and another ot reset the outgoing pulse.
I was just reading a 555 datasheet. If you set up the 555 as an astable multivibrator, than the output should oscillate at the frequency set by 2 resistors and a capacitor when Reset is High, and not when Reset is Low.
Thus I suppose if you had a shift register driving the reset lines of eight 555 timers (or their multple-part per package variations), then you could control 8 tones at once. I don't know how much lag that would be, perhaps using SPI to shift out would be needed.
See a data sheet like National Semiconductor, which has a graph to give an idea of values to use, or you can plug the formula into an excel spreadsheet, pick the frequency and a couple values, solve for the others.
Take the 555 outputs, add them together using an op amp, add low pass filter to keep high frequency switching noise out. Pass on to your sound system.
Make one of the parts some kind of tunable part to dial the frequency in. Could likely do that with a digital potentiometer, use the arduino to measure it and make it autotuning!
Looks like I can setup things up and just use Pin 5 to modify the frequency, will test that out tomorrow.
Pin 5. ? Control Voltage, This pin controls the timing of the by overriding the 2/3Vcc level of the voltage divider network. By applying a voltage to this pin the width of the output signal can be varied independently of the RC timing network. When not used it is connected to ground via a 10nF capacitor to eliminate any noise.
All I did was add voltage to Pin 5, using a Potentiometer, and it works. When I get some time I will use a filtered PWM output to control more than 1x 555 at the same time. I'm sure I will get some lush sounds.
Heck, you don't need to tie up PWM pins if all you need is a static voltage - get one of the octal DACs that Analog Devices makes, think you talk to them via SPI (or I2C), can get a lot more control in frequency than you'll get with the 255 steps that PWM offers.
Will definitely make this thought from my earlier post possible!
"Make one of the parts some kind of tunable part to dial the frequency in. Could likely do that with a digital potentiometer, use the arduino to measure it and make it autotuning!"
I think to write here because quite near to my subject.
I want to control PWM fans with arduino. I try arduino own analogWrite, but because crappy (500hz) frecuenzy fans keep annoing sound.
Now think is that easiest to use 555 timer to keep up that frecuency about 20-25khz.
Just thinking how i get easiest way to do arduino + 555 chip PWM controller what give output 25khz frecuenzy and i can control pwm signal with arduino. What is easiest way do this with 555 timer.
Try to get all works with passive components, not need more chips after arduino and 555 timer.
PWM fans use that pwm signal only driving, fans get power with different wire. 555 only need give pwm signal not need current so much, thats why i think i can put 555 output pin directly on pwm fans (pwm signal pin).