LittleArduinoProjects#207 Frequency Counter

Testing a CMOS frequency counter circuit with a 100Hz - 5MHz range.

I found this circuit published in Electronics magazine (Sep 16 1976). It's a classic demonstration of the CD4026 "bucket-brigade" and CD4047 astable oscillator.

The frequency counter is governed by a CD4047 oscillator. Since this offers a clean 50% duty cycle, it is ideal for flipping the circuit between two modes: sampling period; display period.

As always, all notes, schematics and code are in (more...)

LittleArduinoProjects#206 CD4047 Astable Oscillator

The CD4047 is capable of running in astable or monostable configurations, with operating frequency configured by an external RC network. So in one sense, sounds like the 555 timer!

Unlike the 555, the CD4047 provides a fixed 50% duty cycle with good frequency stability (+/- 2% @ 100KHz).

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


LittleArduinoProjects#205 Triac Dimmer

A triac is a "bidirectional thyristor" because it conducts in both directions and is typically used in AC applications.

The basic behaviour of a triac can be summarised in two rules:
  • Rule 1. To turn ON, a gate current ≥ IGT must be applied until the load current is ≥ IL (latching current).
  • Rule 2. To turn OFF (commutate), the load current must be < IH (holding current) for long enough for the device to return to the blocking state.

This project is a test of the classic AC dimmer circuit (more...)

Create a Simple Cassandra Cluster With 3 Nodes

Apache Cassandra™ is a massively scalable open source NoSQL database. Cassandra is built from day 1 to be clustered to tick the usual clustering boxes; no single point of failure, and capacity and throughput scales with cluster size. This guide will look at creating a three node basic cluster within a single data centre. It is assumed

Cassandra Firewall Ports

Cassandra uses various ports for communication, either server to server communication or client to server communication. If you’re using Cassandra in a firewalled environment you may need to open various ports depending on your needs. All ports are TCP and can be configured in the relevant config files to use non-default ports.

Install DataStax Cassandra 3 on Debain/ Ubuntu

The following process will install the DataStax distribution of Cassandra on any Debian based system, such as Debian or Ubuntu. We’ll use the official DataStax apt repositories to install Cassandra using apt-get. Cassandra is written in Java and the latest version (at the time of writing) of Cassandra requires Java 8. You can use either OpenJDK or

LittleArduinoProjects now with fancy catalog!

I keep finding new uses for GitHub Pages - situations where in the past I would otherwise have spun up a web site on heroku or similar. But if the site can be static, and especially if you are already hosting the git repository at GitHub, Pages are perfect.

For a long time, I've maintained the LittleArduinoProjects project index as a simple table in the README. But it wasn't particularly nice or usable, so I (more...)

On "random" CI failures

I closed a bug yesterday that's been kicking around for almost a year as a sometimes fails on CI but no-one can figure out why frustration.

Sooner or later you'll hear someone suspect it must be a problem with CI. Which is ironically funny in a shoot-the-messenger kind of way!

Thankfully our "CI issue" turned into a for-real bug. In short, the code involved many classes with near 100% test coverage. It had been read (more...)

LittleArduinoProjects#204 Type K Temperature Logger

I'm working on an idea where I need to measure temperatures to around 500°C - above those typically supported with semiconductor sensors or thermistors.

This project demonstrates the basic approach using an Arduino as the "temperature logger". I'm using a K Type thermocouple that's rated up to 700°C. Since thermocouples only measure a differential temperature, I'm also using an LM35 to provide the cold-junction baseline. The temperature measurement is displayed on a 5110 LCD.

As (more...)

阿部真央 Don’t let me down

One of the best finds in the racks at Tower Records Fukuoka福岡市. It's been years since I last got to browse a record store in Japan; I'm glad they still exist, with stacks of CD players queued up to sample. And a huge relief to see the indie rock scene is just as vibrant as I remember!

LittleArduinoProjects#203 Homopolar Motor

What happens when electric fields cut across magnetic fields? A force is generated, and the homopolor motor is the classic demonstration.

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


LittleArduinoProjects#202 LM3915 Audio Level Kit

The LM3915 is a useful IC for simple audio level displays. This is a cheap kit build which largely follows the reference circuits in the datasheet.

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

LittleCodingKata: Hardware Excuse Generator with gRPC

gRPC is a very interesting lightweight middleware framework for language-neutral, cross-platform RPC.

When I heard about Natalie Silvanovich's Hardware Excuse Generator on Embedded.fm, I immediately recognised a better "Hello World" for testing out gRPC.

Introducing "The Explainer": my programming exercise to learn basic cross-language request/reply with gRPC.

I haven't completed the whole matrix of client-server possibilities yet, but here's a sampling...

Start up a server (e.g ruby version)
$ ./explainer.rb 
(more...)

Embedded: Specialization is for insects

embedded.fm has fast become my favourite podcast of the moment (always excepting QOTD). Great ideas shared in an inclusive and warm-fuzzy way.

Elecia's end-of-show quote always makes it worth listening right to the end. Until I heard #146's,
I'd struggled to find words to express exactly this. It's a quote from Robert A. Heinlein:

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn (more...)

LittleArduinoProjects#201 Yet Another Doorbell

aka door-fart according to my better half ... 555 Timer-based oscillators are not exactly the most musical creatures.

#201 is a kit build. Ridiculously cheap on aliexpress, it even came with extra components, so a bit of a bargain impulse-buy.

The kit turned out to be a simplified version of a circuit I've built before. It lacks the power control circuit, and draws about 4mA when idle - so if you actually use it, expect (more...)

LittleArduinoProjects#200 Mini Solenoid Engine

Solenoid engines? They definitely fall into the the category of because you can.
Some people take it to a whole other level (like this V8 model).

What I have here is much more modest - a single-cylinder engine powering an impromptu-wire-art drive train. The mini-solenoid used here has a very small effective stroke - about 8mm - which necessarily constrains the gearing. I was inspired by 30GB's similar model for the layout.

As (more...)

LittleArduinoProjects#199 CD4026 Bucket-brigade LED driver

This is an extension if the ideas in #196, demonstrating how it's possible to build a "bucket-brigade" of CD4026 chips to drive an arbitrary number of 7-segment LEDs with a single data line.

It just requires the carry-out from the first CD4026 to be chained as the clock input for the second and so on.

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


LittleArduinoProjects#198 Hall Effect Switch

Hall-effect sensors generally support one of three modes:
  • switch - turn on in the presence of a magnetic field of a specified polarity
  • latch - turn on in the presence of a magnetic field, and stay on until exposed to the reverse polarity
  • linear sensor - output is proportional to the magnetic field strength
The components I have for testing are marked "44E/938" and are nominally compatible with the A3144 or OH3144. These are switches (more...)

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:

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 (more...)