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. 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
In this project you learn how to make an ultrasonic distance-sensing combination switch.
Updated 18/03/2013
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):
// 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 similar to the unit shown below can be found, for example:
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.
In the meanwhile 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? And join our friendly 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 – Arduino v1.0 IDE
Hello Readers
Recently the Arduino team have released version 1.0 of the IDE (integrated development environment) that we all know and love. This is a significant milestone as the IDE has previously been in alpha release since 2005. For the platform to have survived and thrived this long is a credit to the community and especially to the Arduino team themselves.
Arduino? Not sure where to start? There’s a couple of tutorials right here!
Moving forward, let’s have a look and see what has changed:
Installation is quite simple. As always, download the IDE from the Arduino website. Before installing the new version, copy and backup your sketchbook folder and the entire folder system of your current IDE installation. This shouldn’t take long as … I’m sure everyone does this on a regular basis. The move to v1.0 is a major one, and you will still need to use the older IDE – so don’t delete it from your computer.
Once installed, copy over the contents of your ../arduino-002x/libraries folder to the new ../arduino-1.0/libraries folder. When your operating systems pauses and asks what to do with duplicate folders, click “skip”. That is, don’t overwrite the new libraries with old ones.
Now run the new IDE, and you will be presented with the following (note we have already loaded the “blink” example):

