Advice needed for Daft Punk helmet project - possible wireless programming

Hi everybody,
I am totally new to Arduino and have been researching it for the past couple of weeks. I am wanting to create a LED matrix display of 5 groups of 8 x 8 LEDs. I am following instructions from Harrison at Volpin Props here:

but I am having some trouble as the Yellowjacket he used is not made anymore and he doesn't go into huge detail about the board interface. I already have his boards, using the MAX7221CWG chip to control each 8 x 8 matrix.

What I would ultimately like to do is have these chips linked to insert Arduino wonder here which allows me to control the matrix wirelessly. What I mean by that is, I want to be able to write code out on my Mac, send it to an app (iOS or Android) and then on my mobile device, use that app to recall these codes and send them wirelessly to the Arduino.

I have found all kinds of different possible solutions around the internet such as the Arduino bluetooth (which seems to have the most promise) and XBee but I cannot quite understand the full end to end components. Both the RedBack (yellowjacket replacement as far as I can tell) and the XBee need separate boards to connect to but the Bluetooth doesn't?

Any guidance would be greatly appreciated.

hi...

Im not sure what the YellowJacket is..

but what boards of his do you have? the MAX7219 chip boards?

Any Arduino can control these MAX chips.. (and there is a nice, easy to use Library for them too: Led Control Lib)

As far as connecting wirelessly...

"I" think bluetooth will probably be the easiest.. as most use serial pins to communicate.

But have you thought about the sending/receiving part?

As in Im assuming the code (patterns) you want to send are going to be big? Where is there Arduino to 'save' this to? is it a stream? and when its done.. the Arduino is 'done' too?

I think you have to read the serial data in one character at a time.....then save/store it somewhere for use?

maybe writing a routine that imports/reads the serial data and saves it to PROGMEM for use?.. once it gets the 'end of packet' character.. it can then start playing/using the new pattern?

or alternately.. maybe work out saving your patterns to an SD card? and read/loading form that instead?

the nice thing is. you only need 3-wires (on the Arduino) for the max chip.. and then you can cascade more max chips whenever you need them.

Maybe you create your 'code/patterns' on you MAC.. save them to an SD card... then use your bluetooth board & mobile phone to cycle through/change the behavior?

Wow, thanks for your help. I never thought of putting the codes onto an SD card and then loading that into the device.

I thought that the Arduino board had some storage on it? It was my understanding that you would use IDE to write your code, then upload it to the board via a USB cable and then the code would run when the board was turned on? Is that not right?

Also, I got some information from SparkFun saying that although Bluetooth is cool for sending stuff to the Arduino, the main problem is that the bluetooth cannot hit the 'reset' on the Arduino. Again, my understanding is that the reset clears the board and allows new code on?

Yes.. that is correct..

it has space for the CODE (32kb?) and it has space for the RAM (2kb?)

the 'code' will be for setting things up and doing things while the Arduino is on, based on inputs/outputs..etc..

Are you actually trying to upload a new SKETCH through bluetooth (or whatever)? or just upload new patterns for the led matrix to do?

(hence the base code would be the same.. and you would need to write a parser/interpreter for the data you want to send..

I suggest looking at the LED CONTROL library.. maybe the setRow() setColumn() function will work..

(and you can send over 8byte data blocks)?

xl97:
maybe writing a routine that imports/reads the serial data and saves it to PROGMEM for use?.. once it gets the 'end of packet' character.. it can then start playing/using the new pattern?

Ummm, I did not think you could overwrite PROGMEM while the AVR is running normal code. It can be rewritten when the flash memory is being programmed (usually via USB). You can read/write to the EEPROM area if your processor has EEPROM memory (the Due for instance does not have EEPROM).

xl97:
or alternately.. maybe work out saving your patterns to an SD card? and read/loading form that instead?

Various projects use the SD card for storage like this.

MichaelMeissner:

xl97:
maybe writing a routine that imports/reads the serial data and saves it to PROGMEM for use?.. once it gets the 'end of packet' character.. it can then start playing/using the new pattern?

Ummm, I did not think you could overwrite PROGMEM while the AVR is running normal code. It can be rewritten when the flash memory is being programmed (usually via USB). You can read/write to the EEPROM area if your processor has EEPROM memory (the Due for instance does not have EEPROM).

xl97:
or alternately.. maybe work out saving your patterns to an SD card? and read/loading form that instead?

Various projects use the SD card for storage like this.

your probably right about PROGMEM..

I was just spitballing ideas to follow up on..

IMHO.. the SD card seems to be the best approach.. VAST amount of pace for patterns/sequences..etc

and a simple bluetooth module to trigger, scroll through the options.

xl97:
Are you actually trying to upload a new SKETCH through bluetooth (or whatever)? or just upload new patterns for the led matrix to do?

Forgive my ignorance but what is a sketch?

xl97:
maybe the setRow() setColumn() function will work..

Yes, I am basically wanting to write out a code to make some patters on the matrix, using code such as setRow. I then want to save this code as a name and then wirelessly fire it over to the Arduino board.

It is so that in theory, you could load in a different LED sequence without having to take the helmet off and hook it up to a computer via a USB cable.

xl97:
IMHO.. the SD card seems to be the best approach.. VAST amount of pace for patterns/sequences..etc

and a simple bluetooth module to trigger, scroll through the options.

I really appreciate all of your ideas. So, with your idea in mind, what hardware would I need to achieve this? I was looking at this:

HI-

a 'sketch' is the full code you upload to your Arduino using the IDE/software..

however.. you would NOT need to keep reloading a new sketch each time.. as all the variables.. and pins used..etc..etc.. all that set-up would most likely remain the same...right?

the only thing you want to do is be able to change/switch the led patterns..

so, IMHO.. the base sketch/code would stay the same.. it would be a generic sketch/code that takes whatever data you using.. parses it.. and applies it to the MAX chips..

I guess I see some 'why' questions.. or things that pop-up when I walk through it.

1.) if you write the patterns on the computer.. and save them to the SD card.. you no longer need the computer.. all patterns are on the SD card..

