Review: GorillaBuilderz LeoShield
Introduction
Some of you may be using an Arduino Leonardo board, taking advantage of the newer ATmega32U4 microcontroller for various reasons. And rightly so – there’s the extra analogue I/O, virtual USB and the microUSB socket so you can use your phone charger cable. However with the new microcontroller comes a few changes to the board pinouts – I2C and SPI have moved. So if you have a nice Ethernet shield or something using I2C – you’re basically out of luck… until now. The problem has been solved nicely by the team at GorillaBuilderz have created their LeoShield:
Use
You simply place it on the Leonardo, and then the older legacy shield on top. The LeoShield redirects the I2C pins back to A4 and A5, and also sends the SPI lines back to D11~D13. For example, our Ethernet shield:
The ICSP pins are also extended from the Leonardo to the LeoShield, for example:
however when inserting the LeoShield into your Leonardo, take care lining up all the pins before pushing the shield down. There is also the large prototyping area which has 5V , 3.3V and GND rails across the full width for convenience. The sticker on the rear of the shield is to insulate against any large items that may come in contact from the host board, however you can peel it off to realise the complete prototyping space.
Conclusion
It’s simple and it works – so if you need to use an older Arduino shield with a Leonardo the choice is simple – get yourself a Leoshield.
Disclaimer - The Leoshield was a review product received from GorillaBuilderz.
Thanks for reading tronixstuff.com. I’ve got some new tutorials coming up very soon, and a lot of existing posts are curently being updated – so 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
Arduino and FFD51 Incandescent Displays
In this article we examine another style of vintage display technology – the incandescent seven-segment digital display. We are using the FFD51 by the IEE company (data sheet.pdf) – dating back to the early 1970s. Here is a close-up of our example:
You can see the filaments for each of the segments, as well as the small coiled ‘decimal point’ filament at the top-right of the image above. This model has pins in a typical DIP format, making use in a solderless breadboard or integration into a PCB very simple:
It operates in a similar manner to a normal light bulb – the filaments are in a vacuum, and when a current is applied the filament glows nicely. The benefit of using such as display is their brightness – they could be read in direct sunlight, as well as looking good inside. At five volts each segment draws around 30mA. For demonstration purposes I have been running them at a lower voltage (3.5~4V), as they are old and I don’t want to accidentally burn out any of the elements. Using these with an Arduino is very easy as they segments can be driven from a 74HC595 shift register using logic from Arduino digital out pins. (If you are unfamiliar with doing so, please read chapters four and five of my tutorial series). For my first round of experimenting, a solderless breadboard was used, along with the usual Freetronics board and some shift register modules:
Although the modules are larger than a DIP 74HC595, I like to use these instead. Once you solder in the header pins they are easier to insert and remove from breadboards, have the pinouts labelled clearly, are almost impossible to physically damage, have a 100nF capacitor for smoothing and a nice blue LED indicating power is applied.
Moving forward – using four shift register modules and displays, a simple four-digit circuit can be created. Note from the datasheet that all the common pins need to be connected together to GND. Otherwise you can just connect the outputs from the shift register (Q0~Q7) directly to the display’s a~dp pins.
Some of you may be thinking “Oh at 30mA a pin, you’re exceeding the limits of the 74HC595!”… well yes, we are. However after several hours they still worked fine and without any heat build-up. However if you displayed all eight segments continuously there may be some issues. So take care. As mentioned earlier we ran the displays at a lower voltage (3.5~4V) and they still displayed nicely. Furthermore at the lower voltage the entire circuit including the Arduino-compatible board used less than 730mA with all segments on – for example:
For the non-believers, here is the circuit in action:
Here is the Arduino sketch for the demonstration above (download):
// IED FF1 incandescent display demonstration // using four displays connected to four 74HC595s
int clockPin = 7; int latchPin = 8; int dataPin = 9; int dd=400;
// array for anodes (to display 0~9)
// the bits represent segments a~dp from left to right
// if you add one to the number (or turn on the last bit) the decimal point turns on
byte numbers[]={
B11111100, // digit zero
B01100000,
B11011010,
B11110010,
B01100110,
B10110110,
B10111110,
B11100000,
B11111110,
B11110110}; // digit nine
void setup()
{
pinMode(clockPin, OUTPUT);
pinMode(latchPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
void allOn()
// turns on all segments of all displays. Used for testing
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 255); // digit 4
shiftOut(dataPin, clockPin, LSBFIRST, 255); // digit 3
shiftOut(dataPin, clockPin, LSBFIRST, 255); // digit 2
shiftOut(dataPin, clockPin, LSBFIRST, 255); // digit 1
digitalWrite(latchPin, HIGH);
}
void clearDigits()
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 0);
shiftOut(dataPin, clockPin, LSBFIRST, 0);
digitalWrite(latchPin, HIGH);
}
void loop()
{
for (int a=0; a<10; a++)
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, numbers[a]); // digit 4 (add 1 for decimal point)
shiftOut(dataPin, clockPin, LSBFIRST, numbers[a]); // digit 3
shiftOut(dataPin, clockPin, LSBFIRST, numbers[a]); // digit 2
shiftOut(dataPin, clockPin, LSBFIRST, numbers[a]); // digit 1
digitalWrite(latchPin, HIGH);
delay(dd);
}
for (int a=0; a<10; a++)
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, numbers[a]+1); // digit 4 (add 1 for decimal point)
shiftOut(dataPin, clockPin, LSBFIRST, numbers[a]+1); // digit 3
shiftOut(dataPin, clockPin, LSBFIRST, numbers[a]+1); // digit 2
shiftOut(dataPin, clockPin, LSBFIRST, numbers[a]+1); // digit 1
digitalWrite(latchPin, HIGH);
delay(dd);
}
}
Now for the prototype of something more useful – another clock.
Time to once again pull out my Arduino-compatible board with onboard DS1307 real-time clock. For more information on the RTC IC and getting time data with an Arduino please visit chapter twenty of my tutorials. For this example we will use the first two digits for the hours, and the last two digits for minutes. The display will then rotate to showing the numerical day and month of the year – then repeat.
Operation is simple – just get the time from the DS1307, then place the four digits in an array. The elements of the array are then sent in reverse order to the shift registers. The procedure is repeated for the date. Anyhow, here is the sketch (download):
#include "Wire.h" #define DS1307_I2C_ADDRESS 0x68
// note the digital pins of the arduino that are connected to the nixie driver int clockPin = 7; int latchPin = 8; int dataPin = 9;
int clockArray[5]; // holds the digits to display int a=0;
// the bits represent segments a~dp from left to right
// if you add one to the number (or turn on the last bit) the decimal point turns on
byte numbers[]={
B11111100, // digit zero
B01100000,
B11011010,
B11110010,
B01100110,
B10110110,
B10111110,
B11100000,
B11111110,
B11110110}; // digit nine
// Convert normal decimal numbers to binary coded decimal
byte decToBcd(byte val)
{
return ( (val/10*16) + (val%10) );
}
// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
{
return ( (val/16*10) + (val%16) );
}
void setDateDs1307(byte second, // 0-59
byte minute, // 0-59
byte hour, // 1-23
byte dayOfWeek, // 1-7
byte dayOfMonth, // 1-28/29/30/31
byte month, // 1-12
byte year) // 0-99
{
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.send(0);
Wire.send(decToBcd(second)); // 0 to bit 7 starts the clock
Wire.send(decToBcd(minute));
Wire.send(decToBcd(hour));
Wire.send(decToBcd(dayOfWeek));
Wire.send(decToBcd(dayOfMonth));
Wire.send(decToBcd(month));
Wire.send(decToBcd(year));
Wire.send(0x10); // sends 0x10 (hex) 00010000 (binary) to control register - turns on square wave
Wire.endTransmission();
}
// Gets the date and time from the ds1307
void getDateDs1307(byte *second,
byte *minute,
byte *hour,
byte *dayOfWeek,
byte *dayOfMonth,
byte *month,
byte *year)
{
// Reset the register pointer
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.send(0);
Wire.endTransmission();
Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
// A few of these need masks because certain bits are control bits
*second = bcdToDec(Wire.receive() & 0x7f);
*minute = bcdToDec(Wire.receive());
*hour = bcdToDec(Wire.receive() & 0x3f); // Need to change this if 12 hour am/pm
*dayOfWeek = bcdToDec(Wire.receive());
*dayOfMonth = bcdToDec(Wire.receive());
*month = bcdToDec(Wire.receive());
*year = bcdToDec(Wire.receive());
}
void setup()
{
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
Wire.begin();
// Change these values to what you want to set your clock to. // You probably only want to set your clock once and then remove // the setDateDs1307 call.
second = 00; minute = 35; hour = 17; dayOfWeek = 5; dayOfMonth = 29; month = 4; year = 12; // setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year); }
void showTime()
{
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
if (hour<10)
{
clockArray[1]=0;
clockArray[2]=hour;
}
if (hour>9)
{
clockArray[1]=int(hour/10);
clockArray[2]=hour%10;
}
if (minute<10)
{
clockArray[3]=0;
clockArray[4]=minute;
}
if (minute>9)
{
clockArray[3]=int(minute/10);
clockArray[4]=minute%10;
}
displayArray();
}
void showDate()
{
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
if (dayOfMonth<10)
{
clockArray[1]=0;
clockArray[2]=dayOfMonth;
}
if (dayOfMonth>10)
{
clockArray[1]=int(dayOfMonth/10);
clockArray[2]=dayOfMonth%10;
}
if (month<10)
{
clockArray[3]=0;
clockArray[4]=month;
}
if (month>10)
{
clockArray[3]=int(month/10);
clockArray[4]=month%10;
}
displayArray();
}
void displayArray()
// sends the data from clockArray[] to the shift registers
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, numbers[clockArray[4]]); // digit 4
shiftOut(dataPin, clockPin, LSBFIRST, numbers[clockArray[3]]); // digit 3
shiftOut(dataPin, clockPin, LSBFIRST, numbers[clockArray[2]]+1); // digit 2 and decimal point
shiftOut(dataPin, clockPin, LSBFIRST, numbers[clockArray[1]]); // digit 1
digitalWrite(latchPin, HIGH);
}
void loop()
{
showTime(); // display the time
delay(5000);
showDate(); // display the date (day and month) for two seconds
delay(2000);
}
and the clock in action:
So there you have it – another older style of technology dragged into the 21st century. If you enjoyed this article you may also like to read about vintage HP LED displays. Once again, I hope you found this article of interest. Thanks to the Vintage Technology Association website for background information.
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.
Tutorial: Arduino and Push-wheel switches
This is chapter forty of a series originally titled “Getting Started/Moving Forward with Arduino!” by John Boxall – a series of articles on the Arduino universe. The first chapter is here, the complete series is detailed here. Any files from tutorials will be found here.
[Updated 20/01/13]
In this article we go back to the past via the use of push-wheel/thumb-wheel switches with out Arduino systems. Here are some examples sourced from somewhere on eBay:
For the uninitiated, each switch is one vertical segment and they can be connected together to form various sizes. You can use the buttons to select from digits zero through to nine. There are alternatives available that have a wheel you can move with your thumb instead of the increase/decrease buttons. Before the days of fancy user interfaces these switches were quite popular methods for setting numerical data entry. However they are still available today, so let’s see how they work and how we can use them.
The switch’s value is made available via binary-coded decimal. Consider the rear of the switch:
We have common on the left, then contacts for 1, 2, 4 and 8. If you apply a small voltage (say 5V) to common, the value of the switch can be measured by adding the values of the contacts that are in the HIGH state. For example, if you select 3 – contacts 1 and 2 will be at the voltage at common. The values between zero and nine can be represented as such:
![]()
By now you should realise that it would be easy to read the value of a switch – and you’re right, it is. We can connect 5V to the common, the outputs to digital input pins of our Arduino boards, then use digitalRead() to determine the value of each output. In the sketch we use some basic mathematics to convert the BCD value to a decimal number. So let’s do that now.
From a hardware perspective, we need to take into account one more thing – the push-wheel switch behaves electrically like four normally-open push buttons. This means we need to use pull-down resistors in order to have a clear difference between high and low states. So the schematic for one switch would be (click image to enlarge):
Now it is a simple matter to connect the outputs labelled 1, 2, 4, and 8 to (for example) digital pins 8, 9, 10 and 11. Connect 5V to the switch ‘C’ point, and GND to … GND. Next, we need to have a sketch that can read the inputs and convert the BCD output to decimal. Consider the following sketch (download):
Example 40.1
/* Example 40.1 - display single thumbwheel switch data http://tronixstuff.wordpress.com/tutorials > chapter 40 | cc v3.0 by-sa-nc Uses Gravitech SAA1064 numerical display shield http://www.gravitech.us/7segmentshield.html Uses serial monitor if you don't have the SAA1064 shield */
#include "Wire.h"
#define q1 8 #define q2 9 #define q4 10 #define q8 11
void setup()
{
Serial.begin(9600);
Wire.begin(); // join i2c bus (address optional for master)
delay(500);
pinMode(q1, INPUT); // thumbwheel '1'
pinMode(q2, INPUT); // thumbwheel '2'
pinMode(q4, INPUT); // thumbwheel '4'
pinMode(q8, INPUT); // thumbwheel '8'
}
void dispSAA1064(int Count)
// sends integer 'Count' to Gravitech SAA1064 shield
{
const int lookup[10] = {
0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F };
int Thousands, Hundreds, Tens, Base;
Wire.beginTransmission(0x38);
Wire.write(0);
Wire.write(B01000111);
Wire.endTransmission();
Wire.beginTransmission(0x38);
Wire.write(1);
Thousands = Count/1000;
Hundreds = (Count-(Thousands*1000))/100;
Tens = (Count-((Thousands*1000)+(Hundreds*100)))/10;
Base = Count-((Thousands*1000)+(Hundreds*100)+(Tens*10));
Wire.write(lookup[Base]);
Wire.write(lookup[Tens]);
Wire.write(lookup[Hundreds]);
Wire.write(lookup[Thousands]);
Wire.endTransmission();
delay(10);
}
int readSwitch()
{
int total=0;
if (digitalRead(q1)==HIGH) { total+=1; }
if (digitalRead(q2)==HIGH) { total+=2; }
if (digitalRead(q4)==HIGH) { total+=4; }
if (digitalRead(q8)==HIGH) { total+=8; }
return total;
}
void loop()
{
dispSAA1064(readSwitch()); // sends switch value to display shield
Serial.println(readSwitch()); // sends switch value to serial monitor box
}
The function readSwitch() is the key. It calculates the value of the switch by adding the numerical representation of each switch output and returns the total as its result. For this example we used a numerical display shield that is controlled by the NXP SAA1064. If you don’t have one, that’s ok – the results are also sent to the serial monitor. Now, let’s see it in action:
Ok it doesn’t look like much, but if you need numerical entry it saves a lot of physical space and offers a precise method of entry.
So there you have it. Would you actually use these in a project? For one digit – yes. For four? Probably not – perhaps it would be easier to use a 12-digit keypad. There’s an idea… But for now I hope you enjoyed reading this as much as I did writing it for you.
Update! See the addendum for using four switches at once to read four-digit numbers here.
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.
Tutorial: Arduino and the NXP SAA1064 4-digit LED display driver
This is chapter thirty-nine of a series originally titled “Getting Started/Moving Forward with Arduino!” by John Boxall – a series of articles on the Arduino universe. The first chapter is here, the complete series is detailed here. Any files from tutorials will be found here.
Updated 19/01/2013
In this article we investigate controlling the NXP (formerly Philips) SAA1064 4-digit LED display driver IC with Arduino and the I2C bus interface. If you are not familiar with using the I2C bus, please read my tutorials (parts one and two) before moving on. Although the SAA1064 is not the newest on the market, it is still popular, quite inexpensive and easy to source. Furthermore as it is controlled over the I2C bus – you don’t waste any digital I/O pins on your Arduino, and you can also operate up to four SAA1064s at once (allowing 16 digits!). Finally, it has a constant-current output – keeping all the segments of your LED display at a constant brightness (which is also adjustable). So let’s get started…
Here is an example of the SAA1064 in SOIC surface mount packaging:
It measures around 15mm in length. For use in a solderless breadboard, I have soldered the IC onto a through-hole adaptor:
The SAA1064 is also available in a regular through-hole DIP package. At this point, please download the data sheet (.pdf) as you will need to refer to it during the article. Next, our LED display examples. We need common-anode displays, and for this article we use two Agilent HDSP521G two-digit modules (data sheet [.pdf]) as shown below:
For the uninitiated – a common anode display has all the segments’ anodes connected together, with the cathodes terminated separately. For example, our LED displays are wired as such:
Notice the anodes for the left digit are pin 14, and the right digit pin 13. A device that is connected to all the cathodes (e.g. our SAA1064) will control the current flow through each element – thereby turning each segment on (and controlling the brightness) or off. Our SAA1064 is known as a current-sink as the current flows through the LED, and then sinks into the IC.
Now, let’s get it connected. There is an excellent demonstration circuit on page twelve of the data sheet that we will follow for our demonstrations:
It looks pretty straight-forward, and it is. The two transistors are standard NPN-type, such as PN2222. The two transistors are used to each turn on or off a pair of digits – as the IC can only drive digits 1+3 or 2+4 together. (When presented in real life the digits are numbered 4-3-2-1). So the pairs are alternatively turned on and off at a rapid rate, which is controlled by the capacitor between pin 2 and GND. The recommended value is 2.7 nF. At the time of writing, I didn’t have that value in stock, so chose a 3.3 nF instead. However due to the tolerance of the ceramic capacitor it was actually measured to be 2.93 nF:
So close enough to 2.7 nF will be OK. The other capacitor shown between pins 12 and 13 is a standard 0.1 uF smoothing capacitor. Pin 1 on the SAA1064 is used to determine the I2C bus address – for our example we have connected it straight to GND (no resistors at all) resulting in an address of 0×70. See the bottom page five of the data sheet for other address options. Power for the circuit can be taken from your Arduino’s 5V pin – and don’t forget to connect the circuit GND to Arduino GND. You will also use 4.7k ohm pull-up resistors on the SDA and SCL lines of the I2C bus.
The last piece of the schematic puzzle is how to connect the cathodes of the LED displays to the SAA1064. Display pins 14 and 13 are the common anodes of the digits.
The cathodes for the left-hand display module:
- LED display pins 4, 16, 15, 3, 2, 1, 18 and 17 connect to SAA1064 pins 22, 21, 20, 19, 18, 17, 16 and 15 respectively (that is, LED pin 4 to IC pin 22, etc.);
- LED display pins 9, 11, 10, 8, 6, 5, 12 and 7 also connect to SAA1064 pins 22, 21, 20, 19, 18, 17, 16 and 15 respectively.
- LED display pins 4, 16, 15, 3, 2, 1, 18 and 17 connect to SAA1064 pins 3, 4, 5, 6, 7, 8, 9 and 10 respectively;
- LED display pins 9, 11, 10, 8, 6, 5, 12 and 7 also connect to SAA1064 pins 3, 4, 5, 6, 7, 8, 9 and 10 respectively.
Wire.beginTransmission(saa1064);
Wire.write(B00000000);
Wire.write(B01000111);
Wire.beginTransmission(saa1064);
Wire.write(B00000001);
The digit bytes describe which digit elements to turn on or off. The bytes are described as such: Bpgfedcba. (p is the decimal point). So if you wanted to display the number 7, you would send B00000111 – as this would turn on elements a, b and c. To add the decimal point with 7 you would send B10000111. You can also send the byte as a decimal number. So to send the digit 7 as a decimal, you would send 7 – as 00000111 in base-10 is 7. To include the decimal point, send 135 – as 100000111 in base-10 is 135. Easy! You can also create other characters such as A~F for hexadecimal. In fact let’s do that now in the following example sketch (download):/* Example 39.1 - NXP SAA1064 I2C LED Driver IC Demo I Demonstrating display of digits http://tronixstuff.wordpress.com/tutorials > chapter 39 John Boxall July 2011 | CC by-sa-nc */
#include "Wire.h" // enable I2C bus
byte saa1064 = 0x70 >> 1; // define the I2C bus address for our SAA1064 (pin 1 to GND) ****
int digits[16]={63, 6, 91, 79, 102, 109, 125,7, 127, 111, 119, 124, 57, 94, 121, 113};
// these are the byte representations of pins required to display each digit 0~9 then A~F
void setup()
{
Wire.begin(); // start up I2C bus
delay(500);
initDisplay();
}
void initDisplay()
// turns on dynamic mode and adjusts segment current to 12mA
{
Wire.beginTransmission(saa1064);
Wire.write(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
Wire.write(B01000111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 12mA segment current
Wire.endTransmission();
}
void displayDigits()
// show all digits 0~9, A~F on all digits of display
{
for (int z=0; z<16; z++)
{
Wire.beginTransmission(saa1064);
Wire.write(1); // instruction byte - first digit to control is 1 (right hand side)
Wire.write(digits[z]); // digit 1 (RHS)
Wire.write(digits[z]); // digit 2
Wire.write(digits[z]); // digit 3
Wire.write(digits[z]); // digit 4 (LHS)
Wire.endTransmission();
delay(500);
}
// now repeat but with decimal point
for (int z=0; z<16; z++)
{
Wire.beginTransmission(saa1064);
Wire.write(1); // instruction byte - first digit to control is 1 (right hand side)
Wire.write(digits[z]+128); // digit 1 (RHS)
Wire.write(digits[z]+128); // digit 2
Wire.write(digits[z]+128); // digit 3
Wire.write(digits[z]+128); // digit 4 (LHS)
Wire.endTransmission();
delay(500);
}
}
void clearDisplay()
// clears all digits
{
Wire.beginTransmission(saa1064);
Wire.write(1); // instruction byte - first digit to control is 1 (right hand side)
Wire.write(0); // digit 1 (RHS)
Wire.write(0); // digit 2
Wire.write(0); // digit 3
Wire.write(0); // digit 4 (LHS)
Wire.endTransmission();
}
void loop()
{
displayDigits();
clearDisplay();
delay(1000);
}
/* **** We bitshift the address as the SAA1064 doesn't have the address 0x70 (ADR pin
to GND) but 0x38 and Arduino uses 7-bit addresses- so 8-bit addresses have to
be shifted to the right one bit. Thanks to Malcolm Cox */
In the function initDisplay() you can see an example of using the instruction then the control byte. In the function clearDisplay() you can see the simplest form of sending digits to the display – we send 0 for each digit to turn off all elements in each digit. The bytes that define the digits 0~9 and A~F are stored in the array digits[]. For example, the digit zero is 63 in decimal, which is B00111111 in binary – which turns on elements a,b,c,d,e and f. Finally, notice the second loop in displayDigits() – 128 is added to each digit value to turn on the decimal point. Before moving on, let’s see it in action:
Our next example revisits the instruction and control byte – we change the brightness of the digits by setting bits 4~6 in the control byte. Each level of brightness is separated into a separate function, and should be self-explanatory. Here is the sketch (download):
/* Example 39.2 - NXP SAA1064 I2C LED Driver IC Demo II Demonstrating brightness levels via adjusting segment current http://tronixstuff.wordpress.com/tutorials > chapter 39 John Boxall July 2011 | CC by-sa-nc */
#include "Wire.h" // enable I2C bus
byte saa1064 = 0x70 >> 1; // define the I2C bus address for our SAA1064 (pin 1 to GND)
int digits[16]={63, 6, 91, 79, 102, 109, 125,7, 127, 111, 119, 124, 57, 94, 121, 113};
// these are the byte representations of pins required to display each digit 0~9 then A~F
void setup()
{
Wire.begin(); // start up I2C bus
delay(500);
init12ma();
}
void init3ma()
// turns on dynamic mode and adjusts segment current to 3mA
{
Wire.beginTransmission(saa1064);
Wire.write(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
Wire.write(B00010111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 3mA segment current
Wire.endTransmission();
}
void init6ma()
// turns on dynamic mode and adjusts segment current to 6mA
{
Wire.beginTransmission(saa1064);
Wire.write(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
Wire.write(B00100111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 6mA segment current
Wire.endTransmission();
}
void init9ma()
// turns on dynamic mode and adjusts segment current to 9mA
{
Wire.beginTransmission(saa1064);
Wire.write(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
Wire.write(B00110111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 9mA segment current
Wire.endTransmission();
}
void init12ma()
// turns on dynamic mode and adjusts segment current to 12mA
{
Wire.beginTransmission(saa1064);
Wire.write(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
Wire.write(B01000111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 12mA segment current
Wire.endTransmission();
}
void init18ma()
// turns on dynamic mode and adjusts segment current to 12mA
{
Wire.beginTransmission(saa1064);
Wire.write(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
Wire.write(B01100111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 18mA segment current
Wire.endTransmission();
}
void init21ma()
// turns on dynamic mode and adjusts segment current to 12mA
{
Wire.beginTransmission(saa1064);
Wire.write(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
Wire.write(B01110111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 21mA segment current
Wire.endTransmission();
}
void loop()
{
int d=250; // for delay
// first, light up all segments
Wire.beginTransmission(saa1064);
Wire.write(0); // instruction byte - Zero means the next byte is the control byte
Wire.write(B01001111); // set current and bit 3 to 1 for all segments on
Wire.endTransmission();
// now loop through the brightness levels
do
{
init3ma();
delay(d);
init6ma();
delay(d);
init9ma();
delay(d);
init12ma();
delay(d);
init18ma();
delay(d);
init21ma();
delay(d);
}
while (1>0);
}
And again, see it in action:
For our final example, there is a function displayInteger(a,b) which can be used to easily display numbers from 0~9999 on the 4-digit display. The parameter a is the number to display, and b is the leading-zero control – zero – off, one – on. The function does some maths on the integet to display and separates the digits for each column, then sends them to the SAA1064 in reverse order. By now you should be able to understand the following sketch (download):
/* Example 39.3 - NXP SAA1064 I2C LED Driver IC Demo III Displaying numbers on command http://tronixstuff.wordpress.com/tutorials > chapter 39 John Boxall July 2011 | CC by-sa-nc */
#include "Wire.h" // enable I2C bus
byte saa1064 = 0x70 >> 1; // define the I2C bus address for our SAA1064 (pin 1 to GND)
int digits[17]={
63, 6, 91, 79, 102, 109, 125,7, 127, 111, 119, 124, 57, 94, 121, 113, 0};
// these are the byte representations of pins required to display each digit 0~9 then A~F, and blank digit
void setup()
{
Wire.begin(); // start up I2C bus
delay(500);
initDisplay();
}
void initDisplay()
// turns on dynamic mode and adjusts segment current to 12mA
{
Wire.beginTransmission(saa1064);
Wire.write(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
Wire.write(B01000111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 12mA segment current
Wire.endTransmission();
}
void clearDisplay()
{
Wire.beginTransmission(saa1064);
Wire.write(1); // start with digit 1 (right-hand side)
Wire.write(0); // blank digit 1
Wire.write(0); // blank digit 2
Wire.write(0); // blank digit 3
Wire.write(0); // blank digit 4
Wire.endTransmission();
}
void displayInteger(int num, int zero)
// displays the number 'num'
// zero = 0 - no leading zero
// zero = 1 - leading zero
{
int thousand, hundred, ten, one;
// breakdown number into columns
thousand = num/1000;
hundred = (num-(thousand*1000))/100;
ten = (num-((thousand*1000)+(hundred*100)))/10;
one = num-((thousand*1000)+(hundred*100)+(ten*10));
if (zero==1) // yes to leading zero
{
Wire.beginTransmission(saa1064);
Wire.write(1);
Wire.write(digits[one]);
Wire.write(digits[ten]);
Wire.write(digits[hundred]);
Wire.write(digits[thousand]);
Wire.endTransmission();
delay(10);
}
else
if (zero==0) // no to leading zero
{
if (thousand==0) { thousand=16; }
if (hundred==0 && num<100) { hundred=16; }
if (ten==0 && num<10) { ten=16; }
Wire.beginTransmission(saa1064);
Wire.write(1);
Wire.write(digits[one]);
Wire.write(digits[ten]);
Wire.write(digits[hundred]);
Wire.write(digits[thousand]);
Wire.endTransmission();
delay(10);
}
}
void loop()
{
for (int a=0; a<251; a++)
// display 0~250 without leading zero
{
displayInteger(a,0);
delay(20);
}
delay(1000);
clearDisplay();
delay(1000);
for (int a=0; a<1000; a++)
// display 0~999 with leading zero
{
displayInteger(a,1);
delay(5);
}
}
And the final example in action:
So there you have it – another useful IC that can be used in conjunction with our Arduino systems to make life easier and reduce the required digital output pins.
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.
Kit Review – Snootlab Mémoire SD card/RTC/prototyping shield
Hello Readers
In this article we will examine another product from a bundle sent for review by Snootlab, a Toulouse, France-based company that in their own words:
… designs and develops electronic products with an Open Hardware and Open Source approach. We are particularly specialized in the design of new shields for Arduino. The products we create are licensed under CC BY-SA v3.0 (as shown in documents associated with each of our creations). In accordance with the principles of the definition of Open Source Hardware (OSHW), we have signed it the 10th February 2011. We wish to contribute to the development of the ecosystem of “do it yourself” through original designs of products, uses and events.
Furthermore, all of their products are RoHS compliant and as part of the Open Hardware commitment, all the design files are available from the Snootlab website.
The subject of the review is the Snootlab Mémoire – an SD card data logging shield with on-board DS1307 real time clock [and matching backup battery] and prototyping area. It uses the standard SdFat library to write to normal SD memory cards formatted in FAT16 or FAT32. You can download the library from here. The real time clock IC is an easy to use I2C-interface model, and I have documented its use in great detail in this tutorial.
Once again, shield assembly is simple and quite straightforward. You can download an illustrated assembly guide from here, however it is in French. But everything you need to know is laid out on the PCB silk-screen, or the last page of the instructions. The it arrives in a reusable ESD bag:
… and all the required parts are included – including an IC socket and the RTC backup battery:
… the PCB is thick, with a very detailed silk-screen. Furthermore, it arrives with the SD card and 3.3V LDO (underneath) already pre-soldered – a nice touch:
The order of soldering the components is generally a subjective decision, and in this case I started with the resistors:
… and then worked my way out, but not fitting the battery nor IC until last. Intrestingly, the instructions require the crystal to be tacked down with some solder onto the PCB. Frankly I didn’t think it would withstand the temperature, however it did and all is well:
Which leaves us with a fully-assembled Mémoire shield ready for action:
Please note that a memory card is not included with the kit. If you are following along with your own Mémoire, the first thing to do after inserting the battery, IC and shield into your Arduino board and run some tests to ensure all is well. First thing is to test the DS1307 real-time clock IC. You can use the following sketch from chapter seven of my Arduino tutorial series: (download sketch file)
/*
Example 7.3
reading and writing to the Maxim DS1307 real time clock IC
tronixstuff.com/tutorials
based on code by Maurice Ribble
17-4-2008 - http://www.glacialwanderer.com/hobbyrobotics
*/
#include "Wire.h"
#define DS1307_I2C_ADDRESS 0x68
// Convert normal decimal numbers to binary coded decimal
byte decToBcd(byte val)
{
return ( (val/10*16) + (val%10) );
}
// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
{
return ( (val/16*10) + (val%16) );
}
// 1) Sets the date and time on the ds1307
// 2) Starts the clock
// 3) Sets hour mode to 24 hour clock
// Assumes you're passing in valid numbers
void setDateDs1307(byte second, // 0-59
byte minute, // 0-59
byte hour, // 1-23
byte dayOfWeek, // 1-7
byte dayOfMonth, // 1-28/29/30/31
byte month, // 1-12
byte year) // 0-99
{
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.send(0);
Wire.send(decToBcd(second)); // 0 to bit 7 starts the clock
Wire.send(decToBcd(minute));
Wire.send(decToBcd(hour));
Wire.send(decToBcd(dayOfWeek));
Wire.send(decToBcd(dayOfMonth));
Wire.send(decToBcd(month));
Wire.send(decToBcd(year));
Wire.send(00010000); // sends 0x10 (hex) 00010000 (binary) to control register - turns on square wave
Wire.endTransmission();
}
// Gets the date and time from the ds1307
void getDateDs1307(byte *second,
byte *minute,
byte *hour,
byte *dayOfWeek,
byte *dayOfMonth,
byte *month,
byte *year)
{
// Reset the register pointer
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.send(0);
Wire.endTransmission();
Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
// A few of these need masks because certain bits are control bits
*second = bcdToDec(Wire.receive() & 0x7f);
*minute = bcdToDec(Wire.receive());
*hour = bcdToDec(Wire.receive() & 0x3f); // Need to change this if 12 hour am/pm
*dayOfWeek = bcdToDec(Wire.receive());
*dayOfMonth = bcdToDec(Wire.receive());
*month = bcdToDec(Wire.receive());
*year = bcdToDec(Wire.receive());
}
void setup()
{
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
Wire.begin();
Serial.begin(9600);
// Change these values to what you want to set your clock to.
// You probably only want to set your clock once and then remove
// the setDateDs1307 call.
second = 0;
minute = 33;
hour = 22;
dayOfWeek = 2;
dayOfMonth = 4;
month = 07;
year = 11;
setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
}
void loop()
{
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
Serial.print(hour, DEC);// convert the byte variable to a decimal number when being displayed
Serial.print(":");
if (minute<10)
{
Serial.print("0");
}
Serial.print(minute, DEC);
Serial.print(":");
if (second<10)
{
Serial.print("0");
}
Serial.print(second, DEC);
Serial.print(" ");
Serial.print(dayOfMonth, DEC);
Serial.print("/");
Serial.print(month, DEC);
Serial.print("/");
Serial.print(year, DEC);
Serial.print(" Day of week:");
switch(dayOfWeek){
case 1:
Serial.println("Sunday");
break;
case 2:
Serial.println("Monday");
break;
case 3:
Serial.println("Tuesday");
break;
case 4:
Serial.println("Wednesday");
break;
case 5:
Serial.println("Thursday");
break;
case 6:
Serial.println("Friday");
break;
case 7:
Serial.println("Saturday");
break;
}
// Serial.println(dayOfWeek, DEC);
delay(1000);
}
If you are unsure about using I2C, please review my tutorial which can be found here.
Don’t forget to update the time and date data in void setup(), and also comment out the setDateDS1307() function and upload the sketch a second time. The sketch output will be found on the serial monitor box – such as:
Those of you familiar with the DS1307 RTC IC know that it can generate a nice 1 Hz pulse. To take advantage of this the SQW pin has an access hole on the PCB, beetween R10 and pin 8 of the IC:
For instruction on how to activate the SQW output, please visit the last section of this tutorial.
The next test is the SD card section of the shield. If you have not already done so, download and install the SdFat libary. Then, in the Arduino IDE, select File > Examples > SdFat > SdFatInfo. Insert the formatted (FAT16/32) SD card into the shield, upload the sketch, then open the serial monitor. You should be presented with something like this:
As you can see the sketch has returned various data about the SD card. Finally, let’s log some data. You can deconstruct the excellent example that comes with the SdFat library titled SdFatAnalogLogger (select File > Examples > SdFat > SdFatAnalogLogger). Using the functions:
file.print();
file.println();
you can “write” to the SD card in the same way as you would the serial output (that is, the serial monitor).
If you have reached this far without any errors – Congratulations! You’re ready to log. If not, remove the battery, SD card and IC from your shield (you used the IC socket, didn’t you?). Check the polarised components are in correctly, double-check your soldering and then reinsert the IC, shield and battery and try again. If that fails, support is available on the Snootlab website, and there is also a customer forum in French (use Google Translate). However as noted previously the team at Snootlab converse in excellent English and have been easy to contact via email if you have any questions. Stay tuned for the final Snootlab product review.
Snootlab products including the Snootlab Mémoire are available directly from their website.
High-resolution images available on flickr.
As always, thank you for reading and I look forward to your comments and so on. Furthermore, don’t be shy in pointing out errors or places that could use improvement. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts, follow on twitter, facebook, or join our Google Group.
[Disclaimer - the products reviewed in this article are promotional considerations made available by Snootlab]
Otherwise, have fun, be good to each other – and make something!
Review: The Gravitech Arduino Nano family
Hello Readers
In this article we will examine a variety of products received for review from Gravitech in the United States – the company that designed and build the Arduino Nano. We have a Nano and some very interesting additional modules to have a look at.
So let’s start out review with the Arduino Nano. What is a Nano? A very, very small version of our Arduino Duemilanove boards. It contains the same microcontroller (ATmega328) but in SMD form; has all the I/O pins (plus two extra analogue inputs); and still has a USB interface via the FT232 chip. But more on that later. Nanos arrive in reusable ESD packaging which is useful for storage when not in use:
Patriotic Americans should note that the Nano line is made in the USA. Furthermore, here is a video clip of Nanos being made:
For those who were unsure about the size of the Nano, consider the following images:
You can easily see all the pin labels and compare them to your Duemilanove or Uno board. There is also a tiny reset button, the usual LEDs, and the in circuit software programmer pins. So you don’t miss out on anything by going to a Nano. When you flip the board over, the rest of the circuitry is revealed, including the FTDI USB>serial converter IC:
Those of you familiar with Arduino systems should immediately recognise the benefit of the Nano – especially for short-run prototype production. The reduction in size really is quite large. In the following image, I have traced the outline of an Arduino Uno and placed the Nano inside for comparison:
So tiny… the board measures 43.1mm (1.7″) by 17.8mm (0.7″). The pins on this example were pre-soldered – and are spaced at standard 2.54mm (0.1″) intervals – perfect for breadboarding or designing into your own PCB - however you can purchase a Nano without the pins to suit your own mounting purposes. The Nano meets all the specifications of the standard Arduino Duemilanove-style boards, except naturally the physical dimensions.
Power can be supplied to the Nano via the USB cable; feeding 5V directly into the 5V pin, or 7~12 (20 max, not recommended) into the Vin pin. You can only draw 3.3V at up to 50 mA when the Nano is running on USB power, as the 3.3V is sourced from the FTDI USB>serial IC. And the digital I/O pins still allow a current draw up to 40 mA each. From a software perspective you will not have any problems, as the Nano falls under the same board classification as the (for example) Arduino Duemilanove:
Therefore one could take advantage of all the Arduino fun and games – except for the full-size shields. But as you will read soon, Gravitech have got us covered on that front. If the Arduino system is new to you, why not consider following my series of tutorials? They can be found here. In the meanwhile, to put the size into perspective – here is a short video of a Nano blinking some LEDs!
Now back to business. As the Nano does not use standard Arduino shields, the team at Gravitech have got us covered with a range of equivalent shields to enable all sorts of activities. The first of this is their Ethernet and microSD card add-on module:
and the underside:
Again this is designed for breadboarding, or you could most likely remove the pins if necessary. The microSD socket is connected as expected via the SPI bus, and is fully compatible with the default Arduino SD library. As shown in the following image the Nano can slot directly into the ethernet add-in module:
The Ethernet board requires an external power supply, from 7 to 12 volts DC. The controller chip is the usual Wiznet 5100 model, and therefore the Ethernet board is fully compatible with the default Ethernet Arduino library. We tested it with the example web server sketch provided with the Arduino IDE and it all just worked.
The next add-on module to examine is the 2MOTOR board:
Using this module allows control of two DC motors with up to two amps of current each via pulse-width modulation. Furthermore, there is a current feedback circuit for each motor so you measure the motor load and adjust power output – interesting. So a motorised device could sense when it was working too hard and ease back a little (like me on a Saturday). All this is made possible by the use of the common L298 dual full-bridge motor driver IC. This is quite a common motor driver IC and is easy to implement in your sketches. The use of this module and the Nano will help reduce the size of any robotics or motorised project. Stay tuned for use of this board in future articles.
Next in this veritable cornucopia of add-on modules is the USBHOST board:
turning it over …
Using the Maxim MAX3421E host controller IC you can interface with all sorts of devices via USB, as well as work with the new Android ADK. The module will require an external power supply of between 7 and 12 volts DC, with enough current to deal with the board, a Nano and the USB device under control – one amp should be more than sufficient. I will be honest and note that USB and Arduino is completely new to me, however it is somewhat fascinating and I intend to write more about using this module in the near future. In the meanwhile, many examples can be found here.
For a change of scene there is also a group of Xbee wireless communication modules, starting with the Xbee add-on module:
The Xbee itself is not included, only shown for a size comparison. Turning the module over:
It is nice to see a clearly-labelled silk screen on the PCB. If you are unfamiliar with using the Xbee wireless modules for data communication, you may find my introductory tutorial of interest. Furthermore, all of the Gravitech Nano modules are fully software compatible with my tutorial examples, so getting started will be a breeze. Naturally Gravitech also produce an Xbee USB interface board, to enable PC communication over your wireless modules:
Again, note that the Xbee itself is not included, however they can be supplied by Gravitech. Turning the board over reveals another highly-detailed silk screen:
All of the Gravitech Xbee modules support both series 1.0 and 2.5 Xbees, in both standard and professional variants. The USB module also supports the X-CTU configuration software from Digi.
Finally – leaving possibly the most interesting part until last, we have the MP3 Player add-on board:
and on the B-side:
The MP3 board is designed around the VS1053B MP3 decoder IC. It can also decode Ogg Vorbis, AAC, WMA and MID files. There is a 3.5mm stereo output socket to connect headphones and so on. As expected, the microSD card runs from the SPI pins, however SS is pin 4. Although it may be tempting to use this to make a home-brew MP3 player, other uses could include: recorded voice messages for PA systems such as fire alarm notices, adding sound effects to various projects or amusement machines, or whatever else you can come up with.
Update – We have examined the MP3 board in more detail with a beginner’s tutorial.
The Arduino Nano and related boards really are tiny, fully compatible with their larger brethren, and will prove very useful. Although this article was an introductory review, stay tuned for further projects and articles that will make use of the Nano and other boards. If you have any questions or enquiries please direct them to Gravitech via their contact page. Gravitech products including the Arduino Nano family are available directly from their website or these distributors.
As always, thank you for reading and I look forward to your comments and so on. Furthermore, don’t be shy in pointing out errors or places that could use improvement. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts, follow on twitter, facebook, or join our Google Group.
[Disclaimer - the products reviewed in this article are promotional considerations made available by Gravitech]
High resolution photos are available on flickr.
Otherwise, have fun, be good to each other – and make something!
Kit Reviews: Snootlab Power ScrewShield and I2C Power Protoshield
Hello Readers
In this article we will examine the first two products from a bundle sent for review by Snootlab, a Toulouse, France-based company that in their own words:
… designs and develops electronic products with an Open Hardware and Open Source approach. We are particularly specialized in the design of new shields for Arduino. The products we create are licensed under CC BY-SA v3.0 (as shown in documents associated with each of our creations). In accordance with the principles of the definition of Open Source Hardware (OSHW), we have signed it the 10th February 2011. We wish to contribute to the development of the ecosystem of “do it yourself” through original designs of products, uses and events.
Furthermore, all of their products are RoHS compliant and as part of the Open Hardware commitment, all the design files are available from the Snootlab website.
First, let’s examine the Power Screwshield kit. This is a feature-laden prototyping shield suitable for Arduino Uno and compatible series boards. It can be used with the Mega, however not all of the I/O pins will be available.
Apart from obvious use as a prototyping shield, there are also three other useful features:
- space for a 16-pin SOIC SMD part in the prototyping area;
- a full line of screw terminals that connect to all the shield pin connections (in a similar way to the Wingshield Screwshield);
- and a socket to allow power to be sourced from a standard computer ATX power supply, which brings 5V and 12V DC to the shield. I have never seen this implemented on a shield in the past – a very novel and useful idea.

… which contains all the necessary parts:
… and a very high quality PCB:
The PCB thickness is over 1mm, and as you can see from the image above the silk-screening describes all the areas of the PCB in a detailed manner. Note that this shield is much larger than a standard Arduino shield – this becomes obvious when compared with a standard prototyping shield:
Assembly was very smooth and quick. There are a couple of things to watch out for, for example you need to slide the terminal blocks together so that they are flush on the sides, such as:
… if you want to enable the 12V DC rail from the ATX power lead, short out the jumper SJ1 with a blob of solder:
… when soldering the PC power connector, be sure to make the clamp bracket flush with the socket, for example:
… and finally, to enable use of the shield’s LED, you need to cut the track in this area on the underside of the PCB:
Although at first the introduction of another Arduino prototyping shield may not have seemed that interesting – this version from Snootlab really goes all out to cover almost every possible need in a shield all at the same time. Sure, it is a lot larger – but none of the board space is wasted – and those terminal blocks would be very hand for making some more permanent-style prototypes with lots of external wiring. And the ability to accept power from a PC ATX-style power supply unit is certainly original and possibly very useful depending on your application. So if you need to create something that needs a lot of power, a lot of prototyping space, and a lot of wiring – this is the protoshield for you.
For the second half of the review we have the Snootlab I2C Power Protoshield. This is another example of an Arduino prototyping shield with some interesting twists. Apart from employing the same PC power connector as used with the Power ScrewShield, this shield is designed for hard-core I2C-bus enthusiasts. (What’s I2C? Check my tutorials). This is due to the 10-pin HE connector on the edge of the board – it contains pins for SCL, SDA, 3.3V, 5V and GND. With this you could use you own cable connections to daisy-chain other devices communicating via the I2C bus. Again, the shield is a kit and assembly was simple.
Like other Snootlab products, the kit arrives in a reusable ESD bag:
… with a high-quality thick PCB that has a very detailed silk-screen layer:
… and all the required parts are included:
When soldering in the shield connectors, using another shield as a jig can save time:
And we’re finished:
One could also mount a small solderless breadboad on the I2C Power Protoshield:
One great feature is the inclusion of an NCP1117DT33 3.3V 1A voltage regulator. Using this you can source 3.3 volts at up to one amp of current (only) when using the PC power supply connection. This is a great idea, as in the past it can be too easy to accidentally burn out the FTDI chip on an Arduino Duemilanove by drawing too much current from the 3.3V pin. The use of the external 3.3V supply is controlled by a jumper on the header pins here:
Finally, in the image above you can see the area for external I2C pull-up resistors. Generally with our Arduino the internal pull-up resistors in the microcontroller are adequate, however with many I2C devices in use (e.g. eight 24LC512 EEPROMS!) external pull-ups are required.
After examining the two shields I am impressed with the quality of the components and PCBs, as well as the interesting features described in the review. Theyare certainly unique and very much useful if required, especially the PC power supply connections. Support is available on the Snootlab website, and there is also a customer forum in French (use Google Translate). However the people at Snootlab converse in excellent English and have been easy to contact via email if you have any questions. Stay tuned for more interesting Snootlab product reviews.
Snootlab products including the I2C Power Protoshield and the Power ScrewShield are available directly from their website.
As always, thank you for reading and I look forward to your comments and so on. Furthermore, don’t be shy in pointing out errors or places that could use improvement. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts, follow on twitter, facebook, or join our Google Group.
[Disclaimer - the products reviewed in this article are promotional considerations made available by Snootlab]
Otherwise, have fun, be good to each other – and make something!
























































