The cosmetic changes in the design of the tool bar are slight yet refreshing. The buttons in order are: verify (we used to call this “compile”), upload sketch, file new, file open, file save and the serial monitor button has been moved across to the far right.
At the very bottom-right of the IDE window the board type and port connection is displayed – which is great if you are working with more than one Arduino board at once – a nifty feature. Furthermore when verifying and uploading a sketch, a progress bar appears at the top right of the message window, for example:
The last cosmetic change that became apparent is the automatic creating of hyperlinks in the sketch when the IDE detects a correctly-formatted URL, for example:
Cosmetic changes are all well and good, however that is only the tip of the iceberg. For starters, the file extension for sketches compatible with v1.0 is now .ino.
The next thing is to review the update release notes, also listed below with my own notes – where a lot of surprises can be found. As listed below, several functions and libraries have changed in behaviour or existence. Therefore some work may be required to convert sketches from v23 IDE to v1.0. At the current time I can’t see any reason to do this, and if you have any projects relying on existing libraries – make a backup copy of your existing environment in case the original source of the library disappears. The Arduino team have mentioned the idea of a centralised repository for libraries, however this has not been finalised at the time of writing this article.
[core / libraries] * Serial transmission is now asynchronous - that is, calls to Serial.print(), etc. add data to an outgoing buffer which is transmitted in the background. Also, the Serial.flush() command has been repurposed to wait for outgoing data to be transmitted, rather than dropping received incoming data. * The behavior of Serial.print() on a byte has been changed to align it with the other numeric data types. In particular, it will now print the digits of its argument as separate ASCII digits (e.g. '1', '2', '3') rather than a single byte. The BYTE keyword has been removed. To send a single byte of data, use Serial.write() (which is present in Arduino 0022 as well).
The new Serial.print() behaviour is interesting. Let’s compare the output of the following sketch:
void setup()
{
Serial.begin(9600);
}
byte a=0;
void loop()
{
for (a=38; a<48; a++)
{
Serial.print(a);
Serial.print(" ");
}
do {} while (1>0);
}
Using IDE v23, the output from the serial monitor is:
However when we run the same sketch in IDE v1.0, the output is:
So if you need the actual ASCII characters represented by the BYTE variable, use Serial.write() not Serial.print().
* The Serial class (as well as other classes inheriting from Stream, like EthernetClient, SoftwareSerial, Wire and more) now contains functions for parsing incoming data, based on the TextFinder library by Michael Margolis. They include find() and findUntil() to search for data, parseInt() and parseFloat() for converting incoming characters into numeric values, and readBytes() and readBytesUntil() for reading multiple bytes into a buffer. They use a timeout that can be set with the new setTimeout().
Well this is interesting. The ability to parse incoming serial data will make using that nefarious GSM shield easier…
* The SoftwareSerial class has been reimplemented, using the code originally written for the NewSoftSerial library by Mikal Hart. This allows for multiple simultaneous instances, although only one can receive at a time.
One less library to worry about…
* Support has been added for printing strings stored in flash (program
memory) rather than RAM. Wrap double-quoted strings in F() to indicate
that they should be stored in flash, e.g. Serial.print(F("hello world")).
This should help us use memory more efficiently…
* The String class has been reimplemented as well, by Paul Stoffregen. This new version is more memory-efficient and robust. Some functions which previously returned new string instances (e.g. trim() and toUpperCase()) have been changed to instead modify strings in place. * Support for DHCP and DNS has been added to the Ethernet library, thanks to integration by Adrian McEwen. Most classes in the Ethernet library have been renamed to add a "Ethernet" prefix and avoid conflicts with other networking libraries. In particular, "Client" is now "EthernetClient", "Server" is "EthernetServer", and "UDP" is "EthernetUDP". A new IPAddress class makes it easier to manipulate those values.
Frankly I’m not a genius when it comes to the Internet area, however clearer naming is a plus
* The UDP API has been changed to be more similar to other libraries. Outgoing packets are now constructed using calls to the standard write(), print(), and println() functions – bracketed by beginPacket() and endPacket(). The parsePacket() function checks for and parses an incoming packet, which can then be read using available(), read(), and peek(). The remoteIP() and remotePort() functions provide information about the packet’s origin. (Again, thanks to Adrian McEwen for the implementation.) * The Wire library has also been modified to use the standard read() and write() functions instead of send() and receive(). You can also use print() and println() for outgoing data.
Looks like another mental note to make when working with I2C and v1.0
* The SD library now supports multiple simultaneous open files. It also provides the isDirectory(), openNextFile(), and rewindDirectory() functions for iterating through all the files in a directory. (Thanks to Limor Fried.)
Well this is a win, now multiple forms of data can be logged into separate files.
As mentioned at the start, this is an initial review and by all means not complete. Feel free to leave your comments or notes for others to review as well, and as always if you find any errors please let us know.
For now the new IDE is an interesting juncture in the Arduino evolution. For new sketches and development in general there wouldn’t be any reason not to use it, as you can happily run several versions of the IDE on a single computer. However – there is a lot of published material that will not work with the new IDE – and all this will need to be updated, or at least noted by the authors concerned telling people to use an older IDE. And for this I am not too happy – the Arduino world has had a virtual “axe” chopped through it, breaking a lot of things which will take some time to move forward from.
So in the meanwhile, backup your existing libraries, your older IDE software, and be prepared to run two IDE systems in parallel for the near future.
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
Hello Readers
The competition for December 2011 has now closed, and the winners will be announced shortly. Thank you to all those who entered, and stay tuned for the January competition!
It’s that time of the year again so we are running another competition. First let’s look at the prizes, then review the rules of entry.
— *** Prize One *** —
Prize One consists of the eleven modules from the new Freetronics Module/Sensor range, as reviewed recently:
With this range of modules you will be able to sense temperature, humidity, magnetic fields, light and sound pressure levels, sound and shock. Plus light up with the RGB LED, get more I/O with the expansion module, interface with the level shifter board, control high currents with the N-MOSFET, and power the lot with the tiny switch mode power supply. Available from Freetronics or a reseller near you.
— *** Prize Two*** —
Prize Two consists of one Freetronics EtherTen:

