KiCAD Freakduino

Based on the excellent work of Akiba of <a href=
Freaklabs, re-created in free KiCAD format. (Some components differ.)” width=”300″ height=”244″ /> Based on the excellent work of Akiba of Freaklabs, re-created in free KiCAD format. (Some components differ.)

For a long time, I’ve wanted to get into 2.4GHz digital RF communications, using microcontrollers. I recently came across the Freaklabs “Freakduino” v2.1a and bought a couple straight away.

The Freakduino – or chibiArduino (link to authentic Freakduino site) – is an Arduino compatible device, with on-board 2.4GHz radio. It utilises a custom-built protocol stack, named “Chibi”, which means “midget” in Japanese.

The radio chip itself is a Zigbee compliant Atmel AT86RF device. The Chibi stack, written by Akiba of Freaklabs, is an easy to use and light weight (small code size) stack, enabling simple communications, for known network structures. So, no mesh capability or anything like that. But it’s fully capable of addressed, bi-directional point to point and broadcast communications, over 802.15.4 style data channels and physical layer provided by the AT86RF radio chip. I’ve found it to be really fast and it even handles error correction on the fly. Just the thing for sending sensor information or twitter texts. (Honestly, I barely know what I’m talking about. So keep your grain of salt handy!)

If you wanted to, you could easily extend the Chibi stack to work whatever magic you can dream up. But you’ll be pleased to know there’s also FreakZ, a mesh networking stack. FreakZ is in early development at the time of this writing. It’s a big undertaking and already a great start!

Chibi requires only your favourite microcontroller and a compatible radio chip. So quite small circuit boards can be made.

Most importantly for me though, Chibi gave the opportunity to learn and understand low level Zigbee style radio communication, without having to learn the full Zigbee protocol and everything it is capable of, just yet anyway. So my learning curve has been significantly reduced, while still allowing practical devices to be built at my hobby desk, now. Very cool. Thanks Akiba! 😉

The Freakduino hardware, whilst fully open, is apparently authored using closed electronics CAD software, of some kind or another. I prefer to use open and free (as in speech) software, like KiCAD. So, this project is about creating a Freakduino v2.1a compatible board, in free KiCAD software, while at the same time gaining experience with the Atmel 2.4GHz Zigbee radio chip and Chibi, or course. This will also be only my second experience of hand building a board with a tiny QFN part as well as my first ever 2.4GHz project. So plenty of knew stuff to learn and play with.

Luckily, my interests in Ham Radio have prepared me for the some of the … shall we say, mystical aspects of microwave radio circuitry. I think I’ve got it about right in this case.

So there it is. An open KiCAD  based version of the Freakduino v2.1a. Bare in mind though that it will surely cost you a lot more to build your own, compared  just buying from Master Maker Akiba, over at his Freaklabs Store!

My design uses a couple of different components (level shifter and 5V boot regulator) due to local availability. Ironically, after a week of failing to find the two troublesome parts and going ahead with my modified version, I just received an email from China, asking me how many thousands of the ones I couldn’t find! Oh well.

Finally, I should point out that building one of these boards for yourself, using my open source design files hosted at Google Code (and not yet production ready at time of writing anyway) will be MUCH (much!) more expensive than just heading over to the Freaklabs online shop and buying some directly from Akiba, the original creator. I’m choosing to, “suffer the expense” as an education cost, you see. 🙂

USB DSL Traffic Meter / Alarm Thingy

USB Bandwidth Alarm image
USB Bandwidth Alarm Prototype

Recently, something went rogue on our network and happily consumed over 3GB every hour, for 16 hours — over 85GB in less than a day. :-/ I was not impressed.

So, this afternoon I thought, “Wouldn’t it be nice to have some simple, visual / audible display or alarm that would alert me to problems like this, without having to remember to check on my traffic accounting system.” So I made one.

Continue reading “USB DSL Traffic Meter / Alarm Thingy”

ER9X-gruvin 20101111 release

WARNING: This is a really, really old and WAY out of date post.

Visit The OpenTX Project for the hugely improved, latest version of this firmware.

We — that is, myself and friends — now use a much later and (astonishingly) far more feature rich and optimised firmware, named open9x.

ER9x-gruvin Firmware Release 2010-11-11

I’ve made a few changes/additions to my ER9X firmware.

Feature 1 — Keypad auto-repeat delay

The standard ER9X firmware (and the original TH9X version) do not wait a while before commencing key/button auto-repeat. Hence, if you hold a button down just a tiny bit too long, you end up going two or three ‘clicks’. This frustrated me, so I added a longer initial delay, as we’re used to having on PC keyboards etc.

Feature 2 — Better beeps and buzzes

If you have a stock Turnigy/iMax 9X you like to rave about, I’ll bet you don’t mention the hideously annoying/ear-piercing buzzer/beeper thingy!

And, if you’re planning on following my Fr-Sky telemetry additions, you’ll probably be wanting various different tones frequencies/tunes instead of the stock high-pitched squeal for every event.

My solution was to disconnect the stock ‘screamer’ and replace it with a miniature speaker — WITH A 4.7uF CAPACITOR in series. The capacitor is needed to prevent damaging your CPU and/or wasting battery power. I got my ‘speaker’ out of some old budget headphones.

To make it work, I’ve written code to implement “beeps” of any desired length and at lots of different frequencies. So, I can now have long, high pitched tones or short, low pitched tones — or even complete tunes like, ‘Knees up mother brown!’, if I want . 😀

All this will come in handy when I have my AoA (Angle of Attack) sensor and telemetry feedback for ‘always perfect’ landings … or at least, such is the goal. I plan to use tones similar to the rise/sink sounder in modern gliders, and probably a plug-in earphone.

The version I’m posting today has all present tones the same frequency (lower!) and at the same durations as the original ER9X firmware. It  works so well that I’ve actually turned ‘key beeps’ back on. Much more pleasant to the ear now. 😀

The Code

[This code is based on ER9X trunk, release 262]

Pre-compiled HEX

The file contains four pre-build hex files ready for flashing. Their names include the features they contain. The names are …


NOTE: The two FRSKY versions require that you re-wire stuff inside your 9X. “std” means “standard” or “not Fr-Sky”.

If you have a stock ‘9X and you just want the better keypad auto-repeat delay, use er9x-std-rptdelay.hex.

Source Code

My complete source code for this version can be found in the following file:

There are two new make directives for turning on and off the new features. They are:

BEEPER -- values can be BUZZER (the default) or SPEAKER
KEYRPT -- values can be STD (the default) or DELAY

Example make usage to include both features, as well as Fr-Sky support …


The Future

As time goes on, I may end up as a submitter for the ER9X project itself. However, if I start adding lots of custom features, I’ll probably fork off with my own project – Groovy9X I suppose :-P. Time will tell.

Speaker / Capacitor Installation

Correction to the above — you can’t actually simply “replace” the stock beeper with a speaker. The image below shows what I actually did. (The capacitor is installed the wrong way around too by the way. Negative should ideally go toward the white speaker wire.)

click for full-size