Tag Archive | "protoshield"

First look: Arduino Due

Updated 27/02/2013

Introduction

After much waiting the Arduino Due has been released, so let’s check it out. We’ll run through the specifications and some areas of interest, see what’s different, some random notes – then try out some of the new features. Before moving forward note that it might look the same – the Due is not a drop-in replacement for older boards – even the Mega2560. It’s different.

First announced in late 2011, the Due is the Arduino team’s first board with a 32-bit processor – the Atmel SAM3X8E ARM Cortex-M3 CPU. With an 84 Mhz CPU speed and a host of interfaces and I/O, this promises to be the fastest and most functional Arduino board ever. According to the official Arduino press release:

Arduino Due is ideal for those who want to build projects that require high computing power such as the remotely-controlled drones that, in order to fly, need to process a lot of sensor data per second.
Arduino Due gives students the opportunity to learn the inner workings of the ARM processor in a cheaper and much simpler way than before.
To Scientific projects, which need to acquire data quickly and accurately, Arduino Due provides a platform to create open source tools that are much more advanced than those available now.
The new platform enables the open source digital fabrication community (3d Printers, Laser cutters, CNC milling machines) to achieve higher resolutions and faster speed with fewer components than in the past.

Sounds good – and the Due has been a long time coming, so let’s hope it is worth the wait. The SAM3X CPU holds a lot of promise for more complex projects that weren’t possible with previous ATmega CPUs, so this can be only a good thing.

Specifications

First of all, here’s the Due in detail – top and bottom (click to enlarge):

You can use Mega-sized protoshields without any problem (however older shields may miss out on the upper I2C pins) – they’ll physically fit in … however their contents will be a different story:

The specifications of the Due are as follows (from Arduino website):

Microcontroller AT91SAM3X8E
Operating Voltage 3.3V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 54 (of which 12 provide PWM output)
Analog Input Pins 12
Analog Outputs Pins 2 (DAC)
Total DC Output Current on all I/O lines 130 mA
DC Current for 3.3V Pin 800 mA
DC Current for 5V Pin 800 mA
Flash Memory 512 KB all available for the user applications
SRAM 96 KB (two banks: 64KB and 32KB)
Clock Speed 84 MHz

Right away a few things should stand out – the first being the operating voltage – 3.3V. That means all your I/O needs to work with 3.3V – not 5V. Don’t feed 5V logic line into a digital input pin and hope it will work – you’ll damage the board. Instead, get yourself some logic level converters. However there is an IOREF pin like other Arduino boards which intelligent shields can read to determine the board voltage. The total output current for all I/O lines is also 130 mA … so no more sourcing 20mA from a digital ouput for those bright LEDs.

The power regulator for 5V has been changed from linear to switching – so no more directly inserting 5V into the 5V pin. However the 3.3V is through an LDO from 5v.

Each digital I/O pin can source 3 or 15 mA – or sink 6 or 9 mA … depending on the pin. High-current pins are CAN-TX, digital 1, 3~12, 23~51, and SDA1. The rest are low current. And there’s still an LED on digital 13. You will need to redesign any existing projects or shields if moving to the Due.

The analogue inputs now have a greater resolution – 12-bits. That means it can return a value of  0~4095 representing 0~3.3V DC. To activate this higher resolution you need to use the function analogReadResolution(12).

Memory – there isn’t any EEPROM in the SAM3X – so you’ll need external EEPROMs to take care of more permanent storage. However there’s 512 KB of flash memory for sketches – which is huge. You have to see it to believe it:

Excellent. A new feature is the onboard erase button. Press it for three seconds and it wipes out the sketch. The traditional serial line is still digital 0/1 – which connect to the USB controller chip.

Hardware serial – there’s four serial lines. Pulse-width modulation (PWM) is still 8-bit and on digital pins 2~13.

The SPI bus is on the ICSP header pins to the right of the microcontroller – so existing shields that use SPI will need to be modified – or experiment with a LeoShield:

You can also use the extended SPI function of the SAM3X which allow the use of digital pins 4, 10 or 52 for CS (chip select).

