Tag Archive | "part review"

Tutorial – Arduino and the MAX7219 LED Display Driver IC

Use the Maxim MAX7219 LED display driver with Arduino in Chapter 56 of our Arduino Tutorials. The first chapter is here, the complete series is detailed here.

Introduction

Sooner or later Arduino enthusiasts and beginners alike will come across the MAX7219 IC. And for good reason, it’s a simple and somewhat inexpensive method of controlling 64 LEDs in either matrix or numeric display form. Furthermore they can be chained together to control two or more units for even more LEDs. Overall – they’re a lot of fun and can also be quite useful, so let’s get started.

Here’s an example of a MAX7219 and another IC which is a functional equivalent, the AS1107 from Austria Microsystems. You might not see the AS1107 around much, but it can be cheaper – so don’t be afraid to use that instead:

MAX7219 AS1107

 At first glance you may think that it takes a lot of real estate, but it saves some as well. As mentioned earlier, the MAX7219 can completely control 64 individual LEDs – including maintaining equal brightness, and allowing you to adjust the brightness of the LEDs either with hardware or software (or both). It can refresh the LEDs at around 800 Hz, so no more flickering, uneven LED displays.

You can even switch the display off for power saving mode, and still send it data while it is off. And another good thing – when powered up, it keeps the LEDs off, so no wacky displays for the first seconds of operation. For more technical information, here is the data sheet: MAX7219.pdf. Now to put it to work for us – we’ll demonstrate using one or more 8 x 8 LED matrix displays, as well as 8 digits of 7-segment LED numbers.

Before continuing, download and install the LedControl Arduino library as it is essential for using the MAX7219.

Controlling LED matrix displays with the MAX7219

First of all, let’s examine the hardware side of things. Here is the pinout diagram for the MAX7219:

MAX7219 pinout

The MAX7219 drives eight LEDs at a time, and by rapidly switching banks of eight your eyes don’t see the changes. Wiring up a matrix is very simple – if you have a common matrix with the following schematic:

LED matrix pinoutsconnect the MAX7219 pins labelled DP, A~F to the row pins respectively, and the MAX7219 pins labelled DIG0~7 to the column pins respectively. A total example circuit with the above matrix  is as follows:

MAX7219 example LED matrix circuit

The circuit is quite straight forward, except we have a resistor between 5V and MAX7219 pin 18. The MAX7219 is a constant-current LED driver, and the value of the resistor is used to set the current flow to the LEDs. Have a look at table eleven on page eleven of the data sheet:

MAX7219 resistor tableYou’ll need to know the voltage and forward current for your LED matrix or numeric display, then match the value on the table. E.g. if you have a 2V 20 mA LED, your resistor value will be 28kΩ (the values are in kΩ). Finally, the MAX7219 serial in, load and clock pins will go to Arduino digital pins which are specified in the sketch. We’ll get to that in the moment, but before that let’s return to the matrix modules.

In the last few months there has been a proliferation of inexpensive kits that contain a MAX7219 or equivalent, and an LED matrix. These are great for experimenting with and can save you a lot of work – some examples of which are shown below:

MAX7219 LED matrix modules

At the top is an example from tronixlabs.com, and the pair on the bottom are the units from a recent kit review. We’ll use these for our demonstrations as well.

Now for the sketch. You need the following two lines at the beginning of the sketch:

The first pulls in the library, and the second line sets up an instance to control. The four parameters are as follows:

  1. the digital pin connected to pin 1 of the MAX7219 (“data in”)
  2. the digital pin connected to pin 13 of the MAX7219 (“CLK or clock”)
  3. the digital pin connected to pin 12 of the MAX7219 (“LOAD”)
  4. The number of MAX7219s connected.

If you have more than one MAX7219, connect the DOUT (“data out”) pin of the first MAX7219 to pin 1 of the second, and so on. However the CLK and LOAD pins are all connected in parallel and then back to the Arduino.

Next, two more vital functions that you’d normally put in void setup():

The first line above turns the LEDs connected to the MAX7219 on. If you set TRUE, you can send data to the MAX7219 but the LEDs will stay off. The second line adjusts the brightness of the LEDs in sixteen stages. For both of those functions (and all others from the LedControl) the first parameter is the number of the MAX7219 connected. If you have one, the parameter is zero… for two MAX7219s, it’s 1 and so on.

Finally, to turn an individual LED in the matrix on or off, use:

which turns on an LED positioned at col, row connected to MAX7219 #1. Change TRUE to FALSE to turn it off. These functions are demonstrated in the following sketch:

And a quick video of the results:

How about controlling two MAX7219s? Or more? The hardware modifications are easy – connect the serial data out pin from your first MAX7219 to the data in pin on the second (and so on), and the LOAD and CLOCK pins from the first MAX7219 connect to the second (and so on). You will of course still need the 5V, GND, resistor, capacitors etc. for the second and subsequent MAX7219.

You will also need to make a few changes in your sketch. The first is to tell it how many MAX7219s you’re using in the following line:

by replacing X with the quantity. Then whenever you’re using  a MAX7219 function, replace the (previously used) zero with the number of the MAX7219 you wish to address. They are numbered from zero upwards, with the MAX7219 directly connected to the Arduino as unit zero, then one etc. To demonstrate this, we replicate the previous example but with two MAX7219s:

And again, a quick demonstration:

Another fun use of the MAX7219 and LED matrices is to display scrolling text. For the case of simplicity we’ll use the LedControl library and the two LED matrix modules from the previous examples.

First our example sketch – it is quite long however most of this is due to defining the characters for each letter of the alphabet and so on. We’ll explain it at the other end!

The pertinent parts are at the top of the sketch – the following line sets the number of MAX7219s in the hardware:

The following can be adjusted to change the speed of text scrolling:

… then place the text to scroll in the following (for example):

Finally – to scroll the text on demand, use the following:

You can then incorporate the code into your own sketches. And a video of the example sketch in action:

Although we used the LedControl library, there are many others out there for scrolling text. One interesting example is Parola  – which is incredibly customisable.

Controlling LED numeric displays with the MAX7219

Using the MAX7219 and the LedControl library you can also drive numeric LED displays – up to eight digits from the one MAX7219. This gives you the ability to make various numeric displays that are clear to read and easy to control. When shopping around for numeric LED displays, make sure you have the common-cathode type.

Connecting numeric displays is quite simple, consider the following schematic which should appear familiar by now:

MAX7219 7-segment schematic

The schematic shows the connections for modules or groups of up to eight digits. Each digit’s A~F and dp (decimal point) anodes connect together to the MAX7219, and each digit’s cathode connects in order as well. The MAX7219 will display each digit in turn by using one cathode at a time. Of course if you want more than eight digits, connect another MAX7219 just as we did with the LED matrices previously.

The required code in the sketch is identical to the LED matrix code, however to display individual digits we use:

where A is the MAX7219 we’re using, B is the digit to use (from a possible 0 to 7), C is the digit to display (0~9… if you use 10~15 it will display A~F respectively) and D is false/true (digit on or off). You can also send basic characters such as a dash “-” with the following:

Now let’s put together an example of eight digits:

and the sketch in action:

Conclusion

We have only scratched the surface of what is possible with the MAX7219 and compatible parts. They’re loads of fun and quite useful as well. And finally a plug for our own store – tronixlabs.com – which along with being Australia’s #1 Adafruit distributor, also offers a growing range and Australia’s best value for supported hobbyist electronics from DFRobot, Freetronics, Seeedstudio and much much more.

visit tronixlabs.com

Posted in arduino, as1107, COM-09622, LED matrix, lesson, max7219, part review, tronixlabs, tronixstuff, tutorial

Initial Review – Goldilocks Arduino-compatible with ATmega1284P

Introduction

In March this year we discussed a project by Phillip Stevens to crowd-fund an Arduino-compatible board with an ATmega1284p microcontroller – the “Goldilocks”. After being funded at a rapid rate, and subjected to some community feedback – the boards have now been manufactured and delivered to those who pledged. If you missed out – there’s some more available for direct sales. We ordered five and now have them for the subject of this review – and two to give away. So let’s examine the board and see what’s new.

What is it?

After hitting the limits of the Arduino Uno with respect to SRAM, CPU speed and not wanting to lose compatibility with existing projects by changing platforms, Philip decided to shift the MCU up to the ATmega1284P. This offers eight times the SRAM, four times the flash memory and EEPROM – and is also clocked at 20 MHz instead of the usual 16 MHz on Unos, etc. After the original design was announced, it was the victim of some pretty heavy feature-creep – however with Freetronics as the manufacturing partner the final result is a nicely-finished product:

freetronics goldilocks

Now let’s rip open the packaging and examine the board in greater detail. From the images below you can get the gist of things… starting with the top you can see the ATmega1284P next to the microSD card socket. There’s a JTAG connector for the 1284P on its left – and below that a 32.768 kHz crystal for RTC use. And like other Freetronics boards a large prototyping area has been squeezed in below pins D0~7 that also has the power and I2C lines at the edge. Furthermore note that all I/O pins are brought out to separate holes in alignment with the header sockets. And my favourite – a switch-mode power supply circuit that can offer up to 2A of current – great for GSM shields.

freetronics goldilocks top

Another point of interest is the ATmega32U2 microcontroller which is for USB duties – however it can be used as a separate “board” on its own, with a separate reset button, ICSP breakout and the ports are broken out logically:

freetronics goldilocks atmega32u2

Furthermore the 32U2’s SPI bus can be wired over to the main 1284P to allow communication between the two – simply by bridging the provided pads on the PCB you can join them. Also on the bottom you can see how each I/O pin can be disconnected from the I/O areas and thus diverted if necessary. It really is a testament to the design that so much of the board is customisable, and this attention to detail makes it stand apart from the usual Arduino-compatibles out there.