you can use a button/switch connected to the arduino to change/cycle/loop through these patterns on the SD card.

or

if you really want to be able to send new patterns form the pc to the Arduino..
Im thinking maybe you have to send the data from the PC/mobile device using bluetooth...
the bt module connected to the Arduino will read his data...pass it to the Arduino.. Arduino will parse/read it.. and save it to the SD card for you to use later/when complete?

or

you can save all patterns to SD card using PC...... and only use the bluetooth module as a way to trigger the Arduino to change the patterns (ie: no real sending of led pattern data over the BT module)

IMHO.. the last option is what I'd go for.. probably the easiest.. and less mess with send/parse that data over BT and saving it to SD card.. then reading t back out again, to apply to the MAX chip..

as far as what hardware to get.. not sure. depends on how comfortable you are with things.

being in a helmet... Id probably opt for a smaller Arduino Nano or Pro-Mini..
and get one of those HC-05 Bluetooth modules off Ebay or something.. only around $5.00.. maybe $10.00 if you want the base board too.

then I'd get a little microSD pcb of ebay as well..

these 3 little boards will probably be smaller than the 1 board you linked to. (and fit into the helmet nicer i bet too)

xl97:
a 'sketch' is the full code you upload to your Arduino using the IDE/software..

however.. you would NOT need to keep reloading a new sketch each time.. as all the variables.. and pins used..etc..etc.. all that set-up would most likely remain the same...right?

Thanks. Well, I must have the wrong idea then. I was under the impression that I would write out some code that would create a certain pattern, lets say the letter D scrolling across all of the matrices. I would save that sketch as 'D pattern'. Then I would make a whole new sketch which might make a single line pulse across the screen and save that as 'Cylon pattern'. Instead, are you saying that I make a kind of 'base line sketch' which has all of the variables and then I load in something else that turns the LEDs on or off?

xl97:
you can use a button/switch connected to the arduino to change/cycle/loop through these patterns on the SD card.

That might be a possibility, I like the idea of the change happening externally by another person though, a stage hand for example.

xl97:
if you really want to be able to send new patterns form the pc to the Arduino..
Im thinking maybe you have to send the data from the PC/mobile device using bluetooth...
the bt module connected to the Arduino will read his data...pass it to the Arduino.. Arduino will parse/read it.. and save it to the SD card for you to use later/when complete?

But if the code is under 32KB, can't it be fed and stored directly to the Arduino?

xl97:
you can save all patterns to SD card using PC...... and only use the bluetooth module as a way to trigger the Arduino to change the patterns (ie: no real sending of led pattern data over the BT module)

IMHO.. the last option is what I'd go for.. probably the easiest.. and less mess with send/parse that data over BT and saving it to SD card.. then reading t back out again, to apply to the MAX chip..

I agree, if it can't be stored straight on the Arduino, then this sounds good.

xl97:
being in a helmet... Id probably opt for a smaller Arduino Nano or Pro-Mini..
and get one of those HC-05 Bluetooth modules off Ebay or something.. only around $5.00.. maybe $10.00 if you want the base board too.

then I'd get a little microSD pcb of ebay as well..

these 3 little boards will probably be smaller than the 1 board you linked to. (and fit into the helmet nicer i bet too)

Great! So is the 'base board' different to the Nano or Pro Mini or are they base boards?

Thanks so much for all of your help so far, it is really helping me get my head around this cool stuff. I really wish I had more information about how Harrison did it. This is the only picture that shows most of it linked up but I think the Yellowjacket is sitting on a baseboard:
http://www.instructables.com/file/F2KDWQAGTUG0WPU

well i think there are or could (should?) be two parts to this..

the MAIN part of the code that handles talking to/controlling the led matrices..

and a second part that is ONLY the patterns.. this way you can sorta separate 'code from content' (so to speak)

why re-write/upload the same code that is going to interpret the same 1's & 0's?

the only difference will really be the pattern of the 1's & 0's.... so why not have that part separate from the main code.. so you only have to focus on led patterns them selves in the end.. and for updating.

as far a stage hand updating the helmet... 'it depends'.. if you want the stage hand to be able to update/stream new data/patterns in real time.. that might be harder, than just working on a couple 100 different led patterns on your computer.. saving them to the SD card.. and then having the stage hand cycle/toggle through the PRE-MADE led patterns..

so you need to clarify what you want to do..

Im sure there is way, (over my head) to upload complete sketches remotely over bluetooth (might even be some posts on it).. (although that stops the Arduino, uploads the new sketch and reboots it).. where are is you were just feeding it different led pattern data.. you could probably have a more seamless effect/transition.

Im my mind.. it would be easier to pre-make your:

scrolling "D" effect
blinking effect
random dot effect
Pulse line effect

save them to your SD card... and then scroll/loop through them using whatever means you want.. (bluetooth cell, bluetooth pc..etc)

although sending LIVE, streaming data over bluetooth to the Arduino to parse and use seems cool/fun..

I just am not sure how robust it can be? parsing the serial data (piece by piece).. saving it somewhere?....

making sure you get ALL data.. then start using it to play the animation/effect.

if you dont save to SD card.. you still have to save to an array or something.. and then loop through it to output the effect/led pattern... how much room/space will you have if the led pattern is very complex/long/big?

I've always wanted to do a DP helmet.. but never found or coudld afford a good one to put electronics in! :slight_smile:

good luck! (go RPF.com!) :wink:

Thanks again for all of your pointers.

I was thinking about this more last night and maybe the problem is my pure lack of understanding about how this works. I think it might be more handy if I take it back to basics and get Arduino IDE, read up the LED library for code and use a wired board with a bread board to just control 1 8x8 matrix to begin with.

If I were to do that, would I use something like the Arduino Uno? Is there a standard wiring diagram to connect from the Arduino to the MAX chips? I could attach a picture of that board I have made up already if that helps?

And yes, I'll check RPF lol :smiley:

I think the MAX chips are pretty straight forward to wire up.

read these links:

http://playground.arduino.cc/Main/LEDMatrix

http://playground.arduino.cc/Main/MAX72XXHardware

they will help..

I have thanked you in the other thread xl97 but thank you again!

I am going to read these in depth. I am just a bit scared because the boards have come from the US and are custom made, I just don't want to damage anything by getting the electronics wrong. I am really trying to get everything straight in my head about the wiring up.

What I want to do now is test. Having read your fantastic explanations in the other post, I think what I am going to do is get myself an Arduino Uno as this seems to be the best 'starter' board. I am also going to get a bread board and then I am going to have a really good read of these data sheets etc and try to figure out what (if any) resistors etc I need.

I think I won't need anything else, as the boards that have been provided and the components I have already soldered on take care of the resistance etc.

This is very exciting and I am soooo absorbed by this, I keep running it over in my head all day at work haha! Lucky I can do my job standing on my head whilst playing a saxophone. Although I haven't ever tried it :smiley:

I dont know if this work for overseas.. but..

MAXIM will send out free samples of the MAX7219/7221 chips.. :slight_smile:

the MAX chips multiplex their leds.. so you only need 1 resistor per MAX chip.. (datasheet will have a table for you pick a value based on the specs of the led you are using)

those links are really straight forward.. and show how easy the MAX chip is to wire up..
(if I recall its only 1 resistor and 2 caps per MAX chip.. and a +5v feed).. but if you have pre-made boards it isnt even an issue.. just connect the 8 gnds and the 8 pos from the matrix/leds...

Yes, I think you're absolutely right. The board I have made up does indeed have the chip and then 2 caps with a single resistor. I will wire the matrix in, connect power and then connect the 3 pins from the arduino to the board to see what I can get working.

Thanks again, your advice has really helped.