zaterdag 16 juli 2011

Mystery LED in a box: part 3

see also: Mystery LED in a box: part 0
see also: Mystery LED in a box: part 1
see also: Mystery LED in a box: part 2

Still we don't have the contents of the wedding present that was given to us on our wedding party. Along the way we found clues telling us to exentend the electronics board with a pushbutton and most recently to fill all 128 bytes of the EEPROM with the hex value '0x03'.

To get to the EEPROM I added a 10 pins ISP header to the board to be able to connect it to my programmer. This gave me also the nice opportunity to read the fuse and lock bits to anticipate for any other surprises. Hmm, no surprises here (was I thinking too difficult again? Was I disappointed?), the fuse and lock bits were left alone and still had their default value. I also made a backup of the EEPROM and Flash memory to fix any possible screw-ups.


I used Codevision to read the EEPROM and changed it as requested. Yeehaa, a new Morse sequence!

"PROFICIAT MET JULLIE SKILZZ. CHECK HTTP://**.***.**.***/DEZONDEVOORBIJ/ OM DE VOLGENDE HINT TE VINDEN. MYMICROCONTROLLERCANBEATTHEHELLOUTOF..."

(the '*' were actually filled in but are not really relevant here)

After congratulating us with the achieved result so far we were presented a website for the next clue. Here the clue ended with a seemingly harmless reference to the coolest bumper sticker ever that hangs on the wall of Deddies Lab. Note taken!


So, a website. The tips&tricks section on the website gave us a link to the wikipedia site of morse code. We could have used that some time ago! Funny...

We were told to make a picture of the mystery box with today's newspaper to prove that the cube was still intact. Okay, I maybe broke it a week ago... but it is fixed now. The picture below will lead us further on our quest as promised on the website.



It is obviously that somebody is watching our moves. I suppose we have to be carefull with what we say the weeks to come. Hang on...

see also: Mystery LED in a box: part 4 
see also: Mystery LED in a box: part 5  
see also: Mystery LED in a box: part 6
see also: Mystery LED in a box: part 7

Mystery LED in a box: part 2

see also: Mystery LED in a box: part 0
see also: Mystery LED in a box: part 1 

Nothing more sexy then a beautiful woman with a 360 degrees celcius piece of metal in her hands. And I recently married her too. Lucky me!


In our continuing quest to find our wedding present we (and with 'we' I mean Rianne) got the task to add a pushbutton to the mystery box. This was easy, even for my soldering virgin.

The pushbutton revealed a new sequence of Morse code. The Matlab script I wrote for the first clue proved itself robust enough to also give us the next clue:

"ALLRIGHT. JULLIE DACHTEN TOCH NIET DAT DIT HET AL WAS HE? ZET HET EEPROM VOL MET 0X03 OM NAAR DE VOLGENDE RONDE TE GAAN. VIERENZESTIG"

The next task is to fill the EEPROM of the Attiny with '0x03'. This would bring us to the next round. The sentence strangely ends with the number 64. I don't know if this means anything for now or later on but I will keep the number in mind.

Stay tuned....

see also: Mystery LED in a box: part 3 
see also: Mystery LED in a box: part 4 
see also: Mystery LED in a box: part 5  
see also: Mystery LED in a box: part 6
see also: Mystery LED in a box: part 7

maandag 11 juli 2011

Mystery LED in a box: part 1

see also: Mystery LED in a box: part 0

So the puzzling started. After receiving the small transparent mystery box on our wedding party, already the next day I diligently started deciphering the led's ON/OFF sequence.

As a leftover from a energy monitoring project (that I never finished) I still had a USB datalogger (build around the VDIP1 module) which can log 4 channels of analogue values as a 10 bits value with a maximal sample rate of about 4Hz. It is unfortunately not faster (the software contains some bugs that I still have to fix), but for the mystery led it seemed appropriate. I plugged in an optical sensor (type unknown) to log when and how long the led is ON and OFF. Not knowing how long a unique data sequence was, I logged the optical sensor for 30 minutes.


With the analogue values of the optical sensor stored in a CSV file, I can write some signal processing scripts to analyse the data. In a spreadsheet program the data showed up nicely. A high analogue value (around 700) means the led is ON, the lower values indicate the led is turned OFF. The total sequence was around 7500 samples long. Not a very pleasant job to decipher that by just looking at the led. I definitely needed some software aids for this.


I have some experience with MATLAB, a widely used mathematical software environment. With MATLAB this shouldn't be difficult to decipher, I figured. A 'small' difficulty was that I had no clue what to look for. It can be a highly encrypted telephone number for which I needed a key, or a 800x600 black&white picture giving us a new clue or even a QR code leading us to a website. I stared at the data for a small week and played around with it viewing it from different angles. But nothing that looked useful.

To make sure I didn't miss any data, I watched the Attiny's led output on an oscilloscoop. Maybe a signal with a frequency higher then a visible sequence of 20Hz would show up. Some of my friends know their way pretty well in in the GHz working areas, so I was aware of some very high frequency clue. Luckily, the Attiny2313 has an internal clock of only 1MHz, and my 15MHz scoop showed no hidden suprise. The data that I had from the datalogger still looked as the only useful data.


I definitely was thinking too difficult. It was time to get help from my wife (no offense, honey). Maybe she can look at it from a different (non-technical) perpective which I didn't see with my biassed technical view.
Funny thing was that from the beginning I told everybody that a Morse-code would be out of the question, since this should be way to easy to solve for me and would be kind of an insult to me. I must say, I did look at this option, interpreting the '1' as a dash '-' and the '0' as a dot '.'. The spreadsheet sample from the picture above would then be deciphered as '----.-.-.-.'. But it didn't gave me information when a certain letter started or ended, so the data stream could mean a enormous amount of letter combinations. Very hard to go through all that options. I quickly put aside the Morse-code option.

Eventually it was my brilliant wife that came up with the idea that not the '1''s are dashes and the '0''s are dots but that the lengths of the sequential '1''s were the way to go. So a long stream of '1''s means a dash and a short stream of '1''s means a dot. The length of the '0' streams would then indicate the ending and starting of letters and complete words. The beginning of the data is then deciphered as '-... . ... - .' which means 'BESTE', the dutch word for 'DEAR'.

Victory was ours! A few hours of additional MATLAB programming eventually gave us the information that we needed.

"BESTE SANNE EN RIANNE, GEFELICITEERD MET JULLIE HUWELIJK. OM DE VOLGENDE AANWIJZING TE VERKRIJGEN MOET RIANNE EEN DRUKKNOP NAAR AARDE AAN PIN7 SOLDEREN."

The text basically says that my wife Rianne needs to solder a push button between ground and PIN7 on the Atmel.

That is our first clue, we are going to search for the next one! More to follow....

see also: Mystery LED in a box: part 2
see also: Mystery LED in a box: part 3
see also: Mystery LED in a box: part 4 
see also: Mystery LED in a box: part 5  
see also: Mystery LED in a box: part 6 
see also: Mystery LED in a box: part 7

zondag 10 juli 2011

Mystery LED in a box: part 0

I could have expected it!

 Last year we build this huge wooden dice for a good friend's wedding stuffed with electronics to prevent the newlyweds from getting their hands on their present too quickly. Two weeks ago it was my turn to tie the knot and guess what: The same guys that stood by my side last year putting the dice together now stood right in front of me all together to give me and the misses an interesting transparant box with some electronic parts in it.



Besides a lot of air the little box was filled with a 9V battery, some voltage regulation with an 7805, an ON/OFF switch, an Atmel's Attiny2313 and a single yellow 3mm led. Although the beers tasted good that evening it didn't take me too long to come up with the idea of flipping the switch. What could such a tiny Atmel do, not considering the fact that the battery could be half filled with explosives ending the party a bit sooner as expected? Luckily for us our friends indeed had only good intentions (so far), and the yellow led started blinking quite decently.


That was it. No big speech afterwards, hints, tips or tricks. The music started playing again, everybody grabbed their beers and we stood their holding a little transparent box with a small blinking yellow led like it was our first born baby. Luckily at the end of the party we got a little hint. Despite the kind of nerdy content of the present we were told that Rianne (my wife) will play a big part in finding the solution...

My (our) task is to figure out if this box leads us to any clues concerning our wedding gift. Supposing their is indeed a wedding gift besides this small box worth approximately 10 euros.

More is following soon....

see also: Mystery LED in a box: part 1
see also: Mystery LED in a box: part 2
see also: Mystery LED in a box: part 3
see also: Mystery LED in a box: part 4 
see also: Mystery LED in a box: part 5 
see also: Mystery LED in a box: part 6
see also: Mystery LED in a box: part 7