freetronics goldilocks bottom

One thing that did strike me was the retina-burning intensity of the onboard LEDs – however you can disable them by cutting the provided track on the PCB. For a complete explanation of the hardware side of things, check out the user guide.

Using the Goldilocks

One of the main goals was to be Arduino Uno R3-compatible, and from initial examination this is certainly the case. However there are a couple of differences, which you can find out more about in the user guide. This is not the first board for an Arduino user, but something chosen after getting some experience. Installation was very easy, it should be plug-and-play for the non-Windows crowd. However if you’re part of the silent majority of Windows users then the required U2duino Programmer.inf file for the Device Manager will be found in the production_firmware folder of the software download available on the product page. Furthermore no matter your OS – don’t forget to install the Arduino IDE Goldilocks board profile.

Before getting too excited and uploading your sketches, you can examine the the ATmega1284p bootloader monitor which allows for memory dumps, port testing, and more. Simply connect up your board, load the Arduino IDE, select the board and COM: port then open the Serial Monitor. By sending “!!!” after a board reset, a simple menu appears – which is shown in the following video:

Now for a quick speed test. We’ll use a sketch written by Steve Curd from the Arduino forum. It calculates Newton Approximation for pi using an infinite series:

The Goldilocks was compared with a standard Arduino Uno, with the following results (click image to enlarge):

goldilocks Uno speed test

 As you can see from the results below, the Goldilocks theoretical extra 4 Mhz of speed is shown in the elapsed time between the two boards – 4433 ms for the Goldilocks vs. 5562 ms for the Uno, a 25.4% increase. Looking good. We’ll leave it for now – however for more information you can review the complete user manual, and also discuss Goldilocks in the Freetronics customer forum.

Competition

Two of our twitter followers will be randomly selected on the 14th of September, and will each receive one Goldilocks board. So follow us on @tronixstuff for a chance to win a board, and also keep up with news, new articles and items of interest. Board will be delivered by Australia Post standard air mail. We’re not responsible for customs or import duties, VAT, GST, import duty, postage delays, non-delivery or whatever walls your country puts up against receiving inbound mail.

Conclusion

The Goldilocks is the board that can solve many problems – especially when you’ve outgrown your Uno or similar board. We look forward to using it with larger projects that burn up SRAM and exploring the possibilities of using the two microcontrollers at once. There’s a whole bundle of potential – so congratulations to Phillip Stevens, Freetronics and all those who pledge to the funding and supported the project in general. And to join in – you can get your own from Freetronics. Full-sized images are on flickr. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

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, atmega1284p, atmel, freetronics, review, tronixstuff

Review – Maxim MAX7219 LED Display Driver IC

[Updated 16/052013]

[After this article, check out our examination of real and fake MAX7219s]

In this article we are going to examine the Maxim MAX7219 LED display driver IC***. The reason for doing so is to show you how something that used to be quite complex can be made very simple – and that is what all this technology is for, isn’t it?

*** There is another IC from Austria Microsystems – the AS1107, which is drop-in compatible with the MAX7219, and can be cheaper. So shop around!

If you have ever tried to control lots of LEDs, or more than two or three 7-segment displays, or even an LED matrix, you realise that there is quite a lot of work to do on the software and hardware side of things. It usually involves lots of shift registers, switching transistors, and some nifty coding to get everything working. And then your code is too large, so the resulting display scans slow enough to see it flicker, etc.

Not any more! The MAX7219 combined with a great library (well for Arduino anyway) solves all the headaches in no time. After using it for the first time today I was briefly angry for not finding out about it sooner… better late than never. First of all, let’s have a look:

max7219sm

Yes, at first glance you may think that it takes a lot of real estate, but it saves some as well. This chip can completely control 64 individual LEDs, including maintaining equal brightness, and allowing you to adjust the brightness of the LEDs either with hardware or software (or both). It can refresh the LEDs at around 800 Hz, so no more flickering, uneven LED displays. You can even switch the display off for power saving mode, and still send it data while it is off. And another good thing – when powered up, it keeps the LEDs off, so no wacky displays for the first seconds of operation.

For more technical information, here is the data sheet: MAX7219.pdf. Now to put it to work for us – this article will demonstrate using an 8 x 8 LED matrix, as well as 8 digits of 7-segment LED numbers. First of all, let’s examine the hardware side of things. Here is the pinout diagram for the IC:

7219pinouts

At this point I should mention it is designed for common-cathode display systems. One example would be an LED matrix, such as:

Another example is a multi-digit 7-segment LED module – current flows in through the anode pins, and each digit is illuminated only when its cathode is connected to ground. Such as this unit:

4dig7segsmall

It has input pins for each of the eight LED elements, and four cathode pins, one for each digit. We can use two of these displays with the MAX7219 very easily, as you will see below. An example circuit to demonstrate using the matrix is below. Note the lack of resistors and transistors:

matrixschematic2