The SAM3X supports the automtive CAN bus, and the pins have been brought out onto the stacked header connectors – however this isn’t supported yet in the IDE.

There are two I2C buses – located on digital 20/21 and the second is next to AREF just like on the Leonardo.

There’s a 10-pin JTAG mini-header on the Due, debug pins and a second ICSP for the ATmega16U2 which takes care of USB. Speaking of USB – there’s two microUSB sockets. One is for regular programming via the Arduino IDE and the USB interface, the other is a direct native USB programming port direct to the SAM3X.

The SAM3X natively supports Ethernet, but this hasn’t been implemented on the hardware side for the Due. However some people in the Arduino forum might have a way around that.

Using the Due

First of all – at the time of writing – you need to install Arduino IDE v1.5.1 release 2 – a beta version. Windows users – don’t forget the USB drivers. As always, backup your existing installation and sketch files somewhere safe – and you can run more than one IDE on the same machine.

When it comes time to upload your sketches, plug the USB cable into the lower socket on the Due – and select Arduino Due (Programming Port) from the Tools>Board menu in the IDE.

Let’s upload a sketch now (download) – written by Steve Curd from the Arduino forum. It calculates Newton Approximation for pi using an infinite series. As you can see from the results below, the Due is much faster (690 ms) than the Mega2560 (5765 ms):

speedtest1part1

speedtest1part2

Next, let’s give the digital-to-analogue converters a test. Finally we have two, real, 12-bit DACs with the output pins being … DAC0 and DAC1. No more mucking about with external R-C filters to get some audio happening. These pins provides true analogue outputs which is controlled by the analogWrite() function. To use them is very simple – consider the following example sketch which creates a triangle wave:

And the results from the DSO:

dacdemo1 
This opens up all sorts of audio possibilities. With appropriate wavetable data saved in memory you could create various effects. However the DAC doesn’t give a full 0~3.3V output – instead it’s 1/6 to 5/6 of the Aref voltage. With the IDE there are example sketches that can play a .wav file from an SDcard – however I’d still be more inclined to use an external shield for that. Nevertheless for more information, have a look at the Audio library. Furthermore, take heed of the user experiences noted in the Arduino forum – it’s very easy to destroy your DAC outputs. In the future we look forward to experimenting further with the Due – so stay tuned.

Getting a Due

Good luck … at the time of writing – the Dues seem to be very thin on the ground. This may partly be due to the limited availability of the Atmel SAM3X8E. My contacts in various suppliers say volumes are quite limited.

Quality

I really hope this is a rare event, however one of the Dues received had the following fault in manufacturing:

One side of the crystal capacitor wasn’t in contact with the PCB. However this was a simple fix. How the QC people missed this … I don’t know. However I’ve seen a few Arduinos of various types, and this error is not indicative of the general quality of Arduino products.

Where to from here?

Visit the official Arduino Due page, the Due discussion section of the Arduino forum, and check out the reference guide for changes to functions that are affected by the different hardware.

Conclusion

Well that’s my first take on the Due – powerful and different. You will need to redesign existing projects, or build new projects around it. And a lot of stuff on the software side is still in beta. So review the Due forum before making any decisions. With that in mind – from a hardware perspective – it’s a great step-up from the Mega2560.

So if you’re interested – get one and take it for a spin, it won’t disappoint. The software will mature over time which will make life easier as well. If you have any questions (apart from Arduino vs. Raspberry Pi) leave a comment and we’ll look into it.

LEDborder

Have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, 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.

Posted in arduino, arm cortex, AT91SAM3X8E, dev-11589, due, part review, review, SAM3X8E, tutorialComments (6)

Experimenting with Surface-Mount Component Prototyping

Experimenting with hand-soldering SMT components.

Updated 18/03/2013

Now and again I have looked at SMT (surface-mount technology) components and thought to myself “I should try that one day”. But not wanting to fork out for a toaster oven and a bunch of special tools I did it on the cheap – so in this article you can follow along and see the results. Recently I ordered some ElecFreaks SOIC Arduino Mega-style protoshields which apart from being a normal double-sided protoshield, also have a SOIC SMT pad as shown below:

