At A Glance Main Projects Tutorials Resume

Contact


Email: palen1c at gmail.com



Learning Electronics With Jake


LED Matricies going nuts.

I get to work with some pretty creative and talented people. A lot of the projects we work on require a lot of extra effort outside of the normal working hours. One of my co-workers; Jake Frederick mentioned to me that he would like to learn more about electronics. After work for five weeks in March and April 2011 on Thursday nights, Jake learned a lot more about advanced electronics and microcontroller programming. I took a few pictures each week as we went along.

My claim to Jake was that if he picked any device he would like to learn how to control, I'd show him how to do it. Jake choose an LED matrix, and I went about figuring out what parts we needed. Once the parts were in, I put together a prototype, then we worked to put Jake's together.

The Prototype

All the parts for working with the led matrix.
The idea of the prototype was just to get the LED matrix to cycle through all of its colors. Not do anything too complex, just get it working. I originally figured we'd need more juice than USB can supply, so I got a 5v regulator and wall wart, which we really didn't need because in order to make images on the matrix, you can get away with rapidly cycling all the dots in the matrix.

The concept took me a Saturday and Sunday to put together and program. I used the PJRC teensy 2.0 as the platform that Jake would learn how to program microcontrollers on because its compatible with Arduino software and is pretty easy to use when programming it using C.

Here's our list of parts, that I purchased from Sparkfun Electronics:
1 COM-00312 Darlington Pair 8 Channel Driver $1.95
1 COM-00682 LED Matrix - Dual Color - Medium $6.95
1 COM-00107 5v voltage Regulator $1.25
1 TOL-00298 9VDC 650ma Wall Power Supply $5.95
16 COM-08377 330 Ohm Resistor (220 Ideal) $0.25 x 16 = $4.00
1 PRT-10158 Break away headers long $2.95
1 PRT-08025 Hook-up Wire - Gray $2.50

Powering two LED with the darlington pair driver.


As I mentioned, the 5v voltage regulator and Wall Power Supply were not needed.

This is a photo just using the Darlington pair driver to light two LED's.

Week 1

Getting basics out of the way.
The first week we covered a lot of foundational concepts. Jake soldered the break aways headers to his teensy 2.0 in order to make it easily mountable on a breadboard. We went over concepts of using a flux pen, and applying heat to the parts you will be soldering, then applying solder.

A nice clean breadboard so far.
A freak accident occurred with the water solubale flux. We were going to program the microcontroller to make an LED simply blink, and the whole board smoked. The 5v power supply pin had shorted with an IO pin, severing the trace of the 5v line on the teensy 2.0. Together Jake and I probed all around the board with a multimeter to determine if the chip was still good. It was thankfully, so we soldered another wire to the second 5v output on the teensy. Lucky!

Week 2

Using a multimeter to probe the teensy 2.0 and breadboard.
In the second week, the goal was to get the rest of the rest of the breadboard populated for controlling the matrix and start to load code. Due to some makefile mishap it took us forever to get a simple LED blinking, but I think we both learned a lot about troubleshooting.

We got the LED matrix wired up and went over how it was wired, and how to control it. Jake ended up controlling a few of the dots on the matrix through code.

Week 3

Wiring up a LED matrix involves a lot of wires.
This was probably one of the most exciting weeks because we had both of our matrices working side by side by the end of the night! The majority of the time was spent with Jake cutting wires and hooking everything up on his breadboard. Because we had spent the two weeks prior doing fundamental type work, I think he was a lot more confident at what he was hooking up.
More Wiring.


Another challenge this week once the matrix was hooked up, was to transition my microcontroller code to his chips. My prototype was made using a Teensy 2.0++ (Atmel AT90USB1286) and Jake's was a Teensy 2.0 (Atmel ATMEGA32U4), so he had to convert some ports and pins in the code. He managed to do it!

Loading code to control the Matrix onto a teensy 2.0
In this picture he's loading code onto his microcontroller. One of the tips I gave him was to hold his finger on the microcontroller when first starting it up and loading code in an unknown environment. You can normally spot issues really quickly doing this because any IC's will heat up rapidly when hooked up wrong. You can normally save a chip if you remove power from it quickly enough.

Here are the matricies in action.
Once we had to two matrices going, as a thought experiment, I challenged Jake to hook things up slightly differently to replace some of the matrix channels with super-bright LED's. He nailed that challenge again, and we had a light show!




Week 4

Analog input doesnt require much wiring, just programming.
In week four we went back to the basics again. Up to this point, Jake had basically been following my code examples and making modifications. We were going to try and tackle analog input this week! Analog input is a little tricky if you aren't used to doing it because it requires solid understanding of how to configure the microcontroller using the datasheet.
Holding a little Sharp sonar device.


We spent a LOT of time going over the data-sheet and how it translated into setting up analog input in our C code. By gosh by the end of the night we had an analog input that worked with a little sonar and some junk pressure sensors! You can see the values of the input being printed into Windows hyperterminal as they are read from the microcontroller.
Holding a little Sharp sonar device.









Week 5

Look how much fun Jake is having programming!
The final week, Jake spent on his own attempting to interface his microcontroller with a higher level programming environment. He spent a decent chunk of time trying to get a socket server working in C++, but eventually used a Java implementation.

Java Programming in Eclipse.
I spent week 5 modifying my matrix to incorporate three channels of analog input for the pillow from my soft message system project. The matrix was a green, red, and orange matrix, so I made it bias toward showing one color based on how hard the sensor was depressed.



Jakes loading code onto his teensy 2.0
All in all, Jake and I had a lot of fun on this matrix project. My goal was to introduce him to the power of microcontroller programming outside of the Arduino environment as well as some fundamental concepts when working with microcontrollers and simple electronics. Jake's a pretty gifted programmer and artist, so I can't wait to see what advanced projects he'll come up with in the future.

Comments

Ben
Ben
November 30, 2012 10:10 pm

Nice ancient HP laptop.

Comments are currently disabled.


Techno Gumbo RSS Feed

Related Links

Jakes website