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

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

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

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

LittleArduinoProjects#192 Sagrada Família model with LED effects

The Basílica i Temple Expiatori de la Sagrada Família has been under construction since 1882. The magnitude of the vision driving the project - both physically and creatively - is striking, especially at first hand.

Then you see the work in progress - the cranes, scaffolding, workers scurrying around the site. But that is what I think really brings it to life. This is not a frozen, finished statement of something other-worldy. It's a vibrant (more...)

LittleArduinoProjects#191 glowing LEDs on 1.5V

So for another project I wanted some "glowing" LEDs, ideally powered from a single 1.5V AA or AAA battery. That seemed like an interesting challenge, especially when the forward voltage of the LEDs I'm using is about 2.1V.

I had a feeling I could cobble together a couple of ideas (Relaxation Joule Thief and RC Oscillator) .. and lo, it works!

As always, all notes, schematics and code are in the Little Arduino Projects (more...)

LittleArduinoProjects#137 Toroidal Joule Thief

In #129 I posted about a two-transistor boost circuit. This is an even simpler circuit - very common over around the internet and known as the archetypal "joule thief". The smallest I've seen is Eric Wasatonic's micro version.

I stuffed my circuit into a AA battery holder and it works great as a night light, powered by either a single somewhat-depleted AA or AAA battery.

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

LittleArduinoProjects#129 Relaxation Joule Thief

I was inspired by w2aew's excellent video to check out the Ears To Our World humanlight project. It's a good cause, although shipping costs kill the idea of buying one myself - better just to make a direct donation.

It's also an interesting circuit - a variation on the many "joule thief" circuits out there - and also demonstrates some of the basics that under-pin boost converter power supplies.

As always, all notes, schematics and (more...)

LittleArduinoProjects#001 basics of 7-segment LED control

Going back to basics - this project is a test of directly driving a common cathode 7-segment LED with an Arduino. It covers the fundamentals behind more advanced circuits like this custom PCB with register interface.

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

LittleArduinoProjects#178 making a 7-segment LED PCB

My version of the second project from the KiCad like a Pro course (the first was an nRF24 breakout board).

The board combines a common-cathode 7-segment display with a shift register and current-limiting resistors. Nothing earth-shattering, but a good little KiCad exercise. I recently got the boards back from OSH Park, and they work just fine!

As always, all notes, schematics and code (including the KiCad project) are in the Little Arduino Projects repo on GitHub.

LittleArduinoProjects#188 read/write AT24C02 external EEPROM

The AT24C02 is from Atmel's line of serial EEPROM chips with a whopping capacity of 2K! (256 x 8) That's not a whole lot more than the onboard EEPROM in an Arduino, but it does have the advantage of being external:
  • it can stay in-situ even if the microcontroller disappears/gets exchanged
  • multiple devices can share access
There are a few libraries available that encapsulate the interaction with external EEPROMs, but first step is a simple (more...)

LittleArduinoProjects#187 nRF24L01+ Ping Pong

So now I have my nRF24 breakout boards back from OSH Park, time to try them out.

This is a simple script that runs on two Arduinos. They bounce messages back and forth over 2.4GHz using the nRF24L01+ modules, flashing their LEDs when messages successfully handled. Sweet, and the breakout boards work just fine.

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

LittleArduinoProjects#176 nRF24 Breakout Board

So recently I've been intrigued by small-batch PCB fab services, like OSH Park. Like the ready supply of components from various online sellers, it's amazing how cheap you can get boards made over the net these days. How do they do it? As I learned in this hardware hangout, there are some neat tricks done behind the scenes to aggregate small orders into full panels sent to a fab.

But to get PCBs made, (more...)

LittleArduinoProjects#186 Asynchronous Counters with JK Flip-Flops

A quick demonstration using four JK flip-flops set up in "toggle" mode to implement an asynchronous 4-bit binary counter. This is the classic circuit, straight out of a text book. It's implemented with:
  • two 74LS73 for the flip-flops
  • a 555 Timer astable oscillator providing the clock pulse
As always, all notes, schematics and code are in the Little Arduino Projects repo on GitHub.

Why "asynchronous"? This refers to the fact that the output of each (more...)

Generating Diceware Passwords in Python

Today I’m going back to a theme from a post last year and looking at generating passwords with my favourite programming language. A tweet from Simon Brunning pointed me to Micah Lee’s article at The Intercept and my first thought was to write a function to do this in Python. So here it is;

def generate_diceware_password(word_count=6):
    import random
    word_dict = {}
    passphrase = []
    with open('diceware.wordlist.andy.txt') as f:
        for line in f. (more...)

Teaching an old dog to Fish

Inspired by the recent furore around Shellshock I decided that it was time to try an alternative to bash. By the very grown up process of shutting my eyes and poking my finger at the results of a search for “shell” I ended up at fish shell, described by the project as “a command line shell for the 90s”. I’m presuming that this means the 1990s and is not a minimum age requirement.

I’m (more...)

Generating Reasonable Passwords with Python

Thanks to a certain recent Open SSL bug there’s been a lot of attention paid to passwords in the media. I’ve been using KeePassX to manage my passwords for the last few years so it’s easy for me to find accounts that I should update. It’s also a good opportunity to use stronger passwords than ‘banana’.

My problem is that I have always resisted the generation function in KeePassX because the resulting strings are very (more...)

My Career

The next time anyone asks me what I do for a living I’m just going to point them to this YouTube video.

Found on the twitters thanks to Nick Hodge and Jess Dodson.

Howto debug Mendix java actions

To debug Java Actions used in a Mendix Microflow you need to make some configuration changes to the way you start the Mendix runtime.

Add the following in your project settings, in server configuration add the following to Extra JVM parameters:


Mendix Project Settings

Start your application in Mendix.

In your Java IDE you need to configure remote debugging. The following screenshot shows my configuration in IntelliJ

Mendix Intellij remote debugging

Start the debugger, put some breakpoints in your (more...)

Profiling Mendix using JProfiler

JProfiler is a Java profiler which can give you insight into what a running application is doing: which methods are consuming the most cpu, how many objects are created, etc. Jprofiler also shows you information about jdbc calls and sql statements executed by your java application.

Setting up Jprofiler to profile a Mendix runtime is easy, you can start profiling a running Mendix runtime, without reconfiguration or restarting the application.

The installation guide provides a (more...)