my recent reads..

Atomic Accidents: A History of Nuclear Meltdowns and Disasters; From the Ozark Mountains to Fukushima
Power Sources and Supplies: World Class Designs
Red Storm Rising
Locked On
Analog Circuits Cookbook
The Teeth Of The Tiger
Sharpe's Gold
Without Remorse
Practical Oscillator Handbook
Red Rabbit

Tuesday, March 22, 2016

LittleArduinoProjects#197 Wien Bridge Audio Tone Generator

A Wien bridge oscillator is essentially an RC Band Pass Filter with a high Q factor at the resonant frequency, and generates a nice sine wave. I wanted a simple audio-frequency test signal generator, and a Wien Bridge turned out to be perfect for the job.

As always, all notes, schematics and code are in the Little Arduino Projects repo on GitHub.


A good old LM324 does triple duty in the circuit:
  • a non-inverting amplifier with a gain of ~3 provides the feedback required to sustain the oscillator
  • one unit buffers a half-supply voltage to provide a "virtual ground" for the non-inverting amplifier
  • a third unit buffers the output signal to avoid load interference with the oscillator
The LM324 doesn't have great upper and lower limits, and clipping is severe in the basic circuit. This is solved with diode stabilisation.

The result is a pretty decent sine wave at ~1.574kHz, very close to the theoretical resonant frequency of 1.592kHz.

Sunday, March 20, 2016

LittleArduinoProjects#196 Driving a 7-segment display with CD4026 Counter

Here's yet another way to drive a 7-segment single-digit display unit - using a CD4026.

The CD4026 is a 5-stage Johnson decade counter with decoded 7-segment display outputs and display enable. With RESET and CLOCK INHIBIT low, and DISPLAY ENABLE IN high, the 7-segment display outputs progress through the 0-9 sequence on the rising edge of the CLOCK pulse.

It's an interesting alternative to a shift register for driving a 7-segment LED (as in the ShiftDrive project). While a latched shift register provides random addressing and clean transitions to any digit, it requires the 7-segment display outputs to be decoded externally (like in code). On the other hand, the CD4026 takes care of the decoding, and external circuits just need to send a counter pulse.

As always, all notes, schematics and code are in the Little Arduino Projects repo on GitHub.

Thursday, March 10, 2016

LittleArduinoProjects#195 Coil Resonance and Inductor Testing

I've been trying to do some RF experiments, but instead being driven mad by hand-wound coils that never seem to behave as the standard coil inductance calculations would lead us to believe.

As always, it's w2aew to the rescue with a neat deconstruction and demo of a circuit for coil or inductor measurement.

I built the circuit out, and was easily measuring down to 10µH on a breadboard, and sub-1µH once I put the circuit on a hacked up copper board with islands. Using the LC circuit resonant frequency formula, it's possible to work backwards from known frequency and capacitance to determine the inductance (wolframalpha is great for this).

So now I hope to get back into some RF without the nagging doubt of not really knowing what my coils are doing!

As always, all notes, schematics and code are in the Little Arduino Projects repo on GitHub.

Here's a beautiful trace of a (nominally) 10µH choke with a 150pF capacitor. I measure the frequency at 4.26MHz, therefore an actual inductance of 9.3µH .. pretty close!


Even with a super-bodgy 4.5 turn coil whipped up on the spot and put in parallel with a 30pF capacitor, I'm still getting a decent oscillation at 34.09MHz for a calculated inductance of 0.73µH


And here's the board delivering the results:

Tuesday, March 08, 2016

LittleArduinoProjects#194 DIY ESP8266 DevBoard

With the funding of the MicroPython on the ESP8266 campaign, my interest in the ESP8266 is rekindled!

I have an ESP-01 module lying around, but I'm a bit tired of wiring it up a breadboard again. So here is a little "devboard" I whipped up on a 4x6cm protoboard and hot-glued to a business card holder.

Now it's plug'n'play - add power and plug in a USB serial adapter and I'm good to go.

As always, all notes, schematics and code are in the Little Arduino Projects repo on GitHub.

Thursday, March 03, 2016

LittleArduinoProjects#193 PoV LED Shake Stick

This AT89S52-based "shake stick" kit pops up all over the place for a few dollars. I built it and hey, it works great!

But it's not packaged to be easily re-programmed for other messages or graphics. So started my sleuthing.. which turned into a fascinating story.

It seems the kit was originally designed and built as a uni project by Zheng Zhong Xing 兴向荣 (aka zhengzhongxing39) studying Control Technology and Instruments/Principles and Applications at a Chinese University. Reportedly "... soldering was troublesome, with lots of changes and no solid basic skills, so burned out the first board" ;-) But it seems persistence paid off, and ended up commercialising the kit and starting electronics business and taobao store where you can find this kit and many others.

As always, all notes, schematics and code are in the Little Arduino Projects repo on GitHub, including my annotation of the source code and schematic for the shake stick.