When using with (for example) an Arduino-type board, you would connect serial data in, clock, and load to three digital pins. The resistor is the hardware control via limiting current to the LEDs. My examples use a 1k0 1/4-watt value. If you are going to experiment with this value, refer to page 10 of the data sheet first. Furthermore, ensure the ground of the MAX7219 is connected to the ground of the microcontroller. The capacitors are used to reduce supply current ripple. And here is the demonstration circuit on the breadboard:

matrixbbsm

In the above photo, the five wires on the left are connected to the Arduino board (5V, GND, load, clock, data). The two wires from the terminal block head to a 5v power supply.

Now it is time to examine the software aspect, or how to control the MAX7219. My knowledge of microcontrollers is currently only Arduino, so we will use that for this review. Thankfully there is an excellent library that has been specifically written for the MAX7219 – the LedControl library. You will need to download and install the library from the LedControl page. If you need guidance on installing a library, please visit here.

The author has done a marvellous job of documenting his library, so I will briefly describe the basic functions you need to get things blinking. Here is a very basic demonstration sketch:

Using the lc.setLed() saves a lot of code, as the chip will hold the display on until it is told otherwise, you don’t need to program in a delay loop. You can just enter X and Y coordinates for the LED to switch on. To switch off the display to save power, use lc.shutdown(0, true); – replace true with false to switch it back on again. The video clip below is more of a detailed demonstration, using the schematic above, and this sketch:

Notice how altering the brightness up and down causes a nice “breathing” affect. However, don’t run that type of thing for too long, the MAX7219 does warm up nicely after about ten minutes of running all LEDs at once at full brightness…

Now it is time to examine how the MAX7219 deals with seven-segment LED display modules. It can handle up to eight digits, so I have two four-digit display modules to use. The anodes will be connected, so they behave as one single eight -digit unit. Here is the schematic:

7segschematic

And here is the demonstration circuit on the breadboard:

7segbbsm

Now to examine the functions to control these displays. Once again, be sure to have the LedControl library as used with the matrix. Here is another simple sketch:

Once again, the use of the LedControl library certainly makes things easier. The difference between setChar() and setDigit is that the former can also write A~F, space, and a few other letters that are legible when used with a 7-segment display. Here is a video of the above sketch in action:

As you can see, driving all those LED digits is now a piece of cake. To think twenty years ago we used to muck about with various 4000-series ICs, decimal to BCD converters and so on. The MAX7219 just does it all. Now that I have learned how to make a nice huge display – there is only one thing to do… make another clock! It uses an Arduino board, and my RTC shield. Here is the sketch: maxclock.pdf, and the clock in action:

Well that’s enough blinkiness for now, I could spend a week making displays with the MAX7219. In all honesty, I can say that it makes life exponentially easier when trying to control more than one LED with a microcontroller. Therefore it really is highly recommended. So have fun!

If you found this article interesting, you would also enjoy the reviews of TM1638 and TM1640 LED display modules.

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, as1107, COM-09622, lesson, max7219, part review, tutorial

Part review – NXP 74HC4066 Quad bilateral switch IC

Hello readers!

Today we are going to examine the 74HC4066 quad bilateral switch IC. My reason for writing this comes from a comment left by a reader on chapter nine of the Arduino tutorial. They suggested using a 4066 IC to control the cathodes of the LED matrix instead of resistors and NPN transistors. This was a good suggestion, however the 4066 can only switch a current of 10mA per pin. Luckily the 74HC4066 can handle up to 25mA per switch – so we’ll look into this instead.

First of all, let’s say hello:

74hc4066

This is the 14-pin DIP package. It is also available in surface mount, and other newer package styles. Although we are looking at an example from NXP, according to my main component supplier (element-14/Newark) this IC is also manufactured by Texas Instruments, ON Semi, ST Microelectronics and Fairchild. So, what is a quad-bilateral switch? Four switches in one IC. Here is a diagram:

Imagine a simple normally-open push button. You press the button, and current can flow through the switch. Using the 74HC4066, when current is applied to the E pin, current can pass through from the matching Y pin to the Z pin. As you can see above, there are four of these switches in the IC. This is where the benefit of the IC comes to mind, normally one might use a 1k ohm resistor and an NPN switching transistor as an electronic switch, and I have done so myself. But when you need a few of them, it can be easier to start using these 74HC4066s as long as the current requirements are met.

