Pages: [1]   Go Down
Author Topic: first time multiplexing/charlieplexing for a complete beginner  (Read 1103 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm new to arduino and have only done some
basic projects with LEDs. I'd like to make a small
 heart for Valentines day but I want to understand
The concept of multiplexing fully. I learn by doing
it myself and I'd like to do many trials on breadboard
Before i try anytihing serious. How should i go about
Learning this? Sorry for the formatting. This is from my phone.
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are lots of instructables, blogs, and forum threads about multiplexing and charlieplexing. why not try any of them?

If you have 4 RGB LEDs, you can make a charliplexed spire (leaving 4 leads to control via the arduino) You get to control a total of 12 LEDs (4 red, 4green, 4 blue).

Or if make a small matrix or cube. Whatever you do, start small, once you understand the concept, go bigger (then you will have new problems to solve as you make larger circuits.)
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you know any good resources?
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://arduino.cc/en/Tutorial/HomePage

http://www.instructables.com/tag/type-id/?q=arduino%2C+led&sort=none

http://www.ladyada.net/learn/arduino/

www.google.com
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
This couldn't be your ad.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am looking for a tutorial too. I already found a lot of them, my problem is that they all seem to explain what is happening but I can't figure out how and why it works. Also everytime I tried to fit one of them for my needs (driving a 2x3 matrix with an ATTINY85) the LEDs either stay lit or they are flickering randomly. Any advice?
Logged

There is no blueprint for life, blueprints are for architects!

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Controlling the LEDs is as simple as bringing on pin high, and another pin low, sometimes in software this is represented in 1 (high), and 0(low).  When you multiplex you have rows and columns. Lets say you have a grid of 8 by 8 (64 LEDs). All your cathodes connect in row are connected, and all the anodes in a column are connected, this leaves you with 8 anodes, and 8 cathodes to deal with (instead of 64 anodes and cathodes to deal with).

When multiplexing you only light 1 led at a time, but you can turn many leds on and off very quickly, so that it appears that they are all lit at the same time, this is called persistence of vision.

So, to light a single LED, you turn one anode pin high, and one cathode pin low, this lights one LED, then you pause for a few milliseconds, then turn those pins off,
You repeat this process until you light up whatever pattern you need.

This is how every cube or matrix works.

A 2x3 matrix would require 5 pins from your controller, multiplexing is only saving you 1 pin over controlling the anodes or cathodes independently, so its realistically only practical as an learning example.
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
This couldn't be your ad.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lighting single LEDs works flawless. Now I just need to find out how to put some more "action" into the whole thing.

Quote
A 2x3 matrix would require 5 pins from your controller, multiplexing is only saving you 1 pin over controlling the anodes or cathodes independently, so its realistically only practical as an learning example.

That's true, i've done it that way because an ATTINY85 has only 5 I/O pins. And yes, it is also for learning smiley.
Logged

There is no blueprint for life, blueprints are for architects!

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want more action, then you need to start writing code. start with making one LED light, and all others off, then turn it off, and light the next LED. Do this one by one to each LED until it sequences each LED 1 time.

There is a limit to what you can do with 6 LEDs, but you should be able to learn the basics.
Logged


Pages: [1]   Go Up
Jump to: