Welcome to t r o n i x s t u f f
Hello, and welcome to the t r o n i x s t u f f website. Regular articles are published about many things, including analogue and digital electronics, electronic kits, part reviews – and you can also follow our popular series of Arduino tutorials. The latest posts are below, and at your top-right are indexes to previous articles. On the right are ways to subscribe for new post notifications, author contact details, as well as links to our Google Group for discussion. Finally, there is also a monthly prize giveaway! Please have a look around, learn something, and don’t be afraid to make a comment or offer your feedback. And remember – there is so much more than just Arduino! (“Arduino” is a trademark of Arduino Team)
Before following any tutorials, please read and understand the boring stuff.
So have fun, stay safe, be good to each other – and make something!
Arduino meets Las Vegas with the Freetronics DMD
Hello Readers
Time once more to have some fun, and this time by examining the new Freetronics DMD “Dot Matrix Display”. We will look at the setup and operation of the display. In a nutshell the DMD comprises of a board measuring approximately 320mm across by 160mm which contains 16 rows of 32 high-intensity red LEDs. For example, in the off state:
Connection of the DMD to your Arduino-compatible board is quite simple. Included with each DMD is a 2×8 IDC cable of around 220mm in length, and a PCB to allow direct connection to the Arduino digital pins D6~13:
Finally the cable connects to the left-hand socket on the rear of the DMD:
You can also daisy-chain more than one display, so a matching output socket is also provided. Finally, an external power supply is recommended in order to drive the LEDs as maximum brightness – 5V at ~2.8 A per DMD. This is connected to a seperate terminal on the rear of the board:
Do not connect these terminals to the 5V/GND of your Arduino board!
A power cable with lugs is also included so you can daisy chain the high-intensity power feeds as well. When using this method, ensure your power supply can deliver 5V at 2.8A for each DMD used – so for two DMDs, you will need 5A, etc. For testing (and our demonstration) purposes you can simply connect the DMD to your Arduino via the IDC cable, however the LEDs will not light at their full potential.
Using the display with your Arduino sketches is quite simple. There is an enthusiastic group of people working on the library which you will need, and you can download it from and follow the progress at the DMD Github page and forks. Furthermore, there is always the Freetronics forum for help, advice and conversation. Finally you will also need the TimerOne library – available from here.
However for now let’s run through the use of the DMD and get things moving. We will be using Arduino IDE v23. Starting with scrolling text – download the demonstration sketch from here. All the code in the sketch outside of void loop() is necessary. Replace the text within the quotes with what you would like to scroll across the display, and enter the number of characters (including spaces) in the next parameter. Finally, if you have more than one display change the 1 to your number of displays in #define DISPLAYS_ACROSS 1.
Here is a quick video of our example sketch:
Now for some more static display functions – starting with clearing the display. You can use
dmd.clearScreen( true );
to turn off all the pixels, or
dmd.clearScreen( false );
to turn on all the pixels.
Note: turning on more pixels at once increases the current draw. Always keep this in mind and measure with an ammeter if unsure.
Question – How many LEDs are contained in the Freetronics DMD?
Next some text. First you need to choose the font, at the time of writing there were two to choose from. Use
dmd.selectFont(System5x7);
for a smaller font or
dmd.selectFont(Arial_Black_16);
for a larger font. To position a single character on the DMD, use:
dmd.drawChar( x, y, 'x', GRAPHICS_NORMAL );
which will display the character ‘x’ at location x,y (in pixels – starting from zero). For example, using
dmd.drawChar( 10, 5, 'A', GRAPHICS_NORMAL );
results with:
Note if you have the pixels on ‘behind’ the character, the unused pixels in the character are not ‘transparent’. For example:
However if you change the last parameter to GRAPHICS_NOR, the unused pixels will become ‘transparent’. For example:
You can also use the parameter GRAPHICS_OR to overlay a character on the display. This is done with the blinking colon in the example sketch provided with the library.
Next, to draw a string (group of characters). This is simple, just select your font type and then use (for example):
dmd.drawString( 0,0, "Hello,", 5, GRAPHICS_NORMAL ); dmd.drawString( 2,9, "world,", 5, GRAPHICS_NORMAL );
Again, the 5 is a parameter for the length of the string to display. This results in the following:
Next up we look at the graphic commands. To control an individual pixel, use
dmd.writePixel( x,y, GRAPHICS_NORMAL,1); // turn on a pixel at location x,y
And changing the 1 to a 0 turns off the pixel. To draw a circle with the centre at x,y and a radius r, use
dmd.drawCircle( x, y, r, GRAPHICS_NORMAL );
To draw a line from x1, y2 to x2, y2, use:
dmd.drawLine( x1, y1, x2, y2, GRAPHICS_NORMAL );
To draw a rectangle from x1, y2 to x2, y, use:
dmd.drawBox(x1, y1, x2, y2, GRAPHICS_NORMAL );
And to draw a filled rectangle use:
dmd.drawFilledBox(x1, y1, x2, y2, GRAPHICS_NORMAL );
Now let’s put those functions to work. You can download the demonstration sketch from here, and watch the following results:
So there you have it, an inexpensive and easy to use display board with all sorts of applications. Although the demonstrations contained within this article were rather simple, you now have the knowledge to apply your imagination to the DMD and display what you like. For more information, support and conversation visit the Freetronics product page and support forum.
Disclaimer – The parts reviewed in this article are a promotional consideration made available by Freetronics.
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
January 2012 Competition
Hello Readers
It’s that time of the month again so we are running another competition. Our prize for this month consists of two items:
One v1.0 Akafugu Akafuino-X board as reviewed recently:

The winner’s Akafuino-X will have a companion on its journey which will be the Mayhew Labs “Go Between” Shield, as reviewed recently:

— *** How to Enter *** —
There will be four questions for you to answer spread across articles published between the 1st and 31st of January. So you will need to review older posts. At the end of January and once you have answers to all four questions, email the answers along with your full name, email address and postal address to competition at tronixstuff dot com with the subject heading January.
During the second week of February, all the correct entries will be collated and one randomly chosen. The first correct entry drawn will win the prize. Entries will be accepted until 03/02/2012 0005h GMT.
As with any other competition, there needs to be some rules:
- Incomplete entries will be rejected, so follow the instructions!
- The winners’ first name and country will be announced publicly;
- Entries that contain text not suitable for minors or insulting to the competition will be rejected (seriously – it happens);
- Prizes will be delivered via Australia Post domestic or regular international air mail. We take absolutely no responsibility for packages that go missing or do not arrive. If you live in an area with a “less than reliable” domestic postage system, you can pay for registered mail or other delivery service at your expense.
- Winners outside of Australia will be responsible for any taxes, fees or levies imposed by your local Governments (such as import levies, excise, VAT, etc.) upon importation of purchased goods;
- Prizes may take up to 45 days to be received;
- No disputes will be entered in to;
- Prizes carry no warranty nor guarantee – and are to be used or abused at entirely your own risk;
- Entries will be accepted until 03/02/2012 0005h GMT.
So have fun and keep an eye out for the four competition questions spread through the January posts… In the meanwhile, follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
Review: Mayhew Labs “Go Between” Arduino Shield
Hello readers
In this article we examine one of those products that are really simple yet can solve some really annoying problems. It is the “Go Between” Arduino shield from Mayhew Labs. What does the GBS do? You use it to solve a common problem that some prolific Arduino users can often face – how do I use two shields that require the same pins?
Using a clever matrix of solder pads, you can change the wiring between the analogue and digital pins. For example, here is the bare shield:
Now for an example problem. You have two shields that need access to digital pins 3, 4 and 5 as also analogue pins 4 and 5. We call one shield the “top shield” which will sit above the GBS, and the second shield the “bottom” shield which will sit between the Arduino and the GBS. To solve the problem we will redirect the top shield’s D3~5 to D6~8, and A4~5 to A0~1.
To redirect a pin (for example D3 to D6), we first locate the number along the “top digital pins” horizontal of the matrix (3). Then find the destination “bottom” pin row (6). Finally, bridge that pad on the matrix with solder. Our D3 to D6 conversion is shown with the green dot in the following:
Now for the rest, diverting D4 and D5 to D7 and D8 respectively, as well as analogue pins 4 and 5 to 0 and 1:
The next task is to connect the rest of the non-redirected pins. For example, D13 to D13. We do this by again bridging the matching pads:
Finally the sketch needs to be rewritten to understand that the top shield now uses D6~8 and A0~1. And we’re done!
Try not to use too much solder, as you could accidentally bridge more pads than necessary. And you can always use some solder wick to remove the solder and reuse the shield again (and again…). Now the genius of the shield becomes more apparent.
Question – How many digital I/O pins on an Arduino Mega2560?
The only downside to this shield is the PCB design – the days of square corners should be over now:
It is a small problem, but one nonetheless. Hopefully this is rectified in the next build run. Otherwise the “Go Between” Shield is a solution to a problem you may have one day, so perhaps keep one tucked away for “just in case”.
While we’re on the subject of Arduino shield pinouts, don’t forget to check out Jon Oxer’s shieldlist.org when researching your next Arduino shield – it is the largest and most comprehensive catalogue of submitted Arduino shields in existence.
[Note - the "Go Between" Shield was purchased by myself personally and reviewed without notifying the manufacturer or retailer]
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
Initial Review: Akafuino-X Microcontroller Board
Hello Readers
Time to get back to work for 2012 and in doing so we review another interesting product from a new company based in Japan – akafugu. From their website:
Akafugu Corporation is a small electronics company that operates out of Tokyo, Japan. We specialize in fun and easy to use electronic gadgets. Our goal is to provide products that not only make prototyping faster and easier, but are also perfect for incorporation in finalized products.
And with this in mind we examine the Akafuino-X microcontroller board:
The observant among you will notice the similarity to our usual Arduino Uno and compatible boards. However there are some differences which bring changes and improvements over the original Arduino design. The biggest point of difference is the microcontroller, the Akafuino uses an Atmel XMega32A4. The benefit of this over the normal ATmega328 is:
- Speed! 32 MHz – twice as fast as the ATmega328;
- Two-channel DAC (digital to analogue) converter – output analogue signals between 0V and Vcc straight from the board. A library is included with the new IDE to control them. The DAC uses digital pins seven and eight;
- Not one, two or even four, but five UARTs;
- Two I2C buses;
- Sixteen PWM pins – great for LED effects…
Thankfully the designers have detailed the extra I/O pins and other useful information on the rear of the board:
Other changes include:
- It’s a 3.3V board – so no 5V supply for you. However the inputs are tolerant to 5V;
- On-board real time clock. You can also add an optional 32.768 kHz crystal to increase accuracy – see the space on the board near the reset pin;
- A very refreshing red colour (note that ‘aka(i)’ ** is red in Japanese) and a happy puffer fish (‘fugu’) on the silk-screening
- And libraries for other Akafugu products such as the TWI Display module are available.
Getting started is easy, however due to the difference in hardware the Arduino IDE needs modification. But don’t panic – instead of modifying your existing v1.0 Arduino IDE – download and install the Akafuino-X version from here and run your usual and the Akauino-X IDE on the same machine (it’s ok to do this). You should also review the usage instructions here and note that this is a derivative of the v1.0 IDE. Furthermore at the time of writing the software side of things is still in beta, and can be monitored via Github - however don’t let this put you off, as the Akafuino-X has a lot of potential.
If you find any bugs in use the issue tracker in Github to let the team know.
Question – What does the acronym PWM mean?
In the meanwhile we’ve conducted a quick speed test – by running the same sketch on an Arduino Uno and also the Akafuino-X. The test is a whole lot of multiplication, nothing too scientific. At the end the duration of the exercise is shown in milliseconds. Here’s the code:
// Arduino Uno test
//
void setup()
{
Serial.begin(9600);
}
unsigned long a,b,c,d,e;
void loop()
{
a=millis();
for (c=1; c<1000000; c++)
{
d=sq(c);
}
b=millis();
e=b-a;
Serial.print("Duration: ");
Serial.print(e);
Serial.println("ms");
do {} while (1>0);
}
And here are the results of running the sketch four times on each board (click image to enlarge):
Our Akafuino-X beta only took 2704ms versus the Arduino Uno taking 4212ms. Very good so far.
Update! The team at akafugu have been experimenting with overclocking the Akafuino-X. And also check out the errata page.
So there you have it, another contender in the Arduino-compatible board stakes. Considering the extra I/O, PWM and bus connectivity the Akafuino-X is a very capable board. I look forward to the evolution of the IDE and will return with the Akafuino-X in an upcoming project. And we also have one to give away. So stay tuned! In the meanwhile the Akafuino-X and other goodies are available directly from akafugu.jp.
Disclaimer – The parts reviewed in this article are a promotional consideration made available by akafugu.
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
December 2011 Competition Results
Hello readers
Well December has well and truly passed on so it is time to announce the winners of our December 2011 competition. The lucky winner of the first prize, which consists of the eleven modules from the new Freetronics Module/Sensor range, as reviewed recently:
Is Stephanie F. from Melbourne, Australia. I hope you enjoy working with the new modules.
And the lucky winner of the second prize, the awesome and still the world’s best all-in-one Arduino Uno/ethernet/PoE/uSD card board solution – the Freetronics EtherTen:

Is Jaroslav F. from Slovakia. Your EtherTen will be on the way around the globe shortly. In the meanwhile thanks to everyone for taking the effort to enter our competition and having some fun. As always we had a few ineligible entries and a few rude ones. Why? I don’t know.
The questions and answers were:
Question: What does the acronym ASCII mean?
Answer: American Standard Code for Information Interchange
Question: What is the unit of measure for sound pressure level?
Answer: decibels (dB)
Question: What is an ultrasonic sound?
Answer: sound waves above the normal range of human hearing.
Question: Who played along side Mel Gibson in the Lethal Weapon movies?
Answer: Danny Glover
Question: which soviet leader allegedly banged his shoe in the United Nations?
Answer: Nikita Kruschev
Question: Who is the editor of “Silicon Chip” magazine?
Answer: Leo Simpson
And of course thanks to our sponsor Freetronics! Stay tuned for the January competition which will be announced shortly. In the meanwhile I’d better get back to work and write something…
So have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
Welcome to “Silicon Chip” Magazine readers
Hello readers
Published in the January 2012 issue of “Silicon Chip” magazine is an eight page feature article by Jonathan Oxer introducing the Arduino system and how the hardware and software work together to allow anyone to turn their technological ideas into reality. If you have read Jon’s article and were directed here – thanks for visiting! We have much more content than just Arduino tutorials, however to get started with them please click here or select from one of the chapters listed in the “Arduino Tutorials” section on the right-hand side of this web page. Our site is a work in progress and if you have any feedback or questions please email john at tronixstuff dot com, or visit our moderated Google Group.
Be sure to take advantage of the discount code on page seventeen made available by Little Bird Electronics - Australia’s largest Arduino and related electronics distributor; and also check out the range of Arduino-compatible equipment at Freetronics.
For those not familiar with the magazine, here is the cover for the January 2012 issue:
So what is “Silicon Chip” magazine all about? It is Australia’s window to the wide world of electronics, backed by a team of engineers and enthusiasts with decades of experience and knowledge. Each month you can read about in-house projects by the team and also submitted by readers – covering basic circuits right through to digital and computer systems, quality hi-fi and audio projects, news, reviews, readers’ letters, the humorous columns and a wide variety of kits to assemble. There is also a wide range of advertising from related businesses that helps you find new products and suppliers that you may not have known about.
Silicon Chip is the only Australian electronics magazine and one of the few left in the world with a broad appeal to the beginner and expert alike, and the projects described are always good value and not priced or designed out of most peoples’ reach. I unashamedly recommend you pick up a copy from the newsagent or take out a subscription if possible, it’s a great read and there’s always lots to learn and laugh about.
Finally, that’s it for 2011. A big thank you to all of our readers for your visits, feedback, compliments, criticism, donations, and the crazy emails received through the year. And of course to all the great suppliers who help out with promotional considerations and sponsor our monthly competitions. Keeping this site together has been interesting, educational and a whole lot of fun, and I hope you think so too. There is a lot coming up for 2012 – so stay tuned via twitter, Google+, or subscribe by email or RSS on the right-hand side of this page.
Have fun and Happy New Year
John Boxall.
Clock Kit Round-up – December 2011
Hello Readers
If there’s one thing that I really like it’s a good clock kit. Once constructed, they can be many things, including:
- a point of differentiation from other items in the room;
- a reminder of the past (nixie tubes!) or possible visions of the future;
- the base of something to really annoy other people;
- a constant reminder to get back to work;
- a source of satisfaction from having made something yourself!
So just for fun I have attempted to find and list as many interesting and ‘out of the ordinary’ kits as possible, and ignored the simple or relatively mundane kits out there. If you are in the clock kit business and want a mention, let me know. So in no particular order, we have:
adafruit industries “ice tube” clock
Based around a vintage Soviet-era vacuum IV-18 type fluorescent display, the ice tube clock is a rare kit that includes a nice enclosure which keeps you safe from the high voltages as well as allowing the curious to observe your soldering skills. I reviewed this kit almost a year ago and the clock is still working perfectly. Here is a video of the ice tube clock in action:
After some travelling meeting various people it seems that quite a few of us have an ice tube clock. There is something quite mesmerising about the display, perhaps helping to recall memories of our youth in the 1970s and 80s.
nootropic design Defusable Clock Kit
As recently reviewed, this kit allows you to build a simulated ‘countdown’ timer for a hypothetical explosive device that also doubles as a clock with an alarm. For example:
Whatever you do, don’t make a ‘fake bomb’ and leave it out in public! Only bad things could happen
ogilumen nixie tube kits
Not a clock kit as such, however they have made doing it yourself very easy with their power supply and IN-12A nixie board kits. We made one ourselves in a previous review, as shown below:
Alan Parekh’s Multimeter Clock Kit
This is certainly one from left field – using the analogue multimeters to display hours, minutes and seconds. See Alan describe his kit in this video:
Certainly something different and would look great on the wall of any electronics-themed area or would easily annoy those who dislike the status-quo of clock design.
akafugu VFD Modular Clock
The team at akafugu have created a modular baseboard/shield kit which holds a shield containing four IV-17 alphanumeric nixie tubes to create your own clock or display system:

Unlike some of the other nixie tube kits the firmware has been made public and can be modified at will. In the future different display shields will be available to extend the use of the kit.
tubeclock.com kits
This site has two kits available, one using either four or six Soviet-era IN-12 type nixie tubes:

… and another kit using the Soviet-era IN-14 nixie tubes:

You have to hand it to the former Soviet Union – they knew how to over-produce nixie tubes. One rare example where we can benefit from a command economy!
evil mad science clocks
The certainly not evil people have two clock kits, the first being the Bulbdial Clock Kit:

This uses a unique ring of LEDs around the circumference of the clock face to create shadows to mark the time. It is also available in a range of housing and face styles. Their other kit of interest is the Alpha Clock Five:

The photo of this clock doesn’t do it justice – the alphanumeric displays are 2.3″ tall, making this one huge clock. It also makes use of a Chronodot real-time clock board, which contains a temperature-controlled oscillator which helps give it an accuracy of +-/ 2 minutes per year. Furthermore you can modify this easily using an FTDI cable and the Arduino IDE with some extra software. Would be great for model railways (or even a real railway station) or those insanely conscious about the time.
Kabtronics Clock Kits
This organisation has several clock kits which span a range of technology from the later part of the twentieth century. These guys can only be true clock enthusiasts! Starting with the 1950s, they have their Nixie-Transistor Clock:

Look – no integrated circuits, leaving the kit true to the era. If you need to hide from someone for a weekend, building this would be a good start. Next we move onto the 1960s and the Transistor Clock:
The 1960s brought with it LEDs so they are now used in this kit, however the logic is still all analogue electronics. However next we can move to the 1970s, and finally save some board space with the TTL Clock:
This would still be fun to assemble but somewhat less punishing for those who don’t enjoy solder fumes that much. However you still have a nice kit and something to be proud of. Finally, the last in the line is the 1980s-themed Surface-Mount Technology Clock:
So here we have a microcontroller, SMT components, and a typical reduction in board size. Their range is an excellent way of demonstrating the advances in technology over the years.
Wow – this clock makes use of huge Burroughs B7971 15-segment nixie tube displays and a GPS receiver to make a huge, old-style/new-tech clock. Check out the demonstration video:
This thing is amazing. And it is actually cheaper to buy a fully-assembled version (huh). The same organisation also offers another GPS-controlled clock using IN-18 nixie tubes:

Again, it isn’t inexpensive – however the true nixie tube enthusiasts will love it. This clock would look great next to a post-modern vintage hifi tube amplifier. Moving forward to something completely different now, we have the:
adafruit industries monochron®
Almost the polar opposite of the nixie-tube clocks, the monochron uses an ATmega328 microcontroller and a 128 x 64 LCD module to create some interesting clock effects. For example:
Many people have created a variety of displays, including space invaders and the pong game simulation. The clock also includes the laser-cut acrylic housing which provides a useful and solid base for the clock.
Spikenzie Labs Solder : Time™ watch kit
Technically this is a watch kit, however I don’t think that many people would want to walk around wearing one – but it could be used in more permanent or fixed locations. Correct me if I’m wrong people. However in its defence it is a very well designed kit that is easy to solder and produces a nice clock:

It uses a separate real-time controller IC to stay accurate, and the design However this would be a great suggestion as a gift for a younger person to help them become interesting in electronics and other related topics. The asm firmware is also available for you to modify using Microchip MPLAB software if that takes your fancy.
Velleman Kits
The Velleman company has a range of somewhat uninspiring clock kits, starting with the Scrolling/Rolling LED Clock:

… the 2¼” 7-Segment Digital Clock:

This clock includes the housing and also accepts an optional temperature sensor, and therefore can display this as well. There is also the aptly-named – Digital LED Clock:

It tells the time and would be useful in a 1980s-era idea of the future movie set. The final velleman clock kit is the Jumbo Single-Digit Clock:

In all fairness this one looks quite interesting – the LED display is 57mm tall and the time is display one digit at a time. It is powered by a PIC16F630 however the firmware is proprietary to velleman.
Nocrotec Nixie Clocks
This company has a range of kits using nixie tubes and numitrons (low voltage incadescent displays in tubes). One particularly lovely kit is their IN-8 Blue Dream kit:

The blue glow at the base of the nixie tubes is due to an LED mounted at the bottom of the tube. Another aesthetically-pleasing kit is their Little Blue Something nixie clock. Check out their demonstration video:
More IN-12 nixie clocks from Germany, the first being the Manuela_HR. You can buy the kit without an enclosure, or choose from the ‘office’ style:

… or this funky number:

You can specify it with RGB LEDs which colour-cycle to provide the effect shown above. For those not too keen you can also buy the kits pre-assembled. Their other kit is the Sven:

It is available with IN-8 or IN-14 nixie tubes. The design quality of the enclosure is outstanding, a lot of effort has been made to produce a complete kit that “won’t look like a kit” when completed.
This is a small binary clock kit that fits in an Altoids tin:

This is a nice little kit as it is inexpensive, easy to make and very well documented. You could also mount this in a variety of flat surfaces, limited only by your imagination.
The Chronulator
Here we find a unique design that uses analogue panel meters in a similar method to the multimeter clock detailed previously. Here is an example of the completed kit:

The kit contains the electronics and meters (or you can delete the meters for a discount if you already have some) however the housing is up to you. Furthermore, this kit has some of the best instructions (.pdf) I have ever seen. They are a credit to the organisation. Our final clock kit is the …
This is another clock kit in the style of ‘suspicious bomb timer’-looking – and it pulls this off quite well. Consider the following video demonstration:
As well as a normal clock it can function as an alarm, stopwatch, countdown timer and lap counter. The instructions (.pdf) are well written and easy to follow. Furthermore the Denkimono is also well priced for the kit and delivery.
Hopefully this catalogue of clock kits was of interest to you. If you have found some other kits to add to the list, or wish to disagree or generally comment about this article please do so via the comment section below. This article was not sponsored in any way.
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
Review – nootropic design defusable clock kit
Hello Readers
In this review we examine an interesting, fun and possibly a prankster’s delight – the “Defusable Clock Kit” from nootropic design. The purpose of this kit is to construct a clock that counts down in a similar method to “movie-style” bombs, and it has terminals to connect four wires to the board. When the countdown timer is beeping away, you need to choose which wire to cut otherwise the “bomb” (alarm) goes off.
Furthermore, it also functions as a normal clock with an alarm, so you can use it daily normal activities. And finally it is based on the Arduino system which allows the kit to be reprogrammed at a later date. Now let’s move forward by examining kit construction.
Packaging
The kit arrives in a re-sealable antistatic pouch that can be reused without any effort:
Assembly
Detailed instructions can be found on the product website. The kit has a very clear and well-detailed silk screen on the PCB:
All the parts required are included, as well as an IC socket for the microcontroller:
Moving forward, the first parts to solder in are the resistors:
… then to the other lower-profile components:
… and the rest:
Which leaves us with the final product:
The clock is designed around simple Arduino-compatible circuitry, so if you wish to alter the firware for the clock or upload your own sketch, you will need to fit the six-way header pins (in order to connect a USB-FTDI cable). As the pins are horizontal and tend to fall over, it’s easier to solder the first pin from the top of the PCB to hold it in place:
… then turn the PCB over and solder the rest.
Operation
Power is supplied via the DC socket on the PCB, and converted to 5V with a typical 7805 regulator. Therefore your input voltage can range between normal levels of 9~12VDC. Once the power is connected you can set the time for the clock and alarm for normal use. However if you feel like some sweat-inducing excitement, connect four wires each between the terminal blocks at the top of the PCB. Then press the red button to start the ten-second countdown. You can also increase or decrease the countdown time.
Your chances of defusing it in time can be quite low – by cutting one wire you can defuse it, by cutting two other wires nothing will happen and the clock keeps ticking – and by cutting the final wire… well, it’s all over. The wires are randomly chosen each time so you can’t predict which will be the correct wire. (Unless you change the firmware). Now let’s see the clock in action:
At this juncture it would be appropriate to warn the users of this kit not to … well, misuse the clock. To be honest I’m surprised such a kit originated from the US in the first place, but then again it never hurts to have a sense of humour. But seriously, to the untrained eye or casual security guard – this kit will look pretty damn real. So no making any mock explosive models with Play-Doh or metal cylinders and leaving them on the train or bus or under someone’s toilet seat. Then again, that would be good for a laugh – so please keep it at home, not in the railway station.
Further expansion
As mentioned earlier this kit is Arduino (Duemilanove) compatible, you can upload new sketches using a 5V FTDI cable or swapping the microcontroller over in another Arduino-style board. You have four LEDs, a 4-digit 7-segment LED module, a buzzer, and four digital I/O pins via the terminal block on the top-right of the PCB which could control external devices. Furthermore you can download and examine the clock sketch to modify or deconstruct it to determine the operation.
Conclusion
Apart from the laughs and possible mayhem you could cause with this, the kit is easy to assemble and works as described. It would make a great present to get someone interested in electronics, or help them with soldering practice. Furthermore it is certainly unique, and would be fun at parties and other events.
This kit and many other electronic goodies are available from Little Bird Electronics. High-resolution images available on flickr.
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
Review – Akafugu TWI 7-Segment Display
Hello Readers
Today we review a product from a new company based in Japan – akafugu. From their website:
Akafugu Corporation is a small electronics company that operates out of Tokyo, Japan. We specialize in fun and easy to use electronic gadgets. Our goal is to provide products that not only make prototyping faster and easier, but are also perfect for incorporation in finalized products.
And with this in mind we examine their TWI 7-segment display board. It consists of a four digit, seven-segment LED module driven by an Atmel ATtiny microcontroller – and has an I2C (or called TWI for “two-wire interface”) interface. By using I2C you only need power, GND, SDA and CLK lines – which saves on I/O and physical space.
Packaging
The display arrives appropriately packaged in reusable bags, and the main board is sealed in an anti-static pouch:
Assembly
The display board arrives partly-assembled. The MCU is presoldered to the board, so all we need to solder are the external connections on each side of the board, and the LED module. It is quite small and of an excellent quality:
The reason for having the power and data lines on both side is that you can then daisy-chain the displays. Speaking of which, the review unit arrived with a common-anode white LED module (data sheet.pdf) – however you can also order it in red or blue. Although they are not included, I soldered in a line of socket pins to allow for changing the LED module later on:
The final product is neat and compact, the view from the rear:
Note the ISP header pin sockets which allow low-level programming of the ATtiny4313 MCU. And the front:
akafugu also sell an optional housing stand, manufactured from transparent acrylic, which turns the display module into a nice little desk stand model:
Using the display module
Now to put the display to use. As it is controlled via I2C/TWI a variety of microcontroller platforms will be able to use the display. For our examples we will be using an Arduino-compatible board. Before moving forward you need to download and install the Arduino library which is available (as well as an avr-gcc library) on Github. Note that the example sketches in the Arduino library are for IDE v1.0.
As the module uses its own microcontroller, you can change the I2C bus address with a simple sketch (which is provided with the library). This is a great idea, which removes any chance of clashing with other bus devices, and allows more modules to be on the same bus. The default address is 0X12h.
When using the module, the following lines need to be in your sketch:
#include "Wire.h" #include "TWIDisplay.h" #define SLAVE_ADDR 0x12 TWIDisplay disp(SLAVE_ADDR);
void setup()
{
Wire.begin();
disp.setRotateMode();
disp.clear();
disp.setBrightness(255);
}
You can change the brightness mid-sketch using disp.setBrightness() with a parameter between zero and 255. To display an integer, use:
disp.writeInt(8888); // displays '8888'
To turn on or off the decimal points, use:
disp.setDot(x,boolean); // where x is the digit (0~3 from left to right) and boolean is true for on, false for off
To clear the display, use:
disp.clear();
You can even display strings of text. Not every character can be displayed, however most can and the effect of scrolling looks good. For some example code:
char message[] = "This is a long message ";
for (int i = 0; i < strlen(message); i++) {
disp.print(message[i]);
delay(250);
Now to put the display to work! Using this IDE v1.0 demonstration sketch (download), we have created the following display:
For the curious, the current drawn with all segments on at full brightness is just over 33 milliamps:
Conclusion
When you need to display some numerical or other fitting data with a greater clarity than an LCD, or just love LEDs then you could do very well with this display. The designers have made a quality board and backed it up with documentation and (unlike many much larger, more prominent companies) a mature library to ensure it works first time. Furthermore the use of the I2C/TWI bus removes the problem of wasting digital output pins on your MCU – and the ability to change the bus address is perfect. So give akafugu a go and you will not be disappointed. The display and other goodies are available directly from akafugu.jp.
Disclaimer – The parts reviewed in this article are a promotional consideration made available by akafugu.
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
Project – Ultrasonic Combination Switch
Hello Readers
Time for a follow-up to the Single Button Combination Lock by creating another oddball type of switch/lock. To activate this switch we make use of a Parallax Ping))) Ultrasonic sensor, an Arduino-style board and some other hardware – to make a device that receives a four-number code which is made up of the distance between a hand and the sensor. If Arduino and ultrasonic sensors are new to you, please read this tutorial before moving on.
The required hardware for this project is minimal and shown below – a Freetronics Arduino-compatible board, the Ping))) sensor, and for display purposes we have an I2C-interface LCD module:
The combination for our ‘lock’ will consist of four integers. Each integer is the distance measured between the sensor and the user’s hand (etc.). For example, a combination may be 20, 15, 20, 15. So for the switch to be activated the user must place their hand 20cm away, then 15, then 20, then 15cm away. Our switch will have a delay between each measurement which can be modified in the sketch.
To keep things simple the overlord of the switch must insert the PIN into the switch sketch. Therefore we need a way to take measurements to generate a PIN. We do this with the following sketch, it simply displays the distance on the LCD (download sketch):
// Ultrasonic combination lock - distance display // John Boxall - December 2011 // tronixstuff.wordpress.com/projects | CC by-sa-nc
#include "Wire.h" #include "LiquidCrystal_I2C.h" // for I2C bus LCD module http://bit.ly/eNf7jM LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
int signal=8;
void setup()
{
pinMode(signal, OUTPUT);
lcd.init(); // initialize the lcd
lcd.backlight(); // turn on LCD backlight
}
int getDistance()
// returns distance from Ping))) sensor in cm
{
int distance;
unsigned long pulseduration=0;
// get the raw measurement data from Ping)))
// set pin as output so we can send a pulse
pinMode(signal, OUTPUT);
// set output to LOW
digitalWrite(signal, LOW);
delayMicroseconds(5);
// now send the 5uS pulse out to activate Ping)))
digitalWrite(signal, HIGH);
delayMicroseconds(5);
digitalWrite(signal, LOW);
// now we need to change the digital pin
// to input to read the incoming pulse
pinMode(signal, INPUT);
// finally, measure the length of the incoming pulse
pulseduration=pulseIn(signal, HIGH);
// divide the pulse length by half
pulseduration=pulseduration/2;
// now convert to centimetres. We're metric here people...
distance = int(pulseduration/29);
return distance;
}
void loop()
{
lcd.print(getDistance());
lcd.println(" cm ");
delay(500);
lcd.clear();
}
And here is a demonstration of the sketch in action:
Now for the switch itself. For our example the process of “unlocking” will be started by the user placing their hand at a distance of 10cm or less in front of the sensor. Doing so will trigger the function checkPIN(), where the display prompts the user for four “numbers” which are returned by placing their hand a certain distance away from the sensor four times, with a delay between each reading which is set by the variable adel. The values of the user’s distances are stored in the array attempt[4].
Once the four readings have been taken, they are compared against the values in the array PIN[]. Some tolerance has been built into the checking process, where the value entered can vary +/- a certain distance. This tolerance distance is stored in the variable t in this function. Each of the user’s entries are compared and the tolerance taken into account. If each entry is successful, one is added to the variable accept. If all entries are correct, accept will equal four – at which point the sketch will either “unlock” or display “*** DENIED ***” on the LCD.
Again, this is an example and you can modify the display or checking procedure yourself. Moving forward, here is our lock sketch (download):
// Ultrasonic combination lock // John Boxall - December 2011 // tronixstuff.wordpress.com/projects | CC by-sa-nc
int pin[]={
20, 15, 20, 25}; // this is the "PIN" distances in cm
#include "Wire.h" #include "LiquidCrystal_I2C.h" // for I2C bus LCD module http://bit.ly/eNf7jM LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
int signal=8; // digital pin for Ping))) signal
void setup()
{
pinMode(signal, OUTPUT);
lcd.init(); // initialize the lcd
lcd.backlight(); // turn on LCD backlight
Serial.begin(9600); // for debug
}
int getDistance()
// returns distance from Ping))) sensor in cm
{
int distance;
unsigned long pulseduration=0;
// get the raw measurement data from Ping)))
// set pin as output so we can send a pulse
pinMode(signal, OUTPUT);
// set output to LOW
digitalWrite(signal, LOW);
delayMicroseconds(5);
// now send the 5uS pulse out to activate Ping)))
digitalWrite(signal, HIGH);
delayMicroseconds(5);
digitalWrite(signal, LOW);
// now we need to change the digital pin
// to input to read the incoming pulse
pinMode(signal, INPUT);
// finally, measure the length of the incoming pulse
pulseduration=pulseIn(signal, HIGH);
// divide the pulse length by half
pulseduration=pulseduration/2;
// now convert to centimetres. We're metric here people...
distance = int(pulseduration/29);
return distance;
}
void checkPIN()
{
int attempt[4]; // stores user's attempt values
int accept=0; // used for checking resulting user entry
int t=5; // +/- tolerance
int adel=1500; // delay between movement attempts
lcd.setCursor(0,0);
lcd.print("Get ready... ");
delay(adel); // delay before first distance measurement
lcd.setCursor(0,0);
lcd.print(" Position One ");
lcd.setCursor(0,1);
lcd.print(">>>>____________");
attempt[0]=getDistance();
delay(adel);
lcd.setCursor(0,0);
lcd.print(" Position Two ");
lcd.setCursor(0,1);
lcd.print(">>>>>>>>________");
attempt[1]=getDistance();
delay(adel);
lcd.setCursor(0,0);
lcd.print("Position Three ");
lcd.setCursor(0,1);
lcd.print(">>>>>>>>>>>>____");
attempt[2]=getDistance();
delay(adel);
lcd.setCursor(0,0);
lcd.print(" Position Four ");
lcd.setCursor(0,1);
lcd.print(">>>>>>>>>>>>>>>>");
attempt[3]=getDistance();
delay(adel);
lcd.clear();
lcd.print("Checking ... "); // for visual effect more than anything
delay(2000);
lcd.clear();
// display user entry on serial monitor for debugging
for (int z=0; z<4; z++)
{
Serial.println(attempt[z]);
}
Serial.println("------");
delay(2000);
// now compare against preset values
// allow a +/- tolerance (tolerance in integer 't')
if (attempt[0]>=(pin[0]-t) && attempt[0]<=(pin[0]+t)) { accept++; }
if (attempt[1]>=(pin[0]-t) && attempt[1]<=(pin[0]+t)) { accept++; }
if (attempt[2]>=(pin[0]-t) && attempt[2]<=(pin[0]+t)) { accept++; }
if (attempt[3]>=(pin[0]-t) && attempt[3]<=(pin[0]+t)) { accept++; }
if (accept==4)
{
// correct entry
lcd.setCursor(0,0);
lcd.print(" ** Accepted ** ");
// here you would enter code to run when the switch was successfully activated
delay(2000);
}
else if (accept!=4)
{
// incorrect entry
lcd.setCursor(0,0);
lcd.print(" *** DENIED *** ");
// here you would enter code to run when the switch was unsuccessfully activated
delay(2000);
}
}
void loop()
{
if (getDistance()<10)
{
lcd.clear();
checkPIN();
}
lcd.setCursor(0,0);
lcd.print(" ** Ready ** ");
}
To finish the switch, a housing of some sort is required. adafruit industries sell a housing which has mounts for an Arduino-form board and 16×2 LCD which is convenient, so we use it for the finished example as shown below:
And for the final demonstration of the switch in action. Note that the delays between actions have been added for visual effect – you can always change them to suit yourself:
So there you have it – the base example for a different type of combination switch. I hope someone out there found this interesting or slightly useful ![]()
Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.











