With regards to the current the IC can switch, Is, the maximum is 25mA per switch. This is more than enough to run a typical LED, TTL logic gate, etc. The other interesting parameter is the turn-on and turn off times – at 6 volts it can turn on in around 10 nanoseconds and turn off at around 13 nanoseconds (so a rough calculation – say it takes 30 nanoseconds to switch on and then switch off, that’s 33.3 million times per seconds (33.3 MHz). All these parameters and more are available from the data sheet (pdf). Someone correct me if I’m wrong!

That’s enough theory – let’s put it to work now. Our first demonstration is quite simple – just switch on and off some LEDs via a 74HC595 shift register and an Arduino. We send a number (0, 1, 2, 4, 8 ) to the shift register, which stays off, then sets pins Q0, Q1, Q2, Q3 high in order, which in turn activate the switches 1~4 on the 74HC4066. The 74HC4066 sends a current to each LED connected to the switch outputs.

Here is the schematic:

demo1schematicsmall1

Laid out on the breadboard:

demo1small

And the ubiquitous video:

And here is the Arduino sketch: demo1.pdf. Well that was interesting. I know these simple demonstrations may be… well a little simple, but after taking the time to build them from scratch you get a better understanding of the part and how they work. Practice makes perfect and all that. Anyhow, let’s have a look at something much more interesting – a very basic (!) digital to analogue converter. Consider the circuit below:

demo2schematic

The 74HC4066 switches creates a final voltage through the sum of various currents being switched into the final output. First of all, here is a video of the switches being turned on and off one at a time:

and the corresponding Arduino sketch:demo2.pdf. The next video shows the results of sending decimal numbers 0~15 to the shift register – in effect continually adding the outputs of the pins until all pins are on, then in reverse:

and the corresponding Ardiono sketch:demo3.pdf.

Well I hope you found this part review interesting, and helped you think of something new to make. In conclusion I would consider the 74HC4066 easier and quicker for end user to use in projects (less pins to solder, etc) however using it could cost more depending on the volume required. Furthermore, this would only apply if the current restrictions of the IC are met.

So 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.

Notes: In writing this post, I used information from NXP, plus information and circuit inspiration from various books by Forrest Mims III.

Posted in 4066, 74HC4066, lesson, part review, tutorialComments (24)

Part review – Sparkfun Arduino protoshield kit

Hello readers

Today we are going to look at another Arduino protoshield kit, this time one manufactured for Sparkfun. The reason to use such a thing is to enable extra hardware of your choice to be connected easily to your Arduino board. In the past I have detailed other shields, for example an LCD module, a real-time clock, and a microSD shield. However now I have another brand of shield, so let’s take it for a drive and see what happens.

Once again, this shield is a product of the minimalist-packaging school – arriving in just a plastic bag:

bagsmall

These days that is perfectly acceptable, as long as something is safe there’s no need for overpackaging. Not a slip of instructions were to be found, and a quick look at the website only had a link to a third-party tutorial and the shield schematic (pdf). The circuitry is quite simple so nothing more is necessary for construction. So with the schematic on the screen it was time to solder. First thing is to match the included parts with the schematic:

partssmall

Considering the price of this kit, I would have expected some pins as well as header sockets – not everyone wants to stack another shield on top. However the PCB is the thickest I have ever seen. The first thing to solder in were the buttons:

buttonsinsmall

Next were the three resistors. There are two 330 ohm to reduce the current to the LEDs and one 10k ohm for the button. The silk-screening has the values on the board, so you can place them effortlessly:

solderresistorssmall

Next are the two 0.1uF ceramic capacitors – they act to smooth the power supply. They are not marked on the board, only little rectangles. So here is a photo of where they should be:

capsinsmall

And finally the LEDs. Make sure to line up the flat edge of the LED (the cathode) with the image of the LED on the board. Try and get the LED flush with the PCB, and bend the legs in alternate directions to keep the LED flush while you are soldering it:

solderledssmall

The included LEDs are 5mm yellow, so you have the opportunity to change the colour if need be. If you are going to add your own circuitry, you might want to do that before soldering in the header sockets. You could also drop in a micro-breadboard instead. When it comes time to solder in the stacking headers  – insert them into your shield, put another shield on top to keep the sockets aligned, then solder them in:

testsocketsmall1

However at the end of the day it works:

finishedsmall

There you have it – one Arduino protoshield ready for action. If you look at the top-right of the board, you will notice pinouts that are custom-made for the Bluesmirf wireless serial bluetooth devices.

In general this shield is adequate. There is room for a few improvements, for example nothing on the bottom is labelled, which can be an issue if your eyesight or memory is poor. And considering the price of the board (US$16.95++) it should have included both header pins and sockets, and perhaps even have been assembled except for the headers. But thankfully there are other options to select from. Compared to my personal preference (the Freetronics protoshield), this protoshield from Sparkfun could use some improvement. Perhaps version three ? Only time will tell. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

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.

[Note – this kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

Posted in arduino, DEV-07914, part reviewComments (0)

Part Review – Freetronics TwentyTen “Duemiladieci”

This board has now been superseded by the Freetronics Eleven, however I’ve left the review here so you can see the evolution of the product.

Hello readers

Today we are going to examine the Freetronics “2010” (Duemiladieci in Italian). This is a 100% Arduino Duemilanove-compatible board with some very neat enhancements. It was conceived by two Arduino experts here in Australia, Jon Oxer (co-author of the fascinating book “Practical Arduino“) and Marc Alexander. These two gentleman have formed Freetronics to help people build the projects detailed in the Practical Arduino book, assist people in releasing their hardware designs and generally help accelerate the open-source hardware movement. But for now, back to the 2010. First of all, let’s have a look:

bothsmall

At first glance you may think “oh, just another Arduino clone”. Not so, however it is 100% compatible with the Arduino Duemilanove, so you can use the 2010 without any modification. Nevertheless upon closer inspection there are several small and large differences. The first thing to notice is the prototyping area. By doing some clever PCB routing, the designers have made space for a small but handy area for you to add your own circuitry. Here is a close up look:

protofrontsmall

 

protorearsmall

Furthermore the corners have been rounded off, a small but thoughtful modification. The designers have also made the effort to label everything clearly, including the voltage and socket polarity for DC input, very handy for the beginner. And to make life easier, those large copper pads on the rear are for the 5V power and GND, so voltage supply is taken care of for you.

For an example of the prototype area use, check out my DS1307 real-time clock modification! It is obvious that this board has been designed by people who use the Arduino system and not some knock-off manufacturer from eBay. The next visible differences are around the USB socket:

usbx3small

Those four holes are the X3 programming pads, much easier to use than the solder pads on the original Duemilanove. The purpose of these is to allow you to use your 2010 board as an AVR programmer, in order to program the bootloader into the microcontroller. Speaking of which, this is the ATmega328, identical to the Duemilanove’s chip. Next to the X3 pads is a mini-USB socket. In my case I love it, as when making my own shields I often need all the under-shield space I can use. For example:

clearancesmall

And don’t worry about not having the correct USB cable, as one is supplied with the 2010. Subjectively, being one metre long, it could be longer. But you cannot please everyone!

usbcablesmall

Also note that the 2010 board has another mounting hole just behind the DC power socket, which increases stability if used in a more permanent situation. Moving around to the tail end of the 2010, the four LEDs have been placed here – allowing them to stay visible even with shields on top:

ledssmall

The power LED is a nice blue colour as well, TX is yellow, RX is green, and D13 is red. The circuitry for the D13 LED has been modified slightly, it will not come on when digital pin 13 is used as an input. Otherwise, everything else is in the correct, identical position to the Arduino Duemilanove. So all your shields will work, the ICSP (in circuit serial programmer) pins are in the same spot, and the pin current ratings and board input voltage range is identical. The complete specifications can be found here: 2010.pdf. Another TwentyTen user has even over-clocked their board to 22 MHz. Amazing.

In conclusion, this is a board that is faithful to the Arduino design and improves on it. After using this board over the last ten days I can happily say it has worked flawlessly and all my sketches and shields have been compatible with the 2010. If you need another Duemilanove board, I can honestly recommend this one as a product of choice.  And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

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, freetronics, microcontrollers, part reviewComments (2)

Part review – Sparkfun Thumb Joystick

Hello readers

Today we examine an inexpensive yet fascinating little input device – the thumb joystick. Many people would recognise this as similar to the joystick in various types of gaming consoles, and they would be right. Let’s have a look:

joysticksmall

In the image above the joystick has been soldered into the matching breakout board. Unless you are making your own PCBs, you will want the breakout board:

bboard

The joystick consists of two 10k variable resistors, spring-loaded with centre return; also a SPST button that is activated by pushing down on the joystick:

joysticksidesmall

In order to use this joystick, we need an idea of the values that it can return. I have done this in three ways:

First of all, I connected a multimeter and measured the resistance of each axis. For the vertical axis, dead centre was 3.77k ohms, maximum up was 4.7k, with a maximum of 5.9k between centre and maximum – very odd. The vertical minimum was 83 ohms. For the horizontal, dead centre was  around 3.73k ohms, full left was 4.78k, via 5.38k; full right was 180 ohms without any odd high values in between. However, those values didn’t feel right.

Secondly,  I have recorded a visual representation of the horizontal and vertical axes’ effect on the supply voltage, using my little oscilloscope. With regards to the following two video clips, the supply voltage is 5V; the ‘scope display is set to 1V/division, with 0V at the bottom of the screen.

The horizontal axis:

and the vertical axis:

Finally, I connected the horizontal and vertical output to  analog inputs on my Arduino, and used analogRead() to see how the joystick returned analogRead() values. The following video clip demonstrates this using an LCD to display the values. Furthermore, here is the sketch used for the following demonstration: demo sketch.pdf

It would seem that there is a lot of ‘dead area’… postions where there is no change in reading, where one would assume there to be a change. Again, this can be programmed out in your sketch by a little calibration and measurement.

Now we know what values it returns, we can start to understand how to control things. When it comes to use the joystick in your own projects, it would pay to recreate a measurement circuit and note down the values your joystick returns; in order to be able to calibrate your software to use the joystick appropriately you may need to compensate for the hardware irregularities of the joystick.

Overall however, it is an interesting and easy product to integrate into your projects. This post today is just an introduction, later on the joysticks will be used in other projects and so on. High resolution photos are available on flickr. And if you enjoy my tutorials, or want to introduce someone else to the interesting world of Arduino – check out my new book “Arduino Workshop” from No Starch Press.

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, BOB-09110, COM-09032, lesson, part review, thumb joystick, tutorialComments (11)

Part review – Batsocks Tellymate Arduino Shield

Hello readers

Every once in a while you have an idea for something that is quite simple in theory, yet complex to implement. Once example of this in my opinion is getting information from your Arduino to the outside world. Sure you can use an LCD, lots of LEDs, use a servo as an analogue meter, etc., but one of the best ways would be to a simple video monitor or TV. Imagine the possibilities that are available if your Arduino project could display data on a simple television screen – suddenly you could commercialise  projects and/or really have some fun.

Well now this is all possible with the Batsocks Tellymate Arduino shield! Sweet. Let’s check it out:

tellymatesmall

 

The developers have really made this simple. You just connect it like any other shield, run the included cable from the shield’s socket to the “video in” on the TV or monitor. The shield uses digital pins 0 and 1. There are also seven hard-wired jumpers that you can use to select carriage return attributes, PAL/NTSC output, and so on:

jumperssmall

 

From a software point of view, it is also quite simple to use. Just insert Serial.begin(57600); into void setup(); and you’re away. Just use Serial.write(); or Serial.print(); and it will send the data off to the TV. It can support a resolution of 25 rows by 38 columns. Not the greatest, but for the price it does what it is designed to do. For normal use it supports the characters from code page 437, which for the older readers will look very familiar.

Sending other commands to the Tellymate is done with codes sent to it. For example, to clear the screen is ” E”. But that is not the command. Thankfully the manufacturer’s website has a detailed range of instructions and examples that you can work with to make the most out of it. Personally I just printed out the pages and made my own reference manual, which works well.

To get you up and running quickly, here is a brief sketch that is quite easy to follow. It is the temperature logger sketch from my Arduino tutorial modified to display via the Tellymate. Here is the sketch: sketch.pdf, and a video of it operating.

Unfortunately it is difficult to record the display as we  have a CRT television, but I hope you get the idea. My next example is to recreate the binary quiz game from Chapter Five of my Arduino tutorial. Again, not too difficult. The main caveat is (as usual) to plan before programming. And this proved to be a better rendition of the game – here is the sketch:

… and some screen shots:

sketch2asmall

 

sketch2bsmall

 

sketch2csmall

sketch2dsmall

sketch2esmall

And the video:

As you can see it is quite versatile with normal text and characters. Considering it costs under US$40, the Tellymate is quite the problem-solver. You can also define your own characters, for example to create your own symbols or game characters. Furthermore, larger fonts sizes are available (double height and width) and they can mix on the same screen with regular-sized characters. So now you have a better understanding of the Tellymate. High resolution photos are available on flickr. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

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.

[Note – this product was purchased by myself personally and reviewed without notifying the manufacturer]

Posted in arduino, batsocks, part review, product review, tellymateComments (0)

Part Review – Peter H. Anderson Serial LCD Controllers

Peter Anderson (now deceased) no longer offers his parts to those of us outside of the USA.

Posted in arduino, LCD, part review, phanderson, picaxe, serial LCDComments (0)

Part review – Linear Technology LT1302 DC/DC step-up converter

In today’s part review, we have a look at the Linear Technology LT1302. This is a fascinating part as it can increase a supply voltage and still maintain a reasonable current. For example, with a supply voltage of 2 volts the LT1302 can give you 5V at 600 mA or 12V at 150 mA. That’s pretty awesome, and can save you a lot of space when designing products, such as reducing the number of cells required in a battery pack. One example of such a product is the very popular mintyboost battery pack booster by Limor Fried.

But first as usual, let’s say hello…

There are two versions of this part, the LT1302 which allows a variable output; and the LT1302-5, with a fixed output voltage of 5.05V to 4.97V in high current mode.

How does it seem to make something out of nothing? With a few external components that are used to store electrical charge, and some internal oscillators. The chip can be sensitive to noisy input supply voltages, so there is a need for the capacitor C1 to be very close to the LT1302. Also, the diode must be a 2A schottky and not a regular one like a 1N4001, as they cannot react fast enough to the switching of the LT1302. The purpose of the oscillations is to allow the inductor to fill with current, and on the alternate oscillation cycle, it releases that current into a capacitor via the diode, and the voltage of this current is higher than the supply voltage. This is a very basic explanation, and more details can be found in the data sheet (link below).

But as always, it’s more interesting to do something than read about it – so we’ve constructed the demonstration circuit from the data sheet (below).

demoschematic

And here it is:

With an input supply voltage of 2 x 1.5V AA alkaline cells, our output voltage is 5.06V. This should be good for 600mA.

Finally, here is the very interesting and detailed data sheet: LT1302 data sheet. So there you have it! Another simple, useful and easy to implement part for you to use in your projects.

Thank you to Linear Technology for the samples of the LT1302 integrated circuits.

Once again,  thank you for reading. Please leave feedback and constructive criticism or comments at your leisure… and to keep track, subscribe using the services at the top right of this page!

Posted in lesson, LT1302, part review, tutorialComments (13)

Part Review – Intersil ICL7660

Hello readers

Today we are going to quickly examine a very simple yet useful part – the Intersil ICL7660 CMOS voltage converter. Huh? This is the part you have been looking for when you needed -5V and you’re not running off a multi-tap transformer. For example, some old-school TTL electronics projects need +/-5VDC power rails. Or if you are using the ICL7107 analogue to digital/3.5-digit display driver IC (as used in my defunct bbboost project).

But first of all, let’s say hello:

icl7660small

To do so with the ICl7660 is very simple, you only need two 10uF electrolytic capacitors! Honestly, I couldn’t believe my luck when I discovered this part, that is why I am writing about it today.

Firstly, how does it work? A very simple definition would be: the 7660 charges one capacitor, then the other – an oscillator controls the charging cycles between C1 and C2 and inverts the polarity, allowing the capacitors to discharge at an inverted voltage (negative instead of positive). For a more detailed explanation, have a loot at the data sheet. Furthermore, if the oscillation frequency interferes with other parts of your circuit, you can boost the oscillation rate with the use of a NAND gate, from an external logic IC (4011, etc.)

However due to the oscillations, there is a ripple in the supplied -5V. I only wish I had an oscilloscope to show you this, perhaps next month. In the meanwhile, there is an explanation of this in the data sheet.

At this stage, let’s have a quick look at an example circuit, from the data sheet – figure 13A.

7660circuit

And here it is in real life. The circuit on the breadboard to the left is my simple 12VAC > 5VDC converter. I am not that well off at the moment, so it will have to do.

7660circuitrealsmall

So there you have it  – a very easy and cheap way to get yourself -5 volts DC. Some information from this review obtained from Intersil website and the ICL7660 data sheet; these parts purchased by myself without knowledge of manufacturers or retailers.

Once again,  thank you for reading. Please leave feedback and constructive criticism or comments at your leisure… and to keep track, subscribe using the services at the top right of this page!

Posted in ICL7660, lesson, part review, tutorialComments (2)

Part review – The LM3914 Dot/Bar Display Driver

Today we’re going to have a look at an old favourite, the LM3914 Dot/Bar Display Driver. The LM3914 can measure analogue voltage levels and convert that reading to a display of ten LEDs in bar or dot format. By no means is this a new or fantastic product, but for the enthusiast and experimenter it has several qualities that make it attractive…

These qualities include:

  • price – it’s cheap, less than $2
  • It can interface with TTL or CMOS logic
  • You can throw up to +/-35V at the inputs
  • each LED can draw up to 10mA
  • you can daisy chain 2 or more LM3914s to make one heck of an LED meter display
  • you can use a supply voltage between 3 and 25V DC

So it is very forgiving and can produce some fun and useful displays. But first, let’s say hello…

 

lm3914_small

The basic workings of the LM3914 are quite simple and ingenious. It has a ten step voltage divider and an adjustable voltage reference. This means our IC can act as a basic voltmeter, using ten or multiples of ten (each with another LM3914) LEDs to display the result. The resistors R1 and R2 work as a voltage divider, and the voltage across R2 is the range of which the meter will display. For example, if your voltage across R2 is 1.2V, with the difference “displayed” between LEDs 1 and 10 will be ~1.2V. For more information, please see the data sheet (below).

Anyhow, what are we waiting for? Let’s make a voltmeter, that can measure between 0 and ~5V DC using the following example from the data sheet.

lm3914voltmeter

That doesn’t look to difficult… will use a 9V PP3 battery for a supply. I have some nifty little LED bar graph modules to use, which will look nice and save time. For a test input signal, I have used an LM317T on a separate board as a variable signal source.

lm3914test_small

lm317tsmall

The LM317T has a minimum output voltage in this case of 1.28V and the highest it could generate using a 6.4V source (4 x AA cells) was 5.25v. So when you view the clip below, that is the minimum and maximum sample voltage we used. The LM3914 circuit is meant to measure voltages between 0 and 5V. Let’s see how the demonstration circuit behaved in the following clip. Note that to set the mode from bar to dot requires removing the connection between pin 9 and Vs, s we do this then repeat the voltage range measurement in the second half of the clip. No audio in clip.

Notes: In writing this post, I used information from National Semiconductor, and information from old books by Forrest Mims III. Thank you! More specific manufacturer information from National Semiconductor can be found on their website, or download their data sheet. National Semiconductor LM3914

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 lesson, LM3914, part review, tutorialComments (4)

Part review – The 555 Precision Timer

This post has been revised and republished. Please click here to read the new 555 article. Thank you!

Posted in 555, lesson, part review, tutorialComments (2)


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: