- Variable frequency (ranging from as high as 250kHz and below)
- Constant 50% duty cycle across all of these frequencies
- Capacitor input for changing frequency (150pF lowest to as high as you like)
- Potentiometer for changing frequency
- Output pins
- "built in" power supply
- RC low pass filter
- 555 timer (I'm using the NE version)
- Resistors and capacitors (see schematics for approximate values)
- Cell phone charger as a power supply
- Stuff to solder
Uses (for me anyway)
- Variable clock for some digital logic fun
Step 1: Draw Up Some Schematics Etc.
Also not in the schematics but implied by the design is:
- The port for plugging in variable caps. (wire accordingly to pin 6, 2, and ground)
- same port for plugging in output. (wire accordingly to pin 3 and ground)
- The power cord from an old cell phone charger (wire accordingly to pin 8, 4, and make sure all grounds are the same)
Step 2: Solder It Up and Choose Your Enclosure!
Hot glue if necessary
Step 3: Test Using Oscilloscope
Images above are frequencies with potentiometer at 0 ohms and at full crank (44.3K*). Note a 10K resistor (9.88K measured) is in series with the potentiometer so that when Rb (from schematic) is at "0 ohms" it's actually at 9.88K, and when it is fully cranked it is actually 54.18K.
In this picture a 150pF (code: 151) is used to get the maximum 250KHz allowed by THIS design. Anything lower in capacitance and the 50% duty cycle begins to wane.
Another way to test the duty cycle without an oscilloscope is by using a voltmeter, the voltage should stay approximately the same if 50% duty cycle holds.
Step 4: Making the Waveforms Sexier
wikipedia RC low pass filter.
Note the low pass filter is only necessary for the lower capacitor values (and hence higher frequencies) and I could have made the filter a little better but I was happy with the wave forms (they look like squares to me!)
p.s. I'd like to say that I calculated the values necessary for the low pass filter using 1/(2piRC) but I just kind of randomly tested what worked until I was satisfied (560 ohm resistor and 3pF cap)
Step 5: Messing Around
When the "low pass" filter has higher capacitor values it starts making these awesome triangle waves I thought that I would show!
Step 6: Improvements
I'm pretty proud of this little thing, and it will happily suit my needs, but just to give some suggestions to improve for next time:
- Build the low pass filter inside of the project
- figure out the problem with the peaks rather than trying to filter out the noise
- Mess around with different valued decoupling capacitors (pin 5)
- Add a port for pin 5