This is the mother of all Arduino-compatible boards. Designed in Australia and manufactured to the highest quality standards the EtherTen replaces three boards – consider having an Arduino Uno SMD, Ethernet shield with PoE, and a microSD shield – all on the one board. From the Freetronics website:
The EtherTen is a 100% Arduino compatible board that can talk to the world. Do Twitter updates automatically, serve web pages, connect to web services, display sensor data online, and control devices using a web browser. The Freetronics EtherTen uses the same ATmega328P as the Duemilanove and the same Wiznet W5100 chip used by the official Arduino Ethernet Shield, so it’s 100% compatible with the Ethernet library and sketches. Any project you would previously have built with an Arduino and an Ethernet shield stacked together, you can now do all in a single, integrated board.
We’ve even added a micro SD card slot so you can store web content on the card, or log data to it.
All the good things about the Eleven and the Ethernet Shield have been combined into this one device so please see those pages for all the specific details, but the highlights include:
- Gold-plated PCB.
- Top and bottom parts overlays.
- Top-spec ATmega328P MCU.
- Mini-USB connector: no more shorts against shields!
- D13 pin isolated with a MOSFET so you can use it as an input.
- Power-over-Ethernet support, both cheapie DIY or full 802.3af standards-compliant.
- Ethernet activity indicators on the PCB and the jack.
- 10/100base-T auto-selection.
- Fully compatible with standard Ethernet library.
- Reset management chip.
- Fixed SPI behavior on Ethernet chipset.
- Robust power filtering.
- Sexy rounded corners.
Note that just like our Ethernet Shield with PoE support, the EtherTen provides a number of options for different Power over Ethernet. You can use the supplied jumpers and feed 7-12Vdc down the wire for cheap DIY version, or you can fit our PoE Regulator 24V and feed a bit more voltage down the wire, or you can use our PoE Regulator 802.3AF along with a proper commercial PoE injector or switch. It’s up to you. Available from Freetronics or a reseller near you.
— *** How to Enter *** —
There will be six questions for you to answer spread across articles published in December. At the end of December and once you have answers to all six, email the answers along with your full name, email address and postal address to competition at tronixstuff dot com with the subject heading December. During the second week of January, all the correct entries will be collated and two randomly chosen. The first correct entry drawn will receive prize one, the second correct entry drawn receives prize two. Entries will be accepted until 05/01/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’ entry, 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;
- If you have met John Boxall in person, or you have won a previous tronixstuff.com competition you cannot enter;
- 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 05/01/2012 0005h GMT.
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.
Review – Freetronics Module Family
Hello
In this article we examine a new range of eleven electronic modules from Freetronics. When experimenting with electronics or working on a prototype of a design, the use of electronic components in module form can make construction easier, and also reduce the time between thoughts and actually making something
So let’s have a look at each module in more detail…
This is a tiny switchmode voltage regulator with two uses – the first being regulation of higher voltage up to 28V carried via an Ethernet cable to a Freetronics Ethernet shield or EtherTen to power the board itself. The PCB is designed to drop into the shield or EtherTen as such:
… and converts the incoming voltage down to 7V which can be regulated by the EtherTen’s inbuilt regulator. The second use of this board is a very handy power supply for breadboarding or other experimentation. By bridging the solder pads on the rear of the board, the output is set to 5V DC, as such:
Note the addition of the header pins, which make insertion into a breadboard very easy – so now you have a 5V 1A DC power supply. For more information visit the product page.
This module contains an On Semi NTD5867NL MOSFET which allows the switching of a high current and voltage line – 60V at up to 20A – with a simple Arduino or other MCU digital output pin. The package is small and also contains enlarged holes for direct connection of high-current capability wire:
The onboard circuitry includes a pull-down resistor to ensure the MOSFET is off by default. For more information see the product page.
This is a very simple and inexpensive method to interface 3.3V sensors to 5V microcontrollers in either direction.The module contains four independent channels, as shown in the image below:
However you can interface any low or higher voltage, as long as you connect the low and high voltages to the correct sides (marked on the PCB’s silk screen). For more information please visit the product page.
Surprisingly this module contains a RGB LED module (red, green and blue LEDs) which is controlled by a WS2801 constant-current LED driver IC. This module is only uses two digital output pins, and can be daisy-chained to control many modules with the same two pins. The connections are shown clearly on the module:
The WS2801 controller IC is on the rear:
There are several ways to control the LEDs. One way is using the sketch from the product home page, which results with the following demonstration output:
Or there is a unique Arduino WS2801 library available for download from here. Using the strandtest example included with the library results with the following:
During operation the module used less than 24 mA of current and therefore can happily run from a standard Arduino-type board without any issues. For more information please visit the product page.
TEMP Temperature Sensor Module
This module allows the simple measurement of temperature using the popular DS18B20 temperature sensor. You can measure temperatures between -55° and 125°C with an accuracy of +/- 0.5°C. Furthermore as the sensor uses the 1-wire bus, you can daisy-chain more than one sensor for multiple readings in the one application. The board is simple to use, and also contains a power-on LED:
Using the demonstation Arduino sketch from the product page results in the following output via the serial monitor:
Using this module is preferable to the popular Analog Devices TMP36, as it has an analogue output which can be interfered with, and requires an analogue input pin for each sensor, whereas this module has a digital output and as mentioned previously can be daisy-chained. For more information please visit the product page.
Humidity and Temperature Sensor Module
For the weather-measuring folk here is a module with temperatures and humidity. Using the popular DHT22 sensor module the temperature range is -4°C to +125°C with an accuracy of +/- 0.5°C, and humidity with an accuracy of between two and five percent. Only one digital input pin is required, and the board is clearly labelled:
There is also a blue power-on LED towards the top-right of the sensor. Using the module is quite simple with Arduino – download and use the example sketch included in the sensor library you can download from here. For the demonstration connect the centre data pin to Arduino digital two. Here is an example of the demonstration output:
Although the update speed is not lightning-fast, this should not be an issue unless you’re measuring real-time external temperature of your jet or rocket. For more information please see the product page.
Shift Register/Expansion Module
This board uses a 74HC595 serial-in parallel-out shift register which enables you to control eight digital outputs with only three digital pins, for example:
You can daisy-chain these modules to increase the number of digital outputs in multiples of eight, all while only using the three digital output pins on your Arduino or other microcontroller. For more information about how to use shift registers with Arduino systems, read our detailed tutorial. Otherwise for more information about the module please visit the product page.
Hall Effect Magnetic and Proximity Sensor Module
This module contains a sensor which changes output from HIGH to LOW when a magnetic presence is detected, for example a magnet. The board also has an LED which indicates the presence of the magnet to aid in troubleshooting:
Using this module and a small magnet would be an easy way to create a speedometer for a bicycle, the module is mounted to the fork, and the magnet on the rim of the front wheel. For more ideas consider the speedometer project in this tutorial. Otherwise for more information about this module please visit the product page.
This module performs two functions – it can return the sound pressure level (SPL) or the amplified audio waveform from the electret microphone. The LED (labelled “DETECT”) on the board visually displays an approximation of the SPL – for example:
… however the value can be returned by using an analogue input pin on an Arduino (etc). to return a numerical value. To do this connect the SPL pin to the analogue input. The MIC pin is used to take the amplified output from the microphone, to be processed by an ADC or used in an audio project. For more information please visit the product page.
This module uses the TEMT6000 light sensor which returns more consistent values than can be possible using a light-dependent resistor. It outputs a voltage from the OUT pin that is proportional to the light level. The module is very small:
Use is simple – just measure the value returned from the OUT pin using an analogue input pin on your Arduino (etc). For more information please visit the product page. And finally, the:
This module contains a piezoelectric element that can be used to generate sounds (in the form of musical buzzes…):
Driving the buzzer is simple, just use pulse-width modulation. Arduino users can find a good demonstration of this here. Furthermore, as piezoelectric elements can also generate a small electrical current when vibrated, they can be used as “shock” detectors by measuring the voltage across the terminals of the element. The procedure to do this is also explained clearly here.
Now for a final demonstration – we use the light sensor to demonstrate making some noise with the buzzer module:
One final note I would like to make is that the design and construction quality of each module is first rate. The PCBs are strong, and the silk-screening is useful and descriptive. If you find the need for some or all of the functions made available in this range, you could do worse by not considering a Freetronics unit. Finally, although this has only been a short introduction to the modules for now, we will make use of them in later projects.
The modules are available directly from Freetronics or through their network of resellers.
Disclaimer – Modules 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.













































