Tag Archive | "mobile will"

Time for another kit review, and in this instalment we’ve received some LED matrix modules and a matching Arduino-compatible controller board from friedcircuits.us. Behind the name is William Garrido – who some of you may know as “mobile will” from following his blog. Over time William has created a range of small and useful products, which are now available on the tindie online store.

The system comprises of two modules. The first is a small Arduino-compatible board with an ATmega328P microcontroller – the LED matrix master. It’s quite small and is designed to be the start of a chain of matching LED matrix link boards. Each of these holds an 8×8 LED matrix and is controlled by the AS1107 LED driver IC. This is a direct replacement IC for the popular MAX7219, works exactly the same and is a great find instead of using knock-off MAX7219s. You can chain up to 8 matrix modules from the one controller. We received a matrix master and two matrix link boards to examine, which arrived in solid packaging a fun Tindie sticker:

Assembly

All the surface-mount soldering is done in advance, leaving you with some simple through-hole soldering for the LED matrix and the connectors between each module. The PCBs are clearly labelled with the silk screen and have mounting holes for permanent installations:

So after a few minutes of soldering it’s time to get the blinking on:

You may have noticed by now that the master board doesn’t have a USB socket, so you’ll need a 5V FTDI cable or a USBasp programmer to upload your Arduino sketches or AVR .hex file to get things moving.

Controlling a matrix or more

As the system is basically an Arduino-compatible with one or more MAX7219-compatible modules you can find all sorts of example sketches to experiment with. If you haven’t used a MAX7219/AS1107 before there are a couple of starting points including the Arduino library and another random tutorial. Using an example sketch on the Arduino forum by member “danigom“, and after checking the data, clock and load pins it was ready to go. Here’s the sketch for your consideration:

unsignedlongc=pgm_read_byte_near(font5x7+((ascii-0x20)*8)+a);// Index into character table to get row data

unsignedlongx=bufferLong[a*2];// Load current scroll buffer

x=x|c;// OR the new character onto end of current

bufferLong[a*2]=x;// Store in buffer

}

bytecount=pgm_read_byte_near(font5x7+((ascii-0x20)*8)+7);// Index into character table for kerning data

for(bytex=0;x<count;x++){

rotateBufferLong();

printBufferLong();

delay(scrollDelay);

}

}

}

// Rotate the buffer

voidrotateBufferLong(){

for(inta=0;a<7;a++){// Loop 7 times for a 5x7 font

unsignedlongx=bufferLong[a*2];// Get low buffer entry

byteb=bitRead(x,31);// Copy high order bit that gets lost in rotation

x=x<<1;// Rotate left one bit

bufferLong[a*2]=x;// Store new low buffer

x=bufferLong[a*2+1];// Get high buffer entry

x=x<<1;// Rotate left one bit

bitWrite(x,0,b);// Store saved bit

bufferLong[a*2+1]=x;// Store new high buffer

}

}

// Display Buffer on LED matrix

voidprintBufferLong(){

for(inta=0;a<7;a++){// Loop 7 times for a 5x7 font

unsignedlongx=bufferLong[a*2+1];// Get high buffer entry

bytey=x;// Mask off first character

lc.setRow(3,a,y);// Send row to relevent MAX7219 chip

x=bufferLong[a*2];// Get low buffer entry

y=(x>>24);// Mask off second character

lc.setRow(2,a,y);// Send row to relevent MAX7219 chip

y=(x>>16);// Mask off third character

lc.setRow(1,a,y);// Send row to relevent MAX7219 chip

y=(x>>8);// Mask off forth character

lc.setRow(0,a,y);// Send row to relevent MAX7219 chip

}

}

In the following video you can see the sketch in action with two and one matrix modules:

Where to from here?

The matrix modules can find a wide range of uses, from simple fun and scrolling text to various LED matrix games, status displays and more. They also work well with the XOBXOB IoT USB-connected example. The design files are available for perusal on the friedcircuits github page. And don’t forget the matrix master board in itself is a tiny Arduino-compatible – with the full eight ADCs and digital I/O pins available. Thus you can embed this in another project if so desired.

Conclusion

The LED matrix modules are simple to use and work well together. Plus the matrix master board makes for a neat little Arduino-compatible as well. For more information and to order, visit the friedcircuits.us website. 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 twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.

[Note – kits reviewed were a promotional consideration from friedcircuits]