First up I soldered in two SOIC format ICs – a 555 and a 4017:

These were not that difficult – you need a steady hand, a clean soldering iron tip and some blu-tac. To start, stick down the IC as such:

… then you can … very carefully … hand-solder in a few legs, remove the blu tac and take care of the rest …

The 4017 went in easily as well…

…however it can be easier to flood the pins with solder, then use solder-wick to soak up the excess – which in theory will remove the bridges between pins caused by the excess solder. And some PCB cleaner to get rid of the excess flux is a good idea as well.

Now to some smaller components – some LEDs and a resistor. These were 0805 package types, which measure 2.0 × 1.3 mm – for example a resistor:

The LEDs were also the same size. Unlike normal LEDs, determining the anode and cathode can be difficult – however my examples had a small arrow determining current flow (anode to cathode) on the bottom:

Another way is to use the continuity function of a multimeter – if their output voltage is less than the rating of the LED, you can probe it to determine the pins. When it glows, the positive lead is the anode. Handling such small components requires the use of anti-magnetic tweezers – highly recommended…

… and make holding down the components with one hand whilst soldering with the other much, much easier. Unlike normal veroboard, protoshield or other prototyping PCBs the protoshield’s holes are surrounded with a “clover” style of solder pad, for example:

These solder pads can make hand-soldering SMT parts a little easier. After some experimenting, I found the easiest way was to first flood the hold with solder:

… then hold down the component with the tweezers with one hand while heating the solder with the other – then moving and holding one end of the component into the molten solder:

The first time (above) was a little messy, but one improves with practice. The clover-style of the solder pads makes it easy to connect two components, for example:

With some practice the procedure can become quite manageable:

As the protoshields are double-sided you can make connections between components on the other side to keep things neat for observers. To complete the experiment the six LEDs were wired underneath (except for one) to matching Arduino Mega digital output pins, and a simple demonstration sketch used to illuminate the LEDs, as shown below:

For one-off or very low-volume SMD work these shields from elecfreaks are quite useful. You will need a steady hand and quite a lot of patience, but if the need calls it would be handy to have some of these boards around just in case. For a more involved and professional method of working with SMT, check out this guide by Jon Oxer.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, 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.

Posted in 555, education, elecfreaks, learning electronics, SMD, soldering, tutorialComments (6)

Kit Review – Snootlab Rotoshield

Hello Readers

[Update: 11/12/11 – Added example code and video]

In this article we will examine yet 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 Rotoshield – a motor-driver shield for our Arduino systems. Using a pair of L293 half-bridge motor driver ICs, you can control four DC motors with 256 levels of speed, or two stepper motors. However this is more than just a simple motor-driver shield… The PCB has four bi-colour LEDs, used to indicate the direction of each DC motor; there is a MAX7313 IC which offers another eight PWM output lines; and the board can accept external power up to 18V, or (like other Snootlab shields) draw power from a PC ATX power supply line.

However as this is a kit, let’s follow construction, then explore how the Rotoshield could possibly be used. [You can also purchase the shield fully assembled – but what fun would that be?] Assembly was relatively easy, and you can download instructions and the schematic files in English. As always, the kit arrives in a reusable ESD bag:

There are some SMD components, and thankfully they are pre-soldered to the board. These include the SMD LEDs, some random passives and the MAX7313:

Thankfully the silk-screen is well noted with component numbers and so on:

All the required parts are included, including stackable headers and IC sockets:

It is nice to not see any of the old-style ceramic capacitors. The people at Snootlab share my enthusiasm for quality components. The assembly process is pretty simple, just start with the smaller parts such as capacitors:

… then work outwards with the sockets and terminals:

… then continue on with the larger, bulkier components. My favourite flexible hand was used to hold the electrolytics in place:

… followed with the rest, leaving us with one Rotoshield:

If you want to use the 12V power line from the ATX socket, don’t forget to bridge the PCB pads between R7 and the AREF pin. The next thing to do is download and install the snooter library to allow control of the Rotoshield in your sketches. There are many examples included with the library that you can examine, just select File > Examples > snootor in the Arduino IDE to select an example. Function definitions are available in the readme.txt file included in the library download.

[Update]

After acquiring a tank chassis with two DC motors, it was time to fire up the Rotoshield and get it to work. From a hardware perspective is was quite simple – the two motors were connected to the M1 and M2 terminal blocks, and a 6V battery pack to the external power terminal block on the shield. The Arduino underneath is powered by a separate PP3 9V battery.

In the following sketch I have created four functions – goForward(), goBackward(), rotateLeft() and rotateRight(). The parameter is the amount of time in milliseconds to operate for. The speed of the motore is set using the Mx.setSpeed() function in void Setup(). Although the speed range is from zero to 255, this is PWM so the motors don’t respond that well until around 128. So have just set them to full speed. Here is the demonstration sketch:

… and the resulting video:

For support, visit the Snootlab website and 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. Snootlab products including the Snootlab Rotoshield 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 twitterfacebook, or join our Google Group.

[Disclaimer – the products reviewed in this article are promotional considerations made available by Snootlab]

Posted in arduino, I2C, kit review, L293, MAX7313, microcontrollers, motor shield, product review, rotoshield, snootlabComments (5)

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:

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:

rtcdemooutput

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:

sdcardinfo

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:

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 twitterfacebook, or join our Google Group.

[Disclaimer – the products reviewed in this article are promotional considerations made available by Snootlab]

Posted in arduino, ds1307, education, kit review, snootlabComments (0)

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.
If you are unfamiliar with the ATX power supply options, consider this image of the tronixstuff bench PC’s internals:
ldo3ss
The connector we would use is the one with the four round pins in a single row. In recent times using PC power supplies as bench power supply units has become quite common, so the designers at Snootlab have taken advantage of this in a very clever way by allowing their Power ScrewShield to use these power supplies. Assembly of the shield is simple and well documented. Although it is self-explanatory, you can download an illustrated guide from here. The kit is packaged in a reusable ESD bag:

bagss

Assembly of the shield is simple and well documented. Although it is self-explanatory, you can download an illustrated guide from here. The kit is packaged in a reusable ESD bag:

… which contains all the necessary parts:

partsss

… and a very high quality PCB:

pcbss

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:

pcbcompss

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:

blocks

… if you want to enable the 12V DC rail from the ATX power lead, short out the jumper SJ1 with a blob of solder:

enable12vss

… when soldering the PC power connector, be sure to make the clamp bracket flush with the socket, for example:

atxss

… 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:

bag

… with a high-quality thick PCB that has a very detailed silk-screen layer:

pcb

… and all the required parts are included:

parts1

When soldering in the shield connectors, using another shield as a jig can save time:

headers

And we’re finished:

finished

One could also mount a small solderless breadboad on the I2C Power Protoshield:

finishedwithbreadboard

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:

intext3v3

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 twitterfacebook, or join our Google Group.

[Disclaimer – the products reviewed in this article are promotional considerations made available by Snootlab]

Posted in arduino, kit review, microcontrollers, snootlabComments (13)

May 2011 Competition Results

Competition over!

Posted in competitionComments (0)

May 2011 Competition

Competition over!

Posted in competitionComments (0)

Quick Project – Arduino Backlit LCD shield

In this tutorial learn how to make your own backlit-LCD Arduino shield.

Updated 18/03/2013

Let’s see how simple it is to make your own Arduino LCD shield. Sure – you can just buy one, but where’s the fun in that?

Getting Started

Our LCD is a two line, sixteen character backlit LCD. It has a typical HD44780-compatible interface, which makes it very easy to use with Arduino. The other parts required are laid out along with the LCD:3

partsss

We have the LCD, a Freetronics Protoshield Basic, a button, a 0.1 uF capacitor and some header pins. We also need some solid core, thin wire to make jumpers.

Next is the plan – our schematic. Even for the smaller projects, this is a wise step. You can iron out the bugs before soldering. From experience with these backlit LCDs, there are two ways to wire them up. Either with a trimpot so you can adjust the display contrast, or without. With my example screen, the display was only clear with the trimpot turned all the way to one side, however your screen may vary.

Please note that the voltage for LCD backlights can vary, some are 5V, some are 3.3V. Check your data sheet and plan accordingly!

Consider the following schematics:

schembss1

and

If you are making this circuit without the protoshield, the 0.1 uF capacitor is for decoupling, so place it between 5V and GND. It would be wise to test your LCD using the setup on pin 3 as shown in the second schematic. Then you will have a good idea about the display brightness and contrast. This was done with the usual breadboard setup, but not before soldering the pins into the LCD:

lcdpinsss

which allowed the LCD to slot into the breadboard nicely:

breadboardss

The brightness shown in the image above is satisfactory, so I measured the resistance between each of the outside pins of the trimpot and the centre. The resulting resistance between the centre and ground was around 15 ohms, so basically nothing. So for this LCD, there will not be any adjustments – and the full schematic above will be used (with LCD pin 3 going straight to GND).

The sketch to drive this LCD is quite simple, for example this will do:

For more information about using LCD modules with your Arduino, please refer to my series of Arduino tutorials.

The next step is to consider the plan for the shield. Thankfully this is a pretty simple operation, and minimal extra components to worry about. There is a catch with regards to the LCD module itself, it has six large metal tabs that need to be avoided if the LCD is to sit flush on the shield:

tabsss

Kudos to the engineers who had the pinouts printed on the back of the LCD. Thanks!

You can see that one of the tabs has been … removed. Just carefull use a pair of pliers and bend it slowly back and forth. Metal fatigue will take care of the rest. Anyhow, back to the shield. It is a simple task of soldering in some jumper wires to connect LCD pins 4, 6, 11~14 to the Arduino digital pins 4~9:

linksss

Also during this stage the reset button and the 0.1 uF capacitor were soldered in. When fitting the capacitor, leave around 5mm of length above the board, so you can push it over to one side, this is to give the LCD enough clearance. Furthermore, the lead from the 3.3V pad to LCD 15 is curved so as to avoid another metal tab on the rear of the LCD. The underside of the shield is quite simple:

linskrearss

To ensure a good solder joint when working with these shields – it is very important to heat the ring around the hole for two seconds if you need to create a solder bridge, or heat the wire for two seconds before attempting to solder it on. Otherwise you will either get a cold joint; or become frustrated and keep adding solder, at which point it leaks through to the other side and becomes a problem to remove.

Now to solder in the LCD. If you can, try and bend the LCD pins 1, 3, 5 and 16 towards the GND line, this will help when you need to connect them later. However, please be careful, if you position the LCD incorrectly you will have to basically start all over again with a new shield. When trimming the header pins, be sure to put a finger over the end to stop the cutting flying into your face:

lcdinss

Once you have the LCD module soldered in, and the ends trimmed – the final soldering task is to bridge the pins to the necessary points. This is relatively easy, just heat up one side of the junction and coax the solder across to the required spot. Sometimes the gap will be too large, so trim up the excess legs of the capacitor into small jumpers, say 3~4 mm long. You can then solder these in between the pads quite easily:

almostss

Now – the final soldering task. Snap off some header pins, two of six-pin, and two of eight-pin. Insert them into your Arduino or compatible board as such:

pinsinss

Then place your shield on top and solder the header pins to the shield. And we’re finished… well almost. Before you use the shield, use a multimeter or continuity tester to make sure none of the pins are shorted out, and generally double-check your soldering. You don’t want any mischievous short circuits ruining your new LCD or Arduino board.

Once you are satisfied, plug in your new shield and enjoy your success!

successss

So there you are, another useful Arduino shield ready for action. I hope you enjoyed reading about this project, and hopefully some of you have made one as well. High resolution images are available from flickr.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, 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.

Posted in arduino, HD44780, LCD, microcontrollers, tutorialComments (16)


Subscribe via email

Receive notifications of new posts by email.

The Arduino Book

Arduino Workshop

Für unsere deutschen Freunde

Dla naszych polskich przyjaciół ...

Australian Electronics!

Buy and support Silicon Chip - Australia's only Electronics Magazine.

Use of our content…

%d bloggers like this: