PDA

View Full Version : Glow with *OUR* Show and MSP430G2553 discussion



Pages : [1] 2

rjchu
01-18-2013, 05:04 PM
Ok, in the interest of putting a halt to budude's MSP430 thread (http://doityourselfchristmas.com/forums/showthread.php?25120-New-IDE-for-MSP430) (sorry budude) I've started this thread in which we can discuss the possibility of implementing a "Glow with the Show"-type of functionality for home/non-commercial use.

Thanks,

-joni-

rjchu
01-19-2013, 10:36 AM
So mspdebug sounds interesting. If I'm understanding things correctly, it seems as though I could attach to the header pins on one of these hats and fire up mspdebug with "dis main" and iterate until I've captured all of the code in the address space starting at main. The other thing I was thinking was simply doing a dis 0 or dis 0x0 thinking that would start at the top of the addressable memory space and let me iterate through to the end.

Thoughts?

-joni-

RobG
01-19-2013, 01:45 PM
Check out this (http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/101403.aspx)thread.

FET-Pro430-Lite might be the best option for you (remove MSP chip from LP and connect Vcc, TEST, RST, and GND to J4 on your GwtS.)

17744

LabRat
01-19-2013, 03:01 PM
So is the goal to capture/interact with the Disney ears? Or is it to create your own "headsets", but using the MSP vs PIC offerings?
(trying to understand the context)

timon
01-19-2013, 04:28 PM
IMHO the first would be making a transmitter that can communicate with the ears. Once that working the code is anywhere close should be widely distributed to it can never be pulled back. That way anyone can make their own even if Disney complains. Only then should someone try making ears.

rjchu
01-19-2013, 07:23 PM
My goal, can't speak for others, is to capture and be able to interact with the Disney ears. I'm about 20-30 minutes from Disneyland and would like to be able to have folks come with their own ear hats that they've purchased at Disneyland and be able to glow with MY show! ;) I'm not too interested in building hats at this point though I have thought about it in the context of adding ears/lights to out stroller (think ground effects using some extra RGB Super Strips. But that's WAY secondary to being able to control hats sitting in front of my house.

Thanks,

-joni-


So is the goal to capture/interact with the Disney ears? Or is it to create your own "headsets", but using the MSP vs PIC offerings?
(trying to understand the context)

timon
01-19-2013, 11:44 PM
My idea exactly. I'm trying to come up with a tool to capture the show. Nice thing is that you don't have to wait for World of color or Fantasmic to capture. Just got to Tea Party in CA.

rjchu
01-20-2013, 02:20 AM
Tonight I took apart one of the hats and soldered wires to the header that appears to be used for programming. The good news is that the hat still works, when I connect these four wires from the hat to VCC, GND, TEST and RST I could do a reset from within FETPro430Lite and have the ears respond as if they'd just powered up again. The bad news is that FET reports in the Report window that JTAG communication initialization failed and, therefore I assume, Verification of the Security Fuse failed. I believe my solder points are good and that I'm hooking this up correctly to the MS430 LaunchPad but if there's anything I appear to be doing wrong, by all means, please point it out to me! ;)

Below is a picture of the leads I soldered onto the pads, I soldered power and ground to the 3v terminal and ground respectively instead of trying to crowd four wires into the small area that the pad has to offer.

Time for some sleep, I'll take another crack at this tomorrow if anyone has replied.

Thanks,

-joni-

RobG
01-20-2013, 08:54 AM
Green is TEST and blue RST?
Is your LP listed in COM ports? Sounds like it's not, see the pic.
Also, remove batteries from your ears... well, GwtS ears. LP's Vcc is 3.6V, GwtS Vcc is 3V, so that could be a factor.

17756

rjchu
01-21-2013, 02:44 AM
Yes, the LaunchPad is listed in COM ports and is configured correctly and I've also tried with and without batteries in the ears. I'm wondering if the surrounding circuitry in the ears is interfering with LP's ability to communicate with the microcontroller? When I plug the IC that came with the LP into the DIP socket, as an example, it's easily recognized, I can verify the security fuse, read code pages, etc. When I try plugging the four wires from the ears into the DIP socket pins, the software responds very differently.

Thanks,

-joni-


Green is TEST and blue RST?
Is your LP listed in COM ports? Sounds like it's not, see the pic.
Also, remove batteries from your ears... well, GwtS ears. LP's Vcc is 3.6V, GwtS Vcc is 3V, so that could be a factor.

17756

sporadic
01-22-2013, 10:17 AM
I don't have a set of the ears or a MSP430 to play with, but recall seeing this come across hackaday last year sometime. Here are some relevant links which may help.
HaD link - http://hackaday.com/2012/07/10/tearing-down-disneys-glow-with-the-show-props/
Teardown and schematic - http://stuffandymakes.com/2012/07/08/disney-glow-with-the-show-ears-teardown/

Maybe I overlooked it somewhere and am stating the obvious, but I'd attack this from the IR side. Surely someone has reversed the protocol and figured a way to emulate it? I'd point an IRToy at it and see what I could get - http://dangerousprototypes.com/docs/USB_Infrared_Toy.

Edit: I know where else I saw this as well, here! lol
http://doityourselfchristmas.com/forums/showthread.php?20818-Ear-to-Ear-Networking
http://doityourselfchristmas.com/forums/showthread.php?20918-Infrared-Communication-for-Light-Shows

Edit2: More relevant information on IR protocol hacking - http://irq5.wordpress.com/2012/07/27/infrared-remote-control-protocols-part-1/

timon
01-22-2013, 10:48 AM
I took that hand drawing and entered it into eagle.

17259

LabRat
01-22-2013, 10:59 AM
Sample IR transmitter designs over in Lightman's thread (http://doityourselfchristmas.com/forums/showthread.php?20918-Infrared-Communication-for-Light-Shows&p=255694#post255694).

timon
01-22-2013, 10:23 PM
Other than protocol there is one fundamental difference. Lightman uses a carrier based system and Disney uses a IrDa based one.

Need a IrDA capture device that's small and controllable that can be taken to the park.

LabRat
01-22-2013, 11:21 PM
Interesting. I would think IrDa would be much more susceptible to interference (based on the 2 minutes of google assisted research. :biggrin:).
That being said I would think that the transmitter design could be common between the two solutions. Certainly some options for playing around.

For data logging, an IrDa to Bluetooth adapter, would make darn near any Smartphone the perfect data logger. The catch is going to be how to sync the logging to the "captured video" in order to associate the commands with their function.


Other than protocol there is one fundamental difference. Lightman uses a carrier based system and Disney uses a IrDa based one.

Need a IrDA capture device that's small and controllable that can be taken to the park.

RobG
01-22-2013, 11:24 PM
...Need a IrDA capture device that's small and controllable that can be taken to the park.
Attach a diode to LaunchPad, add 2 AA batteries, it's small, portable.

And if someone is really serious about this, I can send them fully assembled IR logger board (http://store.43oh.com/index.php?route=product/product&path=66&product_id=91) which will include large EEPROM to store captured data. I will be at Disney Orlando in April (I believe they do have WoC show there) and I will capture those myself if no one else does it before.

From what I understand, each hat has some sort of random ID, so that they can control small groups of hats. Other than that, this thing should be pretty straight forward.

Livermore-Dad
01-23-2013, 12:13 AM
Darn just got back from Disneyland/California adventure. We bought one of these hats for my son. Worked in California adventure and there was some effects during the disney firework show as well. Pretty cool, I thought of lightmans IR reindeer when I saw it.

BTW the world of color show is pretty cool, using water/spray as the projection canvas. I enjoyed it

Tory

timon
01-23-2013, 04:12 AM
I'm seeing Disney adding it all over the Park so it seems they are going all out.

OASN, One thing they need is more than one style of hat. I'm looking at transferring the ears to a Mickey ball cap. One thing for sure the WoC cast are going to ask where I got them from if I do it. To make it work plus make it less top heavy I was going to move the batteries to a holder on the back of the cap much like the LED headlamps you can where.

mschell
01-28-2013, 12:35 AM
I have a Mickey baseball cap that I got at DisneyWorld years ago. It had a battery pack, since there were LEDs that "flashed" on the front of the hat in the shape of Mickey.

I don't get down for Orlando very often these days, so I'm not sure if it's worth the effort to modify my cap, but you never know!

rjchu
01-28-2013, 02:36 AM
I'd be interested in this. The link you included is for a GPS logger (yours, which is very cool by the way). Would an IR logger just be an adaptation of this I assume?

Also, I believe there are places where these hats work/interact with things in Orlando, I could not find a reference to WoC actually showing at the Orlando parks. I only did a quick Google search/scan though.

Thanks,

-joni-


Attach a diode to LaunchPad, add 2 AA batteries, it's small, portable.

And if someone is really serious about this, I can send them fully assembled IR logger board (http://store.43oh.com/index.php?route=product/product&path=66&product_id=91) which will include large EEPROM to store captured data. I will be at Disney Orlando in April (I believe they do have WoC show there) and I will capture those myself if no one else does it before.

From what I understand, each hat has some sort of random ID, so that they can control small groups of hats. Other than that, this thing should be pretty straight forward.

RobG
01-28-2013, 08:47 AM
I'd be interested in this. The link you included is for a GPS logger (yours, which is very cool by the way). Would an IR logger just be an adaptation of this I assume?
Thanks. Yes, IR receiver will be installed instead of GPS module. I will let you know when I have one ready.

RobG
01-31-2013, 10:19 AM
Checkout this video, it was right on the tear down page. Read comments under the video, all information is right there. How did I miss that?

However, it would be nice if we could get the code out of the MCU, so that we could figure out the entire set of commands.

http://www.youtube.com/watch?v=Sy9T-JvLu5g

rjchu
01-31-2013, 10:54 AM
Good find Rob. I'm the same rjchu that asked Jon for more information in the comments there. I'd assumed I'd get a notification if he ever replied but apparently not as I never got anything indicating he'd replied two weeks ago! Time to play a bit. Now I wish I'd brought my hat and IR dongle with me so I could tinker while on conference calls!

Thanks for sharing,

-joni-


Checkout this video, it was right on the tear down page. Read comments under the video, all information is right there. How did I miss that?

However, it would be nice if we could get the code out of the MCU, so that we could figure out the entire set of commands.

http://www.youtube.com/watch?v=Sy9T-JvLu5g

timon
01-31-2013, 11:18 AM
I've seen that but all it tells you is that it received IR.

I'm trying to find the post someone did but they found the data stream was based on 2400 baud, 8 bit 1 stop no parity, IrDA formatted data stream.

Update, darn if it wasn't that same post but down in the comments.

Jon Fether wrote:

"I have done some analysis on this. The protocol is a UART/IRDA SIR 2400 baud (Analyzed with a Salae Logic logic analyzer). There's a basic framing that consists of a two different types of basic message, system and show. (System messages start with 0x55, like "55 AA 16 01 01 02 0E 05 2D", Show messages start with 0x9X where X is a length nibble such as "96 42 00 00 BE 11 E6"). Each message contains a header byte at the beginning and checksum at the end. I hope to do a good writeup someday."

Also

"I'm sorry I didn't get back to you before Christmas. I'll give you some quick basics right now:
90 60 A6 - Off
90 61 F8 - Blue
90 62 1A - Green
90 63 44 - Cyan (Blue+Green)
90 64 C7 - Red
90 65 99 - Magenta (Red+Blue)
90 66 7B - Yellow
90 67 25 - White
These codes when transmitted set both ears to the same color. They're the bare minimum. I brute-forced the checksums to make them work, none of these occur at the park. Will continue in another comment."

And also

"90 68 64 90 69 3A 90 6A D8 90 6B 86 90 6C 05 90 6D 5B 90 6E B9 90 6F E7 These codes set the same colors but only for the right ear. By combining them you can set both ears to arbitrary colors, such as setting: 90 65 99 then 90 6E B9 Will set both ears magenta then the right ear yellow, which means effectively "Left Ear Magenta, Right Ear Yellow". There is actually a more sophisticated way to do things, perhaps one more post.
"

Now that I found that again I'm going to see if I can figure out the checksum.

Materdaddy
01-31-2013, 12:10 PM
Good find Rob. I'm the same rjchu that asked Jon for more information in the comments there. I'd assumed I'd get a notification if he ever replied but apparently not as I never got anything indicating he'd replied two weeks ago! Time to play a bit. Now I wish I'd brought my hat and IR dongle with me so I could tinker while on conference calls!

Thanks for sharing,

-joni-

:shock: I'm telling!!!!





...kidding of course...

timon
01-31-2013, 04:36 PM
Why don't you send him a private message on YouTube and invite him to DIYC. I think it would be beneficial fpr both him and us.

johnnyb
01-31-2013, 08:59 PM
Now that I found that again I'm going to see if I can figure out the checksum.

I bet it's part of the IrPHY layer. It might even be described in the TI manual. I would guess talking serially to an IrDA device might generate it. I'll start looking too, but not tonight.

timon
01-31-2013, 11:13 PM
I believe the IrDA is a 16 bit CRC and the ears look like they are using 8 bits.

RobG
01-31-2013, 11:45 PM
Maybe this (http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=slaa221&docCategoryId=1&familyId=1615) will help.
Also, oPossum has a nice CRC implementation, see here (http://forum.43oh.com/topic/2962-bit-bang-usb-on-msp430g2452/page-4#entry26758) and here (http://forum.43oh.com/topic/2962-bit-bang-usb-on-msp430g2452/page-3#entry26682)

johnnyb
02-01-2013, 02:58 PM
An amazing amount of stuff to learn. I love it. In college we touched on lots of this, but it was so light weight compared to real implementations.

I think I project how I would make the ears work and assume they leveraged the built-in features of the MSP430 and would not reinvent CRC. That chip can do a lot of different things and a new CRC would not be a stretch at all. At the risk of sounding like I am disagreeing with you when I am not, what leads to an 8 bit CRC?

Is anyone successfully sending the Jon Fether identified codes to the ears? Are you bit banging or transmitting IR signals?

I have been spending time on getting IrDA working on PC and laptop and reading the MSP430 manual. So many things to learn all at once.

rjchu
02-01-2013, 04:24 PM
Is anyone successfully sending the Jon Fether identified codes to the ears? Are you bit banging or transmitting IR signals?


I brought my Iguana IR dongle and a hat with me today but my netbook is no longer recognizing it correctly and I've been too busy to dig into fixing it. If I get more time today to make it work, I'll be attempting to use Jon's codes. I've also ordered a new IrDA USB dongle on Amazon (should arrive Tuesday) just in case the Iguana took too much of a beating in my backpack - can't imagine that's the case though.

Thanks,

-joni-

timon
02-01-2013, 10:55 PM
Did I miss it? I've looked at the docs for the processor and don't find. Any reference to a CRC routines.

RobG
02-01-2013, 11:07 PM
MSP430F5/F6 come with CRC-CCITT module, MSP430G2 and some older versions do not. I guess those CRC routines were written for F2 series.

johnnyb
02-02-2013, 03:07 AM
I have not seen code for the CRC. I was thinking anything implementing the IrPHY layer is required to inplement the CRC. Since the msp430g has an IrDA encoder and decoder I figured it would implement the CRC just by using that part of the msp430. TI has a document on implementin IrDA on the msp430. http://www.ti.com/lit/an/slaa202a/slaa202a.pdf
This site has some interesting info on IrDA http://www.irdalite.com/irda/bk-chap0.html
I am thinking the Linux IrDA project should have CRC code.

timon
02-02-2013, 05:35 AM
As far as I can see the MSP430 has no CRC ability. Also the IrDA standard is for a 2byte CRC and Jon is seeing a 1 byte check code. Cracking the CRC has to be done or we go no where.

RobG
02-02-2013, 11:26 AM
OK, I think we took a wrong turn here. We started talking about CRC, but this might be a very basic checksum.
The thing is, this is not some mission critical data transfer, no financial data, just simple light on/off.
In addition, more complex computation would result in more clock cycles and more power usage (I don't think this is big concern here since we have LEDs and IR transmitters in use here.)
I think they are doing something very simple here, but to prevent hacking, they might be using some sort of simple transformation and initialization vector.

timon
02-02-2013, 07:00 PM
I agree it may be a checksup or one of may others.

Don't worry about processor cycles since most fast CRC routines are table driven so it only tabes a very few clock cycles.

RobG
02-03-2013, 10:08 AM
Good news.
I have reached out to one of the best programmers I know and he figured it out in no time.
The 2 byte command checksum seems to be Maxim/Dallas's 1-Wire CRC-8.
Here's an online calculator (http://www.datastat.com/sysadminjournal/maximcrc.cgi).

And here are 2 different implementations, one with table and one without.


const unsigned char crc_table[256] = {
0, 94,188,226, 97, 63,221,131,194,156,126, 32,163,253, 31, 65,
157,195, 33,127,252,162, 64, 30, 95, 1,227,189, 62, 96,130,220,
35,125,159,193, 66, 28,254,160,225,191, 93, 3,128,222, 60, 98,
190,224, 2, 92,223,129, 99, 61,124, 34,192,158, 29, 67,161,255,
70, 24,250,164, 39,121,155,197,132,218, 56,102,229,187, 89, 7,
219,133,103, 57,186,228, 6, 88, 25, 71,165,251,120, 38,196,154,
101, 59,217,135, 4, 90,184,230,167,249, 27, 69,198,152,122, 36,
248,166, 68, 26,153,199, 37,123, 58,100,134,216, 91, 5,231,185,
140,210, 48,110,237,179, 81, 15, 78, 16,242,172, 47,113,147,205,
17, 79,173,243,112, 46,204,146,211,141,111, 49,178,236, 14, 80,
175,241, 19, 77,206,144,114, 44,109, 51,209,143, 12, 82,176,238,
50,108,142,208, 83, 13,239,177,240,174, 76, 18,145,207, 45,115,
202,148,118, 40,171,245, 23, 73, 8, 86,180,234,105, 55,213,139,
87, 9,235,181, 54,104,138,212,149,203, 41,119,244,170, 72, 22,
233,183, 85, 11,136,214, 52,106, 43,117,151,201, 74, 20,246,168,
116, 42,200,150, 21, 75,169,247,182,232, 10, 84,215,137,107, 53
};

unsigned char calc_crc(unsigned char *data, unsigned char length)
{
unsigned char result=0;
while(length--) {
result = crc_table[result ^ *data++];
}
return result;
}


unsigned char calc_crc(unsigned char *data, unsigned char length)
{
unsigned char crc = 0;
while(length--) {
crc ^= *data++;
unsigned n = 8; do crc = (crc & 1) ? (crc >> 1) ^ 0x8C : crc >> 1; while(--n);
}
return crc;
}

timon
02-03-2013, 10:38 AM
Great job Rob:thup: way to go. Let the real hacking now begin:biggrin2:

For speed you can't beat the table driven so unless one is really tight on code space I'd stay with it.

Now to start working on the High powered IR transmitter that's going to be needed once the protocol is fully decoded or at least decoded to the level we need.

About this, one needs to remember that the IR LEDs will be pulsed at very high current such that if left on would burn up very quickly. Because of this a max on time limiter should be included. This works quite well with IrDA that well be sending.

In addition there is the safety factor with high power IR devices. Anyone working on this should get a pair of IR protective glasses and use them when ever your working very near the transmitter. Once in the yard and high up in the air you'll be fine but not when your only a few feet away.
Example: http://www.dragonlasers.com/Laser-Glasses-Infrared-IR-protection-740-1100nm.html

johnnyb
02-03-2013, 12:20 PM
Nice job RobG, I have been asking some questions on the JP1 forum and posted some IPscope captures from the ears. One of their experts posted the same crc algorithm last night. I guess there is no substitute for experience. In theory, I can put the captured signal on a remote. It worked for one of people helping me. I have not been able to get RMIR to accept the learned signal data. I expect it's a Win 7 64 bit issue with one of the dll used by the software.

timon
02-03-2013, 12:42 PM
Ok, figured it out. You have to set the sequence up for both reverse data bytes and reverse CRC result before final XOR. Once done then it works. Check out this calculator (http://www.zorc.breitbandkatze.de/crc.html) which does a much better job that the others I was using.

CRC order: 8
CRC polynom (hex) 31
Initial value (hex): 0
Final XOR value (hex): 0
Check both "reverse data bytes" and "reverse CRC result before Final XOR"

Make sure if your putting hex in the data area that it's in the following format. "%90%60".

I feel much better now that issue is out of the way:)


Kept wondering why when I went through all 256 CRC 8 polynomials using several of the online CRC calculators I never found one that gave the correct answer.

The polynomial should be 0x31 but every online calculator takes the data bytes 0x90 0x60 and comes up with a CRC of 0F6 except the one you found which gives the correct 0xA6. I even tried Reverse and reflected still no match. Go figure.

So far Jon's longer examples don't check but they may just be made up just as an example of the system code. Only the base color changes he posted seem to check out.

RobG
02-03-2013, 08:58 PM
I got more feedback from Kevin (aka oPossum) and he thinks that this is not IrDA but a regular carrier based IR. Probably ~37kHz carrier.
I had my doubts about IrDA so I am with Kevin on that (he's done some cool things with IR so he knows what he is talking about.)

Also, can someone confirm 100% that the IR detector is in fact TSMP6000?
We are basing our assumptions on the statement below, when there are other (http://www.vishay.com/ir-receiver-modules/) IR detectors that have carrier demodulators.
"There is what I believe to be a Vishay TSMP6000 IR receiver (U4) in one ear."

BTW, the person who posted the code on JP1 forum was also Kevin.

johnnyb
02-03-2013, 09:56 PM
BTW, the person who posted the code on JP1 forum was also Kevin.
I thought that was funny. He's helping me on JP1 and you on another forum and we are here. Small world.

RobG
02-03-2013, 10:15 PM
I know Kevin form 43oh. He was working on a bit bang USB project for G2553 which included CRC. I figured he might have an answer for us... and he did :)

timon
02-03-2013, 10:57 PM
I got more feedback from Kevin (aka oPossum) and he thinks that this is not IrDA but a regular carrier based IR. Probably ~37kHz carrier.
I had my doubts about IrDA so I am with Kevin on that (he's done some cool things with IR so he knows what he is talking about.)

Also, can someone confirm 100% that the IR detector is in fact TSMP6000?
We are basing our assumptions on the statement below, when there are other (http://www.vishay.com/ir-receiver-modules/) IR detectors that have carrier demodulators.
"There is what I believe to be a Vishay TSMP6000 IR receiver (U4) in one ear."

BTW, the person who posted the code on JP1 forum was also Kevin.

Why does he think that? I've gone over the hardware layout and processor used and I fine nothing which would generate a 37Khz carrier and more importantly nothing which could decode a 37Khz carrier. Remember the processor has full IrDA encode/decode builtin but there is no carrier system built it.

That said I'm 99% sure it's IrDA.

I've not found any part in the package other than the TSMP6000 plus the pinouts used match it.

Correction, I did fine one, its the TSSP6P38 so it is possible but there still no encoder unless the are bit banging the IR sending. That said I still believe its IrDA. If someone would scope the output it would be easy to tell. Jon who did the tear down has to know since he's been able to send basic colors to the ears.

RobG
02-03-2013, 11:20 PM
Why does he think that? I've gone over the hardware layout and processor used and I fine nothing which would generate a 37Khz carrier and more importantly nothing which could decode a 37Khz carrier. Remember the processor has full IrDA encode/decode builtin but there is no carrier system built it.

That said I'm 99% sure it's IrDA.

I've not found any part in the package other than the TSMP6000 plus the pinouts used match it.

You could decode carrier in code if you had to.
Again, we should confirm 100% what detector we are dealing here with.

TSSP6P38, TSSP6038, TSOP35538, TSOP35338, TSOP35138, TSOP35536, TSOP35336, TSOP35136, and few more.
TSOP353xx are for use in noisy environments, TSOP355xx for very noisy, perfect for GwtS.

Then there is this:


The images in the datasheet match the part visually, as far as I could tell. So, to be sure I guessed correctly, I grabbed my Samsung flat panel TV remote and my oscilloscope and checked it out. I hooked up the ground clip for the scope to the ground wire on the battery pack and clipped the probe to pin 4 of the receiver. The scope showed +3V solid. I then clicked various buttons on the remote and POW! I watched the remote’s signals clearly on the scope.

The video clearly shows decoded signal on pin 4, the kind you get from carrier based IR detectors, not IrDA.

timon
02-04-2013, 12:01 AM
Actually I don't think the noise level is that high. The show are at night so there is no sun IR to worry about, the rest of the show lights are not on the guests and there are no major heat sources that Disney does not have control of. In addition the IR output I'll bet is very high.

BTW, since the TSMP6000 just shapes the incoming signal you could be seeing the actual carrier frequency on the scope. We can't tell since we can't see what the scopes timing is set to.

If I had access to a scope or logic anaylizer I could nail ths down in a minute as the waveform for both coding systems are very distinct.

oPossum
02-04-2013, 02:01 AM
The IR Widget capture posted over at the JP1 forums clearly shows an aprox 38 kHz carrier. So the receiver module in the ears is probably one of the other parts that RobG listed.

I decoded a chunk of that capture and got...

0x96, 0x42, 0x00, 0x00, 0x48, 0x18, 0x0C, 0xBE, 0x1B

The CRC is valid!


Note that the UART pins of the G2553 are also shared with the TimerA unit, so it is trivial to generate a carrier to drive the IR LED.

johnnyb
02-04-2013, 02:50 AM
The friend that got me interested in the GwtS ears disassembled a pair and did some analyzing with http://www.saleae.com/logic. I have one output file he sent but had not got around to looking at it. He thought it had something wrong with it. He said the output IR led used about a 38K carrier. This matches what Kevin figured out from the IRscope/IR widget captures I posted at JP1.

If I understood some stuff I read today, IrDA does not use a carrier and can even use short pulses and not the sort of square sine wave of serial. CIR mostly uses a carrier with pulse width modulation (but not all CIR). Does this sound correct to you? If the ears use a carrier then they would seem to be more of a 2400 baud UART using CIR and not IrDA.

We know MSP430G2553 has IrDA encoding/decoding but can do UART and lots of stuff. I could never get my laptop or PC with IrDA to see the ears while IRscope/IRwidget do see it, and I don't think IRscope/IR widget see IrDA.

Kevin manually decoded one of the signals here www.hifi-remote.com (http://www.hifi-remote.com/forums/viewtopic.php?p=108195#108195)

oPossum
02-04-2013, 03:33 AM
IrDA uses a *single* IR pulse to represent a 0 and no pulse for a 1.

The GwtS ears are sending a ~38 kHz carrier for ~417 us (~16 pulses) for a 0 and no carrier for ~417 us for a 1.

The IR Widget can not properly receive IrDA and would produce jibberish. The experts at JP1 forums would recognize it as such. It was made just for CIR (consumer infrared) with a carrier of 30 to 60 kHz. I am the designer of the IR Widget.

timon
02-04-2013, 05:12 AM
oPossum,

Your measurements dose suggest a carrier based system. Having the carrier at 16 times the baud rate is completely logical. Sending would be a relatively easy and need not use a lot of processing power.

Receiving would be processor intensive if done in software but since there are versions of the IR which have demodulation the UART in the processor can still be used.

I'm going back and see if there is a way that the MSP430 can tie it's UART output to the timer in such a way that it may be able to modulate a carrier but even if it doesn't generating a carrier for a show transmitter externally would be quite easy.

I'm assuming that you'll be doing some more testing but at this point I can easily admit that IrDA is not being used.

Not having test equipment definitely makes what I want to do much harder so I really need to figure a way to fund some.

Great work!

LabRat
02-04-2013, 09:28 AM
The GwtS ears are sending a ~38 kHz carrier for ~417 us (~16 pulses) for a 0 and no carrier for ~417 us for a 1.


(In my best Montgomery Burns voice) "Ehhhhhxcellent" the DMX to IR bridge should work just peachy.

johnnyb
02-04-2013, 11:06 AM
Just to confirm, oPossum (fka Kevin) posted a JP1 code for the blue command. I loaded it into a remote, and it worked like a charm. The ears turned blue and stayed that way until I pulled the batteries, admittedly only a short time later.

johnnyb
02-04-2013, 11:38 AM
Actually, powering off was fine to resume the default color pattern. I keep saying take batteries out because that is what I to do once the capacitance switch stopped working. Incidentally, putting in fresh batteries restored the switches functionality. Putting the low but not dead batteries back in the switch kept working too.

RobG
02-04-2013, 12:04 PM
There's one more thing. I found few mistakes in the hand drawn schematic and I think timon fixed at least one when he created one in Eagle.
Can someone take a look at D1 and see if there are any marking on it? How about attaching scope to TP5?
From the picture, it looks like D1 has 3 pins. Is it possible that this is some kind of emitter with built in encoder?

timon
02-04-2013, 12:07 PM
So if indeed it's carrier based, which I accept, we should be able to take one of the Vishay carrier based receivers and interface that with a RS232 driver and feed that directly into a PCs RS232 port and read out the data. For sending a 555 set to oscillate at 38Khz and enable it from the RS232 output. This Vishay document (http://www.vishay.com/docs/80071/dataform.pdf) suggests a IR sensor with a low AGC.

This should be quick and dirty and with it any serial capture/sending tool should allow us to work with the ears.

timon
02-04-2013, 01:24 PM
Here is the Vishay Marking information (http://www.vishay.com/docs/80121/markings.pdf)for the modules. The one we're looking for is on the first page and it shows the markings are located on the end of the module. Hey, at least it's not on the bottom.

Can someone who has their ears disassembled look at the markings and report back. Be aware that it may be very hard to read without good lighting and a magnifier. Hopefully they were not erased.

This will let us know one and for all what's being used.

rjchu
02-04-2013, 01:36 PM
I have a set apart still. Unfortunately the pictures I took don't show the sides of the receiver so I won't be able to check until after work. Having said that, if there really is that much writing on the side of that little thing, I doubt I'll be able to see it even if I used magnification! :)

Thanks,

-joni-



Here is the Vishay Marking information (http://www.vishay.com/docs/80121/markings.pdf)for the modules. The one we're looking for is on the first page and it shows the markings are located on the end of the module. Hey, at least it's not on the bottom.

Can someone who has their ears disassembled look at the markings and report back. Be aware that it may be very hard to read without good lighting and a magnifier. Hopefully they were not erased.

This will let us know one and for all what's being used.

RobG
02-04-2013, 02:14 PM
You just need to read 4 digits on the left :) and while you at it, take a look at D1 too.

rjchu
02-05-2013, 12:36 AM
Well, I see "xx28" on there. As far as what the "xx" is? I've stared at it long enough that I'm cross-eyed. Now it's your turn. :) Picture attached here...

Thanks,

-joni-

RobG
02-05-2013, 12:41 AM
TSOP36238 (http://www.vishay.com/docs/82187/tsop362x.pdf), 38kHz carrier.
How about D1? Any markings?

Jrd
02-05-2013, 12:41 AM
Well, I see "xx28" on there. As far as what the "xx" is? I've stared at it long enough that I'm cross-eyed. Now it's your turn. :) Picture attached here...

Thanks,

-joni-

I say "J6" or "16" don't know if either of those make a valid part or not...

timon
02-05-2013, 12:58 AM
Good picture, it's a TSOP36238 (http://www.vishay.com/docs/82187/tsop362x.pdf) and I've included the data sheet. The issue is now solved, I was wrong, it's 38Khz.

johnnyb
02-05-2013, 12:59 AM
By the by, the 90 60 A6 - Off code is a temporary off. The ears come back on after about 2 minutes.

rjchu
02-05-2013, 02:14 AM
TSOP36238 (http://www.vishay.com/docs/82187/tsop362x.pdf), 38kHz carrier.
How about D1? Any markings?

No, none that I can find. Why so much interest in the onboard transmitter?

Thanks,

-joni-

RobG
02-05-2013, 08:56 AM
Just want to know what parts are used for sure rather than guessing. No big deal.

johnnyb
02-05-2013, 01:24 PM
IrDA uses a *single* IR pulse to represent a 0 and no pulse for a 1.

The GwtS ears are sending a ~38 kHz carrier for ~417 us (~16 pulses) for a 0 and no carrier for ~417 us for a 1.

The IR Widget can not properly receive IrDA and would produce jibberish. The experts at JP1 forums would recognize it as such. It was made just for CIR (consumer infrared) with a carrier of 30 to 60 kHz. I am the designer of the IR Widget.

If I understand and am doing the math correctly does this imply that the MSP430 can use built in IrDA signaling to emulate the carrier?

To do this one would use 38400 baud to emulate the ~38kHz carrier.
That baud rate gets you ~16 IrDA pulses per the the 417Hz range for the ~2400 baud serial communication.
Then sending 0xffff then would be seen as a 0 and sending 0x0000 then would be seen as a 1 in CIR via a 38kHz carrier.

johnnyb
02-05-2013, 01:48 PM
I think someone posted a cvs file with IR pulse samples from the GwtS ears. I am not finding it now that I want to start processing the file. Would someone please point me to the file? Thanks.

RobG
02-05-2013, 02:09 PM
If I understand and am doing the math correctly does this imply that the MSP430 can use built in IrDA signaling to emulate the carrier...
Don't forget about start and stop bits. If you use 8bit, you will get 18 pulses plus one missing in the middle and one at the end for 0, and 2 pulses every 9 for one.

A better idea would be to use timers. One would generate carrier, the other would toggle the carrier every bit as needed.

johnnyb
02-05-2013, 02:27 PM
I don't think the start and stop bits matter because it is just a stream. To send the start bit, 8 data bits, and a stop bit you would IrDA send 0x0000 for the start bit, send 0x0000 or 0xffff for each data bit and then a 0xffff for the stop bit. That would look like 10 bits at 2400 baud to CIR on a 38kHz carrier, but it would look like 10 x 16 pulses at 38400 baud to IrDA which I think would be gibberish to IrDA.

RobG
02-05-2013, 02:35 PM
Start and stop bits would introduce noise. For example 0xFF (byte) would produce 16 pulses @~8kHz

LabRat
02-05-2013, 02:41 PM
UHmmm. .why not use a PIC with a PWM engine in it? Set the PWM to 38KHZ with a 50% duty cycle. Then just bit bang at 2400 (or 4800) baud. Let the PWM engine worry about the niggly little bits. At least.. that's the approach I took. 56Khz, 40Khz, or 38Khz carrier ? Just tweak the configuration registers for the PWM engine. The rest of the code remains unchanged.
Or did I miss something in the requirements??

johnnyb
02-05-2013, 02:46 PM
I guess what I'm suggesting is that if the MSP430 built in IrDA encoder can be set to 38400 baud it will have a clock already built in to generate the IrDA light pulses. So one would not need another clock. Then one can leverage the (natural) coincidence that a 16 bit word pulsed at IrDA 38400 baud would look like a single bit CIR on a 38kHz carrier. Don't get me wrong, the MSP4300 has timers and there are probably multiple ways to generate the communication we see.

RobG
02-05-2013, 03:08 PM
I perfectly understand your idea and it's a good one. I am just trying to make you aware of any potential issues.

johnnyb
02-05-2013, 03:34 PM
Start and stop bits would introduce noise. For example 0xFF (byte) would produce 16 pulses @~8kHz

Keep in mind we have 2 data streams running at the same time. It would only be using the IrDA encoder/decoder to blink the led. That's it. So, the question is what baud rate does one use with an IrDA encoder to simulate the 38kHz carrier. It seems that 38400 baud is pretty close to 38,000 pulses per second.

Since our GwtS ears are talking 2400 baud that means ~16 pulses per bit. That neatly coincides to a 16 bit word of either all 0s or all 1s at the IrDA level. The IrDA stream only sends 2 patterns. It sends either a 0xFFFF or 0x0000. It never need send an 0xFF.

johnnyb
02-05-2013, 03:37 PM
UHmmm. .why not use a PIC with a PWM engine in it? Set the PWM to 38KHZ with a 50% duty cycle. Then just bit bang at 2400 (or 4800) baud. Let the PWM engine worry about the niggly little bits. At least.. that's the approach I took. 56Khz, 40Khz, or 38Khz carrier ? Just tweak the configuration registers for the PWM engine. The rest of the code remains unchanged.
Or did I miss something in the requirements??
I suppose in part I am trying to figure out how and why the GwtS ears would do the communication with a MSP430. Also, we had the mystery of why the MSP430 has IrDA but is using CIR with a 38kHz carrier to communicate.

LabRat
02-05-2013, 03:55 PM
I think the IrDa is a snipe hunt. The device also has a plain old UART, which when combined with the VISHAY receiver, gives a normal serial connection.
(well as 'normal' as anything from Disney is concerned)

Part was likely select due to it's ulta low power capabilities, more so than anything else.

(That's all opinion... treat is as such. :cool: )

RobG
02-05-2013, 04:13 PM
Instead of IrDA, you could use SPI. Just set baud rate to 76k and keep sending 0x55 to generate carrier frequency.
It's possible that this is what they are doing with the second IR transmitter, the one that is attached to P1.7 (UCB0, which BTW doesn't support UART/IrDA.)

Also, keep in mind that they are using UCA0 to receive the signal, so they cannot do what you are suggesting to send data using the same module (UCA0.)
It's most likely bit banged using the timer.

johnnyb
02-05-2013, 04:47 PM
I'm missing others' posts while taking too long to compose my own posts. That's what I get for posting from work composing a minute here a minute there.

I will be getting a lesson on working with a TI micro controller tonight. After I learn more about what's up I'll probably bug the folks here for some advice. At this point the context will be learning to program the controller I have for sending ear codes. Currently it is setup as a temp controller, but it will go back to that duty later.

timon
02-05-2013, 05:35 PM
I think we're over thinking this. First as far as we know everything about the ears is half duplex so...

Rob, your right about SPI.

When in receive mode the Vishay receiver feeds data to the MSP430 which is running the eUSCI in UART receive mode. THis makes receiving easy and uses little processor power.

When the processor needs to transmit it does not have to leave the the eUSCI in UART mode but could switch to an SPI mode and feed the serial data as four bytes of "01010101" when it wants "0", i.e. carrier on, and four bytes of "11111111" for "1" or carrier off. Since it takes two bits for one carrier cycle the bit rate clock would have to run at twice the carrier rate. Since there are no start or stop bits in SPI mode you end up with a bit banged output, you'll get four interrupts per data bit but the output can directly drive the IR LED. You could do this using a timer but you have to count pulses. Either way would work but I think SPI may be easier.

This is all a nice exercise in how the ears send data but we don't have to worry about what the ears are doing during transmit we have to work out what we want our transmitter to do during transmit. We can use any technique we want to generate our output but since we're going to be running the LEDs in high power pulse mode we want to make sure we have a fail safe so the LEDs never get left on.

I'm thinking about connecting the transmitter and receiver to the control module using RS485 over cat 5. Keep the same pinouts as DMX, i.e., data on pairs 1 & 2, 3 & 6 and power it from pins 4 & 5 with 7 & 8 ground. This way you can put the transmitters, with a receiver if needed, at any point around your house to get complete coverage.

Now I would like to figure out why they have two LEDs. Can someone cover up one LED at a time and see what each one is sending?

RobG
02-05-2013, 05:46 PM
@johnnyb

Here's a diagram of the IrDA signal generated by USCI in IrDA mode suggested by you.
On the top, you have 2 bytes (0xFFFF) generating carrier frequency.
On the bottom no carrier (0x0000.)
As you can see, it works well with the exception of those start and stop pulses.

18049

LabRat
02-05-2013, 06:05 PM
Would setting it to 9-Bit output do it?


@johnnyb

Here's a diagram of the IrDA signal generated by USCI in IrDA mode suggested by you.
On the top, you have 2 bytes (0xFFFF) generating carrier frequency.
On the bottom no carrier (0x0000.)
As you can see, it works well with the exception of those start and stop pulses.

18049

RobG
02-05-2013, 06:13 PM
You can only set it to 7 or 8 bits. AFAIAC, you cannot disable stop and start bits.

Anyways, I am still wondering about D1 and D2.


There are two other diode-esque parts in the other ear (see the image for the LEDs (U1) above). D1, which has a tiny lens, two leads and faces forward (90) to the face of the PCB, flashes a bright pulse of IR about once every 5 to 10 seconds or so. I was able to observe this with my Sony TRV20 miniDV (remember those?) camera in “Nightvision” mode. On the oscilloscope, D2 shows a digital signal (+3V on and 0V off). It has a 5 ms wavelength and appears to be on (3V) for 10 ms and off (0V) for 5 ms. It looks like a clear super-tiny LED or photodiode, but I’m not versed enough in all of this stuff to easily recognize it.

I am wondering what is the reason for two different LEDs.
D1 is probably used for communication with other ears or to relay signal.
D2, I have a feeling is a photodetector, not emitter, most likely used for ambient light measurement or something like that.

johnnyb
02-05-2013, 07:11 PM
@johnnyb
As you can see, it works well with the exception of those start and stop pulses.

Thanks. It seemed like a nice idea on paper.

Mixing IrDA and CIR? :rolleyes:
Dr. Egon Spengler: There's something very important I forgot to tell you.
Dr. Peter Venkman: What?
Dr. Egon Spengler: Don't cross the streams.
Dr. Peter Venkman: Why?
Dr. Egon Spengler: It would be bad.
Dr. Peter Venkman: I'm fuzzy on the whole good/bad thing. What do you mean, "bad"?
Dr. Egon Spengler: Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light.

timon
02-05-2013, 07:47 PM
That's why SPI mode works better, no start and stop bits to worry about. Give it a try.

If your seeing same signals on D2 and D1, with the exception that one may be inverted, then cover up D1 and see if you still get a signal on D2. If not then it's likely a detector.Totally covered up D2 should not show anything if it's a receiver. My bet, it's another transmitter but why. Wonder if they are at different wavelengths.

oPossum
02-06-2013, 02:11 AM
Here is some code for the MSP430 launchpad that will send 2400 bps serial with 38 kHz carrier. This can be used with terminal software that can send hex (Realterm and others). Connect a 330 to 470 ohm resistor and IR LED to P1.6. The range will be short with that minimalist circuit.



/*

Copyright (C) 2013 Kevin Timmerman

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

*/

#include <msp430.h>

void main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Disable watchdog reset
DCOCTL = 0; // Run at 16 MHz
BCSCTL1 = CALBC1_16MHZ; //
DCOCTL = CALDCO_16MHZ; //
//
TA0CTL = TASSEL_2 | MC_1; // Timer A config: SMCLK, count up
TA0CCTL1 = OUTMOD_5; // Make sure IR is off
TA0CCR0 = (16000000L / 38000L) - 1; // 38 kHz carrier
TA0CCR1 = TACCR0 / 2; // 50% duty cycle
//
P1OUT = 0; //
P1DIR = BIT6; // Enable PWM output on P1.6
P1SEL = BIT6; //
//
P1IES |= BIT1; // Set interrupt to falling edge
P1IFG &= ~BIT1; // Clear interrupt flag
P1IE |= BIT1; // Enable pin interrupt

_enable_interrupts(); // Enable global interrupts
//
__bis_SR_register(LPM0_bits + GIE); // Low power mode with interrupts enabled
}

#pragma vector = PORT1_VECTOR
__interrupt void port1_int(void)
{
TA0CCTL1 = (P1IES & BIT1) ? OUTMOD_7 : OUTMOD_5; // Enable/disable PWM output
P1IES ^= BIT1; // Toggle interrupt edge
P1IFG &= ~BIT1; // Clear interrupt flag
}

oPossum
02-06-2013, 06:22 AM
The IR Widget capture shows that the pulse count per bit is usually 16, but sometimes 15. This is a strong indication that two timers are being used. One for the carrier and the other for bit timing. This is very common and often shows up in other protocols such as NEC where the on duration will be 21 or 22 cycles.

This code is a standalone (no computer required) GwtS code transmitter. For testing purposes it simply sends the 16 three byte codes (90 6x CRC). It uses two timers and should produce a signal very close to that sent by the GwtS ears.



/*

Copyright (C) 2013 Kevin Timmerman

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

*/

#include <msp430.h>
#include <stdint.h>

static volatile uint8_t *tx_pkt = 0; // Packet to tx
static volatile unsigned tx_len = 0; // Length of packet to tx

#pragma vector = TIMER1_A0_VECTOR // Timer A1 Capture/Compare 0 interrupt
__interrupt void timer_a1_0_isr(void) // 2400 interrrupts / second
//
{ // -- Tx one bit of packet --
static unsigned tx_data; //
//
if(tx_data) { // Data to tx?
TA0CCTL1 = (tx_data & 1) ? OUTMOD_5 : OUTMOD_7; // Turn carrier on/off for data bit
tx_data >>= 1; // Next data bit
} else { //
if(tx_len) { // - More data to tx?
TA0CCTL1 = OUTMOD_7; // Start bit
tx_data = *tx_pkt++ | 0x0100; // Get next octet and add stop bit
--tx_len; // Decrement length
} else { // - No more data
TA1CCTL0 &= CCIE; // Disable interrupt
} //
} //
} //

static const uint8_t crc_table[] = {
0x00, 0x5E, 0xBC, 0xE2, 0x61, 0x3F, 0xDD, 0x83,
0xC2, 0x9C, 0x7E, 0x20, 0xA3, 0xFD, 0x1F, 0x41,
0x9D, 0xC3, 0x21, 0x7F, 0xFC, 0xA2, 0x40, 0x1E,
0x5F, 0x01, 0xE3, 0xBD, 0x3E, 0x60, 0x82, 0xDC,
0x23, 0x7D, 0x9F, 0xC1, 0x42, 0x1C, 0xFE, 0xA0,
0xE1, 0xBF, 0x5D, 0x03, 0x80, 0xDE, 0x3C, 0x62,
0xBE, 0xE0, 0x02, 0x5C, 0xDF, 0x81, 0x63, 0x3D,
0x7C, 0x22, 0xC0, 0x9E, 0x1D, 0x43, 0xA1, 0xFF,
0x46, 0x18, 0xFA, 0xA4, 0x27, 0x79, 0x9B, 0xC5,
0x84, 0xDA, 0x38, 0x66, 0xE5, 0xBB, 0x59, 0x07,
0xDB, 0x85, 0x67, 0x39, 0xBA, 0xE4, 0x06, 0x58,
0x19, 0x47, 0xA5, 0xFB, 0x78, 0x26, 0xC4, 0x9A,
0x65, 0x3B, 0xD9, 0x87, 0x04, 0x5A, 0xB8, 0xE6,
0xA7, 0xF9, 0x1B, 0x45, 0xC6, 0x98, 0x7A, 0x24,
0xF8, 0xA6, 0x44, 0x1A, 0x99, 0xC7, 0x25, 0x7B,
0x3A, 0x64, 0x86, 0xD8, 0x5B, 0x05, 0xE7, 0xB9,
0x8C, 0xD2, 0x30, 0x6E, 0xED, 0xB3, 0x51, 0x0F,
0x4E, 0x10, 0xF2, 0xAC, 0x2F, 0x71, 0x93, 0xCD,
0x11, 0x4F, 0xAD, 0xF3, 0x70, 0x2E, 0xCC, 0x92,
0xD3, 0x8D, 0x6F, 0x31, 0xB2, 0xEC, 0x0E, 0x50,
0xAF, 0xF1, 0x13, 0x4D, 0xCE, 0x90, 0x72, 0x2C,
0x6D, 0x33, 0xD1, 0x8F, 0x0C, 0x52, 0xB0, 0xEE,
0x32, 0x6C, 0x8E, 0xD0, 0x53, 0x0D, 0xEF, 0xB1,
0xF0, 0xAE, 0x4C, 0x12, 0x91, 0xCF, 0x2D, 0x73,
0xCA, 0x94, 0x76, 0x28, 0xAB, 0xF5, 0x17, 0x49,
0x08, 0x56, 0xB4, 0xEA, 0x69, 0x37, 0xD5, 0x8B,
0x57, 0x09, 0xEB, 0xB5, 0x36, 0x68, 0x8A, 0xD4,
0x95, 0xCB, 0x29, 0x77, 0xF4, 0xAA, 0x48, 0x16,
0xE9, 0xB7, 0x55, 0x0B, 0x88, 0xD6, 0x34, 0x6A,
0x2B, 0x75, 0x97, 0xC9, 0x4A, 0x14, 0xF6, 0xA8,
0x74, 0x2A, 0xC8, 0x96, 0x15, 0x4B, 0xA9, 0xF7,
0xB6, 0xE8, 0x0A, 0x54, 0xD7, 0x89, 0x6B, 0x35
};

void crc(uint8_t *d, unsigned len) //
{ //
uint8_t crc = 0; //
while(len--) { //
#if 0 // - CRC loop - small/slow
crc ^= *d++; //
unsigned n = 8; //
do crc = (crc & 1) ? (crc >> 1) ^ 0x8C : crc >> 1; while(--n);
#endif //
#if 0 // - CRC unrolled loop - small/faster
uint8_t b = crc ^ *d++; //
crc = 0; //
if(b & 0x01) crc ^= 0x5E; //
if(b & 0x02) crc ^= 0xBC; //
if(b & 0x04) crc ^= 0x61; //
if(b & 0x08) crc ^= 0xC2; //
if(b & 0x10) crc ^= 0x9D; //
if(b & 0x20) crc ^= 0x23; //
if(b & 0x40) crc ^= 0x46; //
if(b & 0x80) crc ^= 0x8C; //
#endif //
#if 1 // - CRC table lookup - large/fastest
crc = crc_table[crc ^ *d++]; //
#endif //
} //
*d = crc; //
} //

void main(void)
{
uint8_t pkt[3];

WDTCTL = WDTPW | WDTHOLD; // Disable watchdog reset
DCOCTL = 0; // Run at 16 MHz
BCSCTL1 = CALBC1_16MHZ; //
DCOCTL = CALDCO_16MHZ; //
//
TA0CTL = TASSEL_2 | MC_1; // Timer 0 config: SMCLK, count up
TA0CCTL1 = OUTMOD_5; // Make sure IR is off
TA0CCR0 = (16000000L / 38000L) - 1; // 38 kHz carrier
TA0CCR1 = TACCR0 / 2; // 50% duty cycle
//
TA1CTL = TASSEL_2 | MC_1; // Timer 1 config: SMCLK, count up
TA1CCR0 = (16000000L / 2400L) - 1; // 2400 bps
//
P1OUT = 0; //
P1DIR = BIT6; // Enable PWM output on P1.6
P1SEL = BIT6; //
//
_enable_interrupts(); // Enable global interrupts
//
for(;;) { // Forever
uint8_t cmd; //
for(cmd = 0x60; cmd <= 0x6F; ++cmd) { // Send 90 60 to 90 6F commands
pkt[0] = 0x90; // Build packet
pkt[1] = cmd; //
crc(pkt, 2); //
tx_pkt = pkt; // Prepare for tx
tx_len = 3; //
TA1CCTL0 |= CCIE; // Enable Timer 1 interrupt to begin tx
__delay_cycles(16000000L * 2); // Wait two seconds
} //
} //
}

rjchu
02-07-2013, 01:30 AM
This is very exciting! I'm happy to see so much activity on the thread but am sad that I'm on business travel and don't have any of my hardware with me to play with oPossum's code. :( Only a few more days...

Thanks,

-joni-

oPossum
02-07-2013, 02:25 AM
Here are most of the codes in the GlowCodes.txt file that was posted here (http://doityourselfchristmas.com/forums/showthread.php?20818-Ear-to-Ear-Networking&p=226109#post226109).

I wrote some very crude code to do this, so some codes did not decode properly due to framing or CRC errors.

Everything in this list has valid CRC.



96 42 00 00 48 17 0C 32 6B
96 42 00 00 48 17 0C B4 3A
96 42 00 00 48 17 0C 04 08
96 42 00 00 48 17 0C C2 1F
96 42 00 00 48 17 0C 26 97
96 42 00 00 48 17 0C E4 E1
96 42 00 00 48 17 0C 3E C8
96 42 00 00 48 17 0C B6 86
96 42 00 00 48 17 0C 1E EB
96 42 00 00 48 17 0C 6E 13
96 42 00 00 48 17 0C BE 44
96 42 00 00 48 17 0C AE D9
96 42 00 00 48 17 0C FE 02
96 42 00 00 48 17 0C 8E FA
96 42 00 00 48 17 0C CA DD
96 42 00 00 48 17 0C 4C 8C
96 42 00 00 48 17 0C 9C DB
96 42 00 00 48 16 0C 78 F8
96 42 00 00 48 16 0C 0E DD
96 42 00 00 48 16 0C 68 65
96 42 00 00 48 16 0C CC AB
96 42 00 00 48 16 0C 6C 04
96 42 00 00 48 16 0C 3E 63
96 42 00 00 48 16 0C 10 5F
96 42 00 00 48 16 0C 88 8C
96 42 00 00 48 16 0C 0A BC
96 42 00 00 48 16 0C 68 65
96 42 00 00 48 16 0C C2 B4
96 42 00 00 48 16 0C 30 7C
96 42 00 00 48 16 0C 80 4E
96 42 00 00 48 16 0C 52 A5
96 42 00 00 48 16 0C 1A 21
96 42 00 00 48 16 0C 6A D9
96 42 00 00 48 15 0C 8C 09
96 42 00 00 48 15 0C 54 9C
96 42 00 00 48 15 0C 5C 5E
96 42 00 00 48 15 0C 50 FD
96 42 00 00 48 15 0C D2 CD
96 42 00 00 48 15 0C A4 E8
96 42 00 00 48 15 0C 34 F9
96 42 00 00 48 15 0C 70 DE
96 42 00 00 48 15 0C 4C C3
96 42 00 00 48 00 0C E2 0C
96 42 00 00 48 17 0C FA 63
96 42 00 00 48 17 0C 7C 32
96 42 00 00 48 17 0C 1C 57
96 42 00 00 48 17 0C 7A EF
96 42 00 00 48 17 0C B6 86
96 42 00 00 48 17 0C 74 F0
96 42 00 00 48 17 0C F6 C0
96 42 00 00 48 17 0C 46 F2
96 42 00 00 48 17 0C B4 3A
96 42 00 00 48 17 0C 7C 32
96 42 00 00 48 17 0C EA FE
96 42 00 00 48 17 0C A8 04
96 42 00 00 48 17 0C F8 DF
96 42 00 00 48 17 0C 7A EF
96 42 00 00 48 17 0C 2E 55
96 42 00 00 48 16 0C 32 C0
96 42 00 00 48 16 0C A4 0C
96 42 00 00 48 16 0C EA 55
96 42 00 00 48 16 0C 26 3C
96 42 00 00 48 16 0C A2 D1
96 42 00 00 48 16 0C FC 15
96 42 00 00 48 16 0C 6A D9
96 42 00 00 48 16 0C BA 8E
96 42 00 00 48 16 0C 32 C0
96 42 00 00 48 16 0C 54 78
96 42 00 00 48 16 0C 90 D3
96 42 00 00 48 16 0C CC AB
96 42 00 00 48 16 0C 08 00
96 42 00 00 48 16 0C 80 4E
96 42 00 00 48 16 0C F8 74
96 42 00 00 48 16 0C 48 46
96 42 00 00 48 16 0C E8 E9
96 42 00 00 48 16 0C 56 C4
96 42 00 00 48 16 0C BA 8E
96 42 00 00 48 88 0C 1E 9C
96 42 00 00 48 88 0C 64 1A
96 42 00 00 48 88 0C 04 7F
96 42 00 00 48 88 0C 26 E0
96 42 00 00 48 88 0C 02 A2
96 42 00 00 48 88 0C 48 9A
96 42 00 00 48 88 0C 84 F3
96 42 00 00 48 88 0C 74 87
96 42 00 00 48 88 0C BA 52
96 42 00 00 48 88 0C 00 1E
96 42 00 00 48 88 0C 7C 45
96 42 00 00 48 88 0C B8 EE
96 42 00 00 48 88 0C FE 75
96 42 00 00 48 88 0C 6C D8
96 42 00 00 48 88 0C D0 49
96 42 00 00 48 88 0C 48 9A
96 42 00 00 48 88 0C B6 F1
96 42 00 00 48 88 0C 1A FD
96 42 00 00 48 88 0C 6A 05
96 42 00 00 48 14 0C 8C A2
96 42 00 00 48 14 0C E6 B9
96 42 00 00 48 14 0C C2 FB
96 42 00 00 48 14 0C 12 AC
96 42 00 00 48 14 0C B2 03
96 42 00 00 48 14 0C 20 AE
96 42 00 00 48 14 0C 24 CF
96 42 00 00 48 14 0C 0A F3
96 42 00 00 48 14 0C 72 C9
96 42 00 00 48 14 0C 30 33
96 42 00 00 48 14 0C 9E 83
96 42 00 00 48 14 0C 16 CD
96 42 00 00 48 14 0C 5C F5
96 42 00 00 48 14 0C D4 BB
96 42 00 00 48 14 0C 10 10
96 42 00 00 48 14 0C 60 E8
96 42 00 00 48 14 0C A6 FF
96 42 00 00 48 88 0C EC 54
96 42 00 00 48 88 0C A0 B1
96 42 00 00 48 88 0C 18 41
96 42 00 00 48 88 0C B8 EE

johnnyb
02-07-2013, 11:59 AM
Info from Jon Fether:
"There's a basic framing that consists of a two different types of basic message, system and show. (System messages start with 0x55, like "55 AA 16 01 01 02 0E 05 2D", Show messages start with 0x9X where X is a length nibble such as "96 42 00 00 BE 11 E6"). Each message contains a header byte at the beginning and checksum at the end. I hope to do a good writeup someday."
So far we have been looking at the 0x9X codes. Has anyone else seen the 0x55 codes?

johnnyb
02-07-2013, 12:04 PM
This is very exciting! I'm happy to see so much activity on the thread but am sad that I'm on business travel and don't have any of my hardware with me to play with oPossum's code. :( Only a few more days...

+1

I ordered MSP430 and Strellaris LaunchPads from TI yesterday. I can't wait to learn and play. On the JP1 forum someone suggested I can use an extender to create arbitrary delays and chain macros together to put on a light show to last a couple minutes. I have a couple as macros now. Although very short it's still quite fun.

timon
02-07-2013, 08:00 PM
To do that someone needs to go to the park with an IR receiver.

johnnyb
02-08-2013, 01:56 PM
I'm guessing that Jon Fether did his discovery of 0x55 codes by bit banging and not sniffing at the park.

At any rate, I totally agree the park needs to be checked out. To that end maybe we can talk some about getting that done. I was hoping to use IRScope and the IR Wigit to do this. Currently IRScope has a 15 second recording limit. Source is available, but I have not had a chance to look at it yet. Maybe this weekend. RobG mentioned a logger board. Rjchu was talking about the Iguana dongle.

RobG
02-08-2013, 02:06 PM
Since now we know for sure what we are dealing here with, I can put together a logger board and send it off to rjchu. Probably early next week.

timon
02-08-2013, 07:43 PM
I've been looking for a iPad app which could do it but the only thing I've found would run about $90 to just capture. A friend of mine is a developer so I'm going to see if he can help.

oPossum
02-09-2013, 04:30 PM
At any rate, I totally agree the park needs to be checked out. To that end maybe we can talk some about getting that done. I was hoping to use IR Scope and the IR Widgit to do this.

I assume you have an IR Widget from Tommy Tyler - they are by far the most common. He uses a QSE15x sensor that has a range of a few inches - so it would not be usable in the park.

The capture you got from the ears revealed the carrier frequency, data format and timing, and confirmed the suspect CRC was correct. That information will allow the creation of hardware than can do long term logging within the park.

oPossum
02-09-2013, 04:37 PM
I've been looking for a iPad app which could do it but the only thing I've found would run about $90 to just capture. A friend of mine is a developer so I'm going to see if he can help.

Using a 38 kHz IR demod module to gate a 10 kHz tone generator would allow anything that can record audio to record the IR signal. The circuit to do this can be very simple - a single 40xx logic chip or a MSP430 could be used.

The most interesting application would be to use a camcorder to record how the ears at the park are responding to the codes being sent. That would help identify codes that individual ears respond to in different ways.

Jrd
02-10-2013, 01:42 PM
Using a 38 kHz IR demod module to gate a 10 kHz tone generator would allow anything that can record audio to record the IR signal. The circuit to do this can be very simple - a single 40xx logic chip or a MSP430 could be used.

The most interesting application would be to use a camcorder to record how the ears at the park are responding to the codes being sent. That would help identify codes that individual ears respond to in different ways.

So if this simple circuit was added to a camcorder with an external mic jack then you could have the video showing what the ears are doing and the "audio" showing what the command to the ears is?

LabRat
02-10-2013, 02:05 PM
that's a pretty cool idea.



So if this simple circuit was added to a camcorder with an external mic jack then you could have the video showing what the ears are doing and the "audio" showing what the command to the ears is?

Jrd
02-10-2013, 02:16 PM
that's a pretty cool idea.

And no one would suspect you at all... :shifty:

timon
02-10-2013, 04:43 PM
The only minor problem with the 10K tone is decoding it which is why I was thinking about a good old modem chip, if you can still find one, and just send 2400 baud modem tones to the recorder. If I remember 2400 baud does not do any training so you only need to just send.

The same chip could then be used to send from the recorder back to the computer.

Just a thought.

rjchu
02-10-2013, 09:41 PM
Sorry for the delay in replying, I've been out of town for work for most of the past week...

The recording idea sounds interesting but, perhaps this can save everyone some time and trouble. Attached is a capture from World of Color that I Jon sent me to play with. It's got a fair number of 55 codes in it as well.

I'm still getting back into the swing of things after being out of town for so long and hope to play with some of the code posted here, these codes from Jon and everything else that's been going on in this thread for the past week. Good stuff! :)

Happy hunting,

-joni-

rjchu
02-11-2013, 08:10 PM
Now that I'm back in town I've also been catching up on a couple emails with Jon and he asked for the link to our discussion (must have missed it when I sent it to him a while back). In any case, I think he'll be joining in the fun here soon which should really help this effort get wings...err EARS....and take off! :)

Thanks,

-joni-

RobG
02-11-2013, 08:35 PM
BTW, are you familiar with MagiQuest (http://en.wikipedia.org/wiki/MagiQuest)? It's sort of like GwtS ears, but in reverse. Participants with IR wands control the show or activate different things. It could be fun to allow people to control some aspects of your show. For example, you could have a wall with IR enabled pixels on which you could "paint" or trigger effects.

budude
02-11-2013, 10:46 PM
BTW, are you familiar with MagiQuest (http://en.wikipedia.org/wiki/MagiQuest)? It's sort of like GwtS ears, but in reverse. Participants with IR wands control the show or activate different things. It could be fun to allow people to control some aspects of your show. For example, you could have a wall with IR enabled pixels on which you could "paint" or trigger effects.

Perhaps some hooks into the Microsoft Kinect gizmo instead? I haven't followed that much but I know there are lots of hacks for it to map things for you...

timon
02-11-2013, 11:54 PM
Sorry for the delay in replying, I've been out of town for work for most of the past week...

The recording idea sounds interesting but, perhaps this can save everyone some time and trouble. Attached is a capture from World of Color that I Jon sent me to play with. It's got a fair number of 55 codes in it as well.

I'm still getting back into the swing of things after being out of town for so long and hope to play with some of the code posted here, these codes from Jon and everything else that's been going on in this thread for the past week. Good stuff! :)

Happy hunting,

-joni-

I've been going through the files and it's hit or miss on the CRC's. A lot of they pass and a lot of them fail. So far none of the 55 codes have passed. Anyone else get something different?

Jon Fether
02-12-2013, 02:08 AM
I've been going through the files and it's hit or miss on the CRC's. A lot of they pass and a lot of them fail. So far none of the 55 codes have passed. Anyone else get something different?

I found that the 55 codes use a very simple checksum - it's literally an addition of all of the bytes in the message, add one, then take the low byte of the additive result...

55 AA 19 04 01 02 0E 01 00 00 35 64

0x55+0xAA+0x19+0x04+0x01+0x02+0x0E+0x01+0x00+0x00+ 0x35 = 0x0163
0x0163 +1 = 0x0164
0x0164 % 0x100 = 0x64 = Checksum

I'm new to this form but have heard a lot about it. I understand that someone brilliant here managed to discover the Maxim 1-Wire checksum for the 9X codes.

I do own a glow-with-the-show recording device that generated the files I sent to Mr. Chu. It's an Arduino with a custom program that captures data over the native serial interface and does only a small amount of error rejection. (UART serial is prone to a lot of 0xFF's getting stuffed into the datastream due to a single bit being easily confused for a start bit.) The data is stored on a MicroSD card on my Arduino Ethernet Shield. I created text files with timestamp offsets from program start followed by hexadecimal data. Not very efficient but an 8GB card goes a long way.

The hardware has a IR receiver module like this one

18165

I just stick it to the ears and run it to the Arduino in my pocket which is powered with 6 AA batteries in series. I've so far recorded WoC, Fantasmic!, Believe in Holiday Magic, and a few of the various codes some of the rides and areas emit (Cars Land, Disneyland Railroad, etc). I mainly recorded them for reverse engineering purposes but it is fun to play them back to the ears. There's a timecode embedded in the datastream as the 55 AA messages when a show is going, such as the above example. Not all 55 AA's are timecodes, but timecodes are written like this:

55 AA 19 04 01 02 0E 01 00 00 35 64 - 00h00m53s
55 AA 19 04 01 02 0E 01 00 02 05 36 - 00h02m05s
55 AA 19 04 01 02 0E 01 00 02 06 37 - 00h02m06s
55 AA 19 04 01 02 0E 01 00 02 07 38 - 00h02m07s

I don't know the significance of the rest of the message.

I wrote respective playback and brute-forcing software as well for Arduino. This allowed me to make local codes and test the effects. My playback program also displays the timecode messages over the attached serial port. The timecodes for Believe! match exactly to the official soundtrack releases. The timecode for Fantasmic! matches a patched version of the soundtrack I made with the Disneyland official soundtrack prepended with the show announcement from the WDW official soundtrack. Working backwards from the timecode you can find the correct file offset for the start of the show.

The output is emulated 38kHz 8-N-1 2400 baud data over a GPIO pin. I initially thought it matched IRDA SIR, but it does not to the best of my knowledge. I did some hardware hacking on a STIR4200 based USB IRDA dongle but it was a complete bust.

I will make an effort to post the code to my programs as soon as possible (The code is too sloppy for release at the moment). The IR emulation is loosely based on the work from LadyAda's code formerly at http://www.ladyada.net/learn/sensors/ir.html.

I also have done some protocol analysis by brute-forcing single byte commands as well as playing back portions of captured files. I'll post more on that soon as well.

Happy (late) Holidays
-Jon

timon
02-12-2013, 03:08 AM
So as far as you can tell its only the 9x messages that control the color of the ears. Why would the ears need time code so I'm thinking that the 55AA may not even be used by the ears but by other devices around the park. I think the fact that the 55 codes use a different check sum tends to supports this.

Jon Fether
02-12-2013, 05:48 AM
So as far as you can tell its only the 9x messages that control the color of the ears. Why would the ears need time code so I'm thinking that the 55AA may not even be used by the ears but by other devices around the park. I think the fact that the 55 codes use a different check sum tends to supports this.

55 AAs are also used by some of the codes that shut off the ears during rides (and prevent turning them on for a while unless you pull the battery). There are some such commands that they do respond to. So I know these ears know about them.

I was doing a little more research into colors:

The mouse ears use 2 different types of color signals (unless there's a third one I've not been able to detect). 1-bit and palette colors. 1-bit I mentioned in a previously crossposted item (61=Blue, 62=Green, 64=Red, 66=Yellow/Red+Green etc..). But there is another series of colors. These palette colors as I call them are predefined and activate the ears approximately with the following values:


Code Red Green Blue RGB
00 67.43% 99.76% 99.75% ACFEFE
01 12.06% 56.39% 99.78% 1F90FE
02 12.24% 30.01% 99.57% 1F4DFE
03 12.23% 0% 99.78% 1F00FE
04 0% 0% 99.78% 0000FE
05 99.96% 79.59% 99.78% FFCBFE
06 67.53% 30.06% 99.70% AC4DFE
07 38.09% 14.89% 99.85% 6126FF
08 46.70% 0.46% 67.21% 7701AB
09 99.87% 67.34% 99.71% FFACFE
0A 99.98% 17.26% 99.81% FF2CFF
0B 99.68% 5.05% 99.91% FE0DFF
0C 99.98% 0% 79.39% FF00CA
0D 99.90% 0% 37.97% FF0061
0E 99.89% 0% 6.78% FF0011
0F 100% 79.74% 8.60% FFCB16
10 99.90% 33.77% 3.93% FF560A
11 99.86% 46.76% 0.43% FF7701
12 99.84% 100% 0% FFFF00
13 99.88% 26.56% 0% FF4400
14 99.88% 6.75% 0% FF1100
15 99.88% 0% 0% FF0000
16 0% 99.74% 100% 00FEFF
17 0% 99.78% 42.10% 00FE6B
18 0% 99.78% 17.44% 00FE2C
19 0% 99.78% 0% 00FE00
1A 0.45% 99.84% 0% 01FF00
1B 86.02% 99.93% 79.37% DBFFCA
1C 99.79% 99.67% 99.77% FEFEFE
1D 0% 0% 0% 000000

These can be accessed by sending the ears "0E XX" where "XX" is the code from the above list. For instance:

91 0E 14 A3

Will turn the ears Orange (About 100% red, about 7% green).

The color approximations you get from the HTML color codes shown above are only relative to each other, the effect of the LED illuminators on each ear isn't the same as the response of a computer monitor. But I'm certain in this group of Christmas house-lighters everyone is probably already familiar with that. I based the color measurements based on the PWM duty cycle I observed with a logic analyzer on the LEDs so it's rather dodgy. You'll be much better off to simply preview each color on your own mouse ears, some of the differences are very subtle to the human eye.

Selecting the color for both ears is easy. You combine one of the codes that affect both ears to the same color with a second code immediately following that only affects the right ear. A single bit is set to indicate "Set right ear only":

To make any of those colors only affect the right ear only (to select two colors), add 0x80 to any of them. Do not add it to the 0x0E.:
91 0E 00 5F - Turn both ears white
91 0E 94 2F - Turn right ear orange
Leaves left ear white and right ear orange. You can also combine this to:
94 0E 00 0E 94 11 - Same effect

To make the 1-bit colors (0x60-0x67) only affect the right ear, add 0x08 to any of them.
91 61 6A 06 - Turn left ear Blue and right ear Green (0x62 + 0x08)

More notes to come.

oPossum
02-12-2013, 05:59 AM
I found that the 55 codes use a very simple checksum - it's literally an addition of all of the bytes in the message, add one, then take the low byte of the additive result...


Exclude 55 AA from the checksum calculation and then it is an exact match - no need to add 1.

oPossum
02-12-2013, 06:40 AM
I've been going through the files and it's hit or miss on the CRC's. A lot of they pass and a lot of them fail. So far none of the 55 codes have passed. Anyone else get something different?

Yes, most lines have valid CRC/checksum.

Here are the two largest files filtered for valid CRC/checksum and lines with multiple packets split so each line is only one packet.

rjchu
02-12-2013, 09:37 AM
...and with that...welcome aboard Jon! ;)

-joni-

oPossum
02-12-2013, 11:53 AM
OK, so there can be multiple commands in each packet. So far we know two of them.

I took the two largest log files (filtered for valid CRC), merged them, removed 55 AA packets, removed timestamps, removed first byte of packet (9x), removed checksum, and then sorted.

What remains is just the inner part of the packets that contain one or more commands.

I started doing some simple pattern matching and guesswork to separate out the individual commands.

After staring at hex for too long, I am beginning to go insane, so this will have to be a group effort. :)

File attached - have fun.

RobG
02-12-2013, 01:24 PM
Just a speculation.
They have to be able to control ears randomly, so I am thinking all ears must have some sort of unique id.
It appears that there are a lot of commands that start with Fx and have the same content. There are also commands that start with 20 and are same as Fx.
Is it possible that Fx selects a particular group of ears and 20 is an all command?
For example, F1 would select ears with serial xxxx1, F0 with xxxx0, etc.
It should be very easy to verify. A set of ears should respond to one of those Fx commands and only one (there's a possibility that the ID is not fixed, it could be generated on reset or after each command to make it more random.)

20 48 85 58 0C
F1 48 85 58 0C
F2 48 85 58 0C
F3 48 85 58 0C
etc.


Also, and someone has already mentioned it, I don't think all commands are ear specific.
It just doesn't make sense why ears would need a time code. Ears should just get color on/off/ and all off.
We might be going too deep into this thing.

Samj435
02-12-2013, 02:43 PM
If you look at the video on youtube with the imagineer talking about the hats, he does talk about them having unique serial numbers. He also goes on to say there are something like 40 diffrent "zones" in the show area (maybe less, i'm going my memory as I'm at work and can't watch it). He mentions being able to "sweep" the color across the area.

timon
02-12-2013, 03:00 PM
OK, so there can be multiple commands in each packet. So far we know two of them.

I took the two largest log files (filtered for valid CRC), merged them, removed 55 AA packets, removed timestamps, removed first byte of packet (9x), removed checksum, and then sorted.

What remains is just the inner part of the packets that contain one or more commands.

I started doing some simple pattern matching and guesswork to separate out the individual commands.

After staring at hex for too long, I am beginning to go insane, so this will have to be a group effort. :)

File attached - have fun.

Nice list although I'm having one minor problem with it. I don't know for sure, I can guess on many, which are the 9x commands and which are the 55 AA commands.

oPossum
02-12-2013, 03:07 PM
That is just the 9x packets. All the 55 AA have been removed. I don't think they mean much too the ears.

timon
02-12-2013, 03:07 PM
Although I'm sure that Disney can read out the serial numbers I'm not sure how well that would work during an actual show. Now working with a group number, which could be the lower part of the serial number, would be much more reasonable although you would not want the groups to be very large or you may not have enough hats in a given group to really work with.

Dividing the show area into groups is totally doable. The IR transmitters could easily be directed into areas. The biggest problem I see there is area overlap if you don't have the transmitters high enough.

Boy would I love to sit down with a Disney Engineer and discuss this but fat chance on that happening.



That is just the 9x packets. All the 55 AA have been removed. I don't think they mean much too the ears.

Makes sense, thanks.

Has any 9x data bytes show up in the data stream except to signal a packet type?

timon
02-12-2013, 03:16 PM
I was thinking, viewing the lines with both Hex and Binary may help decode it. Example.


20 24 / 62 | 0010-0000 0010-0100 / 0110-0010

Now bits used as flags will start to visually appear.

oPossum
02-12-2013, 04:17 PM
Has any 9x data bytes show up in the data stream except to signal a packet type?

Sure, it can appear as a command or data following a command. I see no evidence that 9x is escaped in any way.

Jon Fether
02-13-2013, 03:07 AM
For anyone with an Arduino - The Arduino command transmitter is now attached. I have chosen to release it under the terms of the GPLv2. Hook up an IR LED and a 220 ohm resistor in series for current limiting purposes (all 3 items available from Radio Shack) to Pin 3 and Ground and start "blasting your ears". TI MSP430 LaunchPad w/Energia hasn't yet been tested but I think it might work with a little modification. Use the Serial Monitor with Linefeeds enabled to enter commands to your ears in hex over the serial port at 9600 baud.

Someone asked about FX sequences, grouping, and the 55 AA messages. I hope to post a little more info I've learned so everyone can follow.

First, FX (F1-FF, no idea about F0) delays the mouse ears by 100msec per count of unit X. (100-1500msec). You'll find it in shows used both as part of show sequences and as a forward-error-correction algorithm. The same message might be broadcast several times, for instance:


000E39DE: 94 FD 48 85 58 0F CC 94 FC 48 85 58 0F 01
000E3AA6: 94 FB 48 85 58 0F 50 94 FA 48 85 58 0F 9D
000E3B6E: 94 F9 48 85 58 0F D3 94 F8 48 85 58 0F 1E
000E3C35: 94 F7 48 85 58 0F 71 94 F6 48 85 58 0F BC
000E3CFE: 94 F5 48 85 58 0F F2 94 F4 48 85 58 0F 3F
000E3DC6: 94 F3 48 85 58 0F 6E 94 F2 48 85 58 0F A3
000E3E9B: 94 F1 48 85 58 0F ED 94 20 48 85 58 0F 7E

All of these messages are "48 85 58 0F". But it is broadcast several redundant times with different time offsets. 20 is placed in the one to be run immediately. I believe this system is to ensure that all ears do the same thing simultaneously even if there are multiple transmission errors such as an ear hat being on the fringe of two zones.

This example fades out the ears over a duration based on a timing loop specified after the "58" command (00 goes faster, FF goes slowest). The 48 XX command has several show effects embedded in it. But I don't know most of the syntax for every code. I'll go into what I know on it later, but exploring is best.

An example of it in a show command is this:

92 6E F2 66 07 - Turns right ear yellow, waits 200ms, then turns both ears yellow.

Grouping is something I haven't fully figured out. But I think a random number is picked between 00 and 7F based on a little analysis of the numbering below. You'll recognize my above example as being the Yellow message for group 1.


98 20 D2 35 00 F2 01 02 20 66 1D - Pick Number (Haven't figured it out how this works yet)

97 20 89 A0 19 26 6E F2 66 F8 - Yel GRP 1 == (00-18, Including Unitialized ears based on some testing.)
98 20 8C 19 A0 32 26 69 F2 61 F5 - Blu GRP 2 == (19-31)
98 20 8C 32 A0 4B 26 6B F2 63 C1 - Cyan GRP 3 == (32-4B)
98 20 8C 4B A0 64 26 6C F2 64 B0 - Red GRP 4 == (4B-63)
99 20 81 A0 64 26 0E 8D F2 0E 0D DF - Pink GRP 5 == (63-7C? 7F?)

So 89, 8C, and 81 seem to be group pickers. A0 seems to specify the upper or lower limit in the following byte. Don't know what the 26 means.

Note that Pink is an extended palette color. You can mix and match 1-bit and palette colors, this is valid.

55 AA: I have said before that 55 AA is used by the ears for what I call "System" messages. An example you can try on your newly-minted Arduino ear transmitter is:


55 AA 08 C4 13 FF 01 ED AF FF 7A
This will shut down your ears and you won't be able to power them on for approximately 6 minutes (or until you pull one of the 2 computer batteries). This is how they shut down the ears during rides, in this case the Disneyland Railroad's tunnel. The ears pop on by themselves after the timeout. I still don't know the syntax details of this. It does conform to the published and corrected checksum for 55 AA which is the sum of all bytes except 55 and AA modulo 0x100. (Thanks oPossum.)

I believe the timecodes broadcast on 55 AA are used by something like closed captioning devices, but I am not certain.


I've poked around on the 48 XX codes a bit, here are my notes:
48 00 - Random Effect (Possible 2 Min Dead Ears)
48 01 - Quick Smooth Fade Out
48 02 - Fade Through to Black (Fades up and through color and to black)
48 03 - Can't describe properly. Just watch.
<Several sequences I'll leave as an exercise for the reader to view>
48 1A - From power on/off sequence, a few short blinks and a fade.
<Several sequences I'll leave as an exercise for the reader to view>
48 1F - Off

48 80 - Display Power-On sequence and enter random demo mode
48 81 - Display Power-Off sequence, pretend going offline for 2 minutes
48 82 - Use hard color transition, not crossfade
48 83 - Use crossfade, not hard color transition
48 84 - Strobe flashes into running program
48 85 - Fade Out
48 86 - Fade In
48 87 to 48 8F - Various color sequences. Just watch them.

48 80 is useful to reset the ears to the random demo mode without having to actually power them down and up.

Also, 24 (as a command) is a rapid setting of both ears to Black. Used in shows often.

I'll keep looking through my notes for more treasure trove for people to enjoy.
-Jon

rjchu
02-13-2013, 09:44 AM
Wow. So much here to play with and so little time. :(

For those of you in CA, we might be at the parks Monday. Not sure what time or how long (depends on the little ones) but if you're pass holders and its convenient, would be nice to at least put some faces to the forum posts. ;)

Thanks for sharing,

-joni-

timon
02-13-2013, 03:29 PM
Jon,

Wow, you've been busy. Looking forward to more info so I can start working on a transmitter design. This is what's called clean room engineering. Your working on the specification and other work on the design. That way we all have clean hands as cannot be accused of ever seeing the code.


For those of you in CA, we might be at the parks Monday. Not sure what time or how long (depends on the little ones) but if you're pass holders and its convenient, would be nice to at least put some faces to the forum posts. ;)-joni-

I think that's doable, let me check with my better half.

Anyone else?

jimbo3301
02-13-2013, 04:37 PM
Jon,

Let me check with the better half. Perhaps we can sneak over for a few hours.

Jim

Jon Fether
02-13-2013, 05:44 PM
Wow. So much here to play with and so little time. :(

For those of you in CA, we might be at the parks Monday. Not sure what time or how long (depends on the little ones) but if you're pass holders and its convenient, would be nice to at least put some faces to the forum posts. ;)

Thanks for sharing,

-joni-

Sounds fun. I will try to get there after work.

timon
02-13-2013, 05:46 PM
The question is how to find each other:)

jimbo3301
02-13-2013, 06:12 PM
Maybe... pick a meeting place around 1:00ish, 2:00ish or exchange cell numbers?

johnnyb
02-13-2013, 06:39 PM
I'm not sure I can get into the parks on Monday. Any chance of a short meet and greet at DownTown Disney or even the post security area before you head into the parks?

timon
02-13-2013, 09:29 PM
Monday is a blackout day for all APs except Preimum. Tuesday only SoCal is blacked out and the rest if the week is clear.

RobG
02-13-2013, 10:16 PM
Grab me a pair of ears while you there :) Do you guys (APH) get any discounts?

timon
02-13-2013, 11:23 PM
Need to check and see if we still do. There was talk about it being discontinued except for food after Jan 1 but I bought my ears after that and got my 20% which made the ears an even $20. I'll let you know. They do have discounts coupons that show up on receipts but you have to buy before 4PM that day so maybe that going to replace it.

johnnyb
02-13-2013, 11:27 PM
You want to know an employee during Christmas season. I think they can get 40%. Employee discounts seem to vary by employee status, years of service, and time of year.

timon
02-13-2013, 11:51 PM
My Niece used to be a lead but moved on to bigger and better things. Needless to say when she worked that we got everything Disney when it came to gifts. They have their own store that not located at the resort.

jimbo3301
02-14-2013, 12:19 PM
Monday is a blackout day for all APs except Preimum. Tuesday only SoCal is blacked out and the rest if the week is clear.

Just looked and Deluxe passports are not blacked out on Monday.

johnnyb
02-14-2013, 05:16 PM
I can get a 20% discount on the ears which should make them an even $20. I think annual pass holders probably get this too. Maybe someone will find a better deal.

johnnyb
02-15-2013, 01:18 AM
This code is a standalone (no computer required) GwtS code transmitter. For testing purposes it simply sends the 16 three byte codes (90 6x CRC). It uses two timers and should produce a signal very close to that sent by the GwtS ears.
I'm quite happy to say I have Kevin's stand alone program running on a LaunchPad doing a show on a pair of ears as I type this....
Small victories as I learn.

rjchu
02-15-2013, 12:11 PM
I'm quite happy to say I have Kevin's stand alone program running on a LaunchPad doing a show on a pair of ears as I type this....
Small victories as I learn.

I know what you mean! It's a very boring video to watch but the first time I used Jon's Arduino sender and got a set of (UNassembled) ears to obey my commands was very cool!

https://vimeo.com/59459278

-joni-

timon
02-18-2013, 12:00 AM
Who is going to the park on Monday?

When and where to meet?

rjchu
02-18-2013, 02:41 AM
Who is going to the park on Monday?

When and where to meet?

We will be there but I'm not sure what time we'll head out thigh I'm guessing it won't be morning since the wife and I just got back from Vegas this afternoon and the kids are tired after a few days with the in-laws....but not as tired as the in-laws are I'm sure. ;)

Text me when you're there and/or I'll be check here every so often. I'll most likely be wearing a Disney print Hawaiian shirt and a white Cal ball cap.

Thanks,

-joni-

RobG
02-18-2013, 10:51 AM
Don't forget my ears guys :) I can PayPal anytime.

jimbo3301
02-18-2013, 11:36 AM
I'm not going to make it today. Maybe next time.

johnnyb
02-18-2013, 12:11 PM
Family is in town with an event today. I would be glad to go to Disney ordinarily. Plans are to go to the parks on Friday if anyone is going then.

rjchu
02-18-2013, 12:46 PM
Don't forget my ears guys :) I can PayPal anytime.

If memory serves two of them fit into a large flat rate box. Since that's the size box for one hat, you sure you don't want two anyways? ;)

-joni-

timon
02-18-2013, 01:00 PM
I'll still be going later today and can go sometime in Friday. I have to work it around my Therapy Dog visit with couple of my Hospice patients.

I need to be sure that my ears work correctly before I transfer them to a Disney ball cap as I really don't like the existing hat. I still need to find another headlamp with a battery pack that fits on the back of the headband. I don't want to rip apart the one I have since I use it a lot.

Jholmes
02-18-2013, 01:26 PM
Instead of reading 11 pages of information, would someone be willing to briefly state how far you've gotten in "hacking" the Disney ears?
Also, I live about an hour from Disneyland and would love to meet-up with the rest of you if we are coordinating an "event."

rjchu
02-18-2013, 01:36 PM
Instead of reading 11 pages of information, would someone be willing to briefly state how far you've gotten in "hacking" the Disney ears?
Also, I live about an hour from Disneyland and would love to meet-up with the rest of you if we are coordinating an "event."

Pretty far. We speak and the ears obey. Details are in the thread and won't be rehashed here for the sake of everyone's email inbox that's subscribed to this thread.

Thanks,

-joni-

rjchu
02-18-2013, 05:43 PM
At the park. Probably another couple hours or so.

-joni-

RobG
02-18-2013, 05:45 PM
If memory serves two of them fit into a large flat rate box. Since that's the size box for one hat, you sure you don't want two anyways? ;)

-joni-

I have 2 kids... why not.

timon
02-18-2013, 08:45 PM
At the park. Probably another couple hours or so.

-joni-

Just about ready to head out but I'm guessing you'll be gone by the time I get there.

John F, are you going to make it after work?

timon
02-18-2013, 09:48 PM
Just got to the park.

rjchu
02-18-2013, 10:00 PM
Just got to the park.

You were right, we left about 5 or so. Girls were tired and pretty cranky. The youngest was in full meltdown mode do I didn't get a chance to get Rob's 2 hats on the way out. If you can't get them tonight ill try again next time we are there.

Given that there seems to be a half dozen or so of us around here we should try a little mini meetup sometime that's a bit more organized than our failed Disneyland flash mob. ;)

Thanks,

-joni-

timon
02-19-2013, 01:35 AM
I agree. I saw Jon at the park and mention it to him so let's put something together.

rjchu
02-19-2013, 02:55 AM
I'm trying to implement the checksum calculator in perl just so I can play a bit more and I'm having some trouble getting my CRC's to match what's been discovered/published here and I think it's related to what timon posted here. I'm using the table lookup algorithm and values in post #38 from Rob and based on what's been said here, I *think* I need to reverse the byte order, or start at the tail of the string instead of the head, and then do one last XOR with the result as it stands at that point and 0 (zero). Is this correct?

My *REALLY* crappy perl code is below...

Thanks,

-joni-

@crc_table = (0, 94,188,226, 97, 63,221,131,194,156,126, 32,163,253, 31, 65,
157,195, 33,127,252,162, 64, 30, 95, 1,227,189, 62, 96,130,220,
35,125,159,193, 66, 28,254,160,225,191, 93, 3,128,222, 60, 98,
190,224, 2, 92,223,129, 99, 61,124, 34,192,158, 29, 67,161,255,
70, 24,250,164, 39,121,155,197,132,218, 56,102,229,187, 89, 7,
219,133,103, 57,186,228, 6, 88, 25, 71,165,251,120, 38,196,154,
101, 59,217,135, 4, 90,184,230,167,249, 27, 69,198,152,122, 36,
248,166, 68, 26,153,199, 37,123, 58,100,134,216, 91, 5,231,185,
140,210, 48,110,237,179, 81, 15, 78, 16,242,172, 47,113,147,205,
17, 79,173,243,112, 46,204,146,211,141,111, 49,178,236, 14, 80,
175,241, 19, 77,206,144,114, 44,109, 51,209,143, 12, 82,176,238,
50,108,142,208, 83, 13,239,177,240,174, 76, 18,145,207, 45,115,
202,148,118, 40,171,245, 23, 73, 8, 86,180,234,105, 55,213,139,
87, 9,235,181, 54,104,138,212,149,203, 41,119,244,170, 72, 22,
233,183, 85, 11,136,214, 52,106, 43,117,151,201, 74, 20,246,168,
116, 42,200,150, 21, 75,169,247,182,232, 10, 84,215,137,107, 53);

sub calc_crc {
my $code = $_[0];
my $res = 0;
my $i = 0;
print "GOT '$code'\n";
my $len = length($code);
print "LEN $len\n";
for ($i = $len-1; $i >= 0; $i--) {
my $strPiece = substr($code, $i, 1);
print "STRP '$strPiece'\n";
my $tableIndex = $res ^ substr($code, $i, 1);
$res = $crc_table[$tableIndex];
print "TABLE INDEX $tableIndex, RES NOW '$res'\n";
}
print "RETURNING '$res'\n";
return $res ^ 0;
}

print "FINAL '", &calc_crc("9060"), "'\n";




Ok, figured it out. You have to set the sequence up for both reverse data bytes and reverse CRC result before final XOR. Once done then it works. Check out this calculator (http://www.zorc.breitbandkatze.de/crc.html) which does a much better job that the others I was using.

CRC order: 8
CRC polynom (hex) 31
Initial value (hex): 0
Final XOR value (hex): 0
Check both "reverse data bytes" and "reverse CRC result before Final XOR"

Make sure if your putting hex in the data area that it's in the following format. "%90%60".

I feel much better now that issue is out of the way:)

RobG
02-19-2013, 09:13 AM
I think your problem is data type, for example $res should be declared as u_int8.

timon
02-19-2013, 10:55 AM
Ok, I'm not a perl programmer but one problem I see is yor feeding the hex string directly into the CRC routing. The CRC routing takes a binary string so you need to take the hex string two characters at a time and convert to a string before sending to the CRC routine.

OMT, watch the string functions used that they don't terminate on a null.

Materdaddy
02-19-2013, 12:00 PM
Ok, I'm not a perl programmer but one problem I see is yor feeding the hex string directly into the CRC routing. The CRC routing takes a binary string so you need to take the hex string two characters at a time and convert to a string before sending to the CRC routine.

OMT, watch the string functions used that they don't terminate on a null.

If you're not a perl programmer, why are you trying to use perl for this? Are you trying to learn, or were you using some code snippit you found in the Intertubes?

timon
02-19-2013, 07:42 PM
I'm not writing it just commenting on the code I was reading and what I thought the problem might be.

BTW, although I don't write perl I can generally read most programming languages well enough to figure out what the code is trying to do.

johnnyb
02-22-2013, 11:45 AM
The plan is to be at Disney today with family. If anyone is going to be there today and interested in saying hello post or PM. I will PM my cell#.

johnnyb
02-22-2013, 11:48 AM
Don't forget my ears guys :) I can PayPal anytime.

Did you get your ears? I can try to pick them up today.

RobG
02-22-2013, 06:36 PM
No I didn't. If it's not too late, I am still interested.

johnnyb
02-23-2013, 02:04 PM
No I didn't. If it's not too late, I am still interested.

I picked up 2 hats. There were $20 each. PM me address and shipping preferences. I was going to ask a friend that ships a lot of stuff for a suggestion, but expect the 2 hats in a USPS flat rate box will be the cheapest shipping as suggested here.

johnnyb
02-23-2013, 02:06 PM
BTB, is anyone local have the skills and willingness to desolder and solder a new 20 pin TSOP?

timon
02-23-2013, 03:58 PM
BTB, is anyone local have the skills and willingness to desolder and solder a new 20 pin TSOP?

Johnny, what are you up to:)

budude
02-23-2013, 05:34 PM
Johnny, what are you up to:)

shh.... :cool2:

johnnyb
02-23-2013, 09:54 PM
I have a toy that need fixing. :pinch:

timon
02-23-2013, 10:15 PM
You need a hot air rework station just like I need one. Those make removing SMD parts easy.

johnnyb
02-24-2013, 12:03 PM
I have been gearing up because of GwtS ears and micro controllers which included getting a CSI temp controlled iron recommended here in a different thread. So far it's very nice. Air stations look pretty sweet. I especially liked the custom tips for the different packages. Some of the build your own air iron plans on the web may be worth a try. I work at a university. I may need to find out if any of the EE labs have such a station and if I can get any access.

rjchu
02-24-2013, 02:40 PM
Has anyone started thinking about transmitters that could be controlled via hls or other sequencing software?

Thanks,

-joni-

viperfan91
02-25-2013, 07:40 PM
I believe the timecodes broadcast on 55 AA are used by something like closed captioning devices, but I am not certain.

That would make sense given the fact that Alice (the close captioning and assistive listening device) has all of the audio description and closed captioning separated into different files or, in the case of the closed captioning, different lines in an XML file. If you don't get in the right spot the device will not activate.

oh, and Hi! :happy:

Materdaddy
02-28-2013, 12:54 AM
We're going to be purchasing season passes very shortly here. I'm hoping to see the show itself for the first time. I also applaud everybody's effort here at reverse engineering the protocol. I'm really hoping I can have some sort of transmitter set up this year and tell people to bring their unmodified hats if they have them.

RobG
02-28-2013, 07:48 PM
Got my ears today! Thanks JB.

EDIT: hmmm, looks like it will be very hard to anything without destroying them.
My initial attempts to read the flash ended up in failure and I had to put the ears back together.
I wish I got three of them :)

timon
02-28-2013, 08:58 PM
Has anyone started thinking about transmitters that could be controlled via hls or other sequencing software?

Thanks,

-joni-

Sparkfun nor longer sells this Key fob based on the nRF24L01 (https://www.sparkfun.com/products/8602) but you can download the Eagle files and make them. The case can easily be found.

rjchu
02-28-2013, 10:58 PM
There are four pads that go to the appropriate pins. I tried, and also failed, to read anything from it. For sake of convenience though I ran the wires long so I could still experiment even though the hat was back in one piece. YMMV.

In any case, now that you've got these I can't wait to see how things progress! ;)

Thanks,

-joni-


Got my ears today! Thanks JB.

EDIT: hmmm, looks like it will be very hard to anything without destroying them.
My initial attempts to read the flash ended up in failure and I had to put the ears back together.
I wish I got three of them :)

LabRat
03-01-2013, 09:38 AM
I've been doing an IR transmitter design, based on Lightman's experiments.
The board should make an excellent starting point for the development of a GWTS protocol converter.

See: Yet Another IR Thread (http://doityourselfchristmas.com/forums/showthread.php?25474-DMX2IR-transceiver-%28aka-Yet-Another-IR-thread%29)

It's already reading the incoming DMX stream, so the missing part is the translation to the GWTS protocol. The latest version (just send off to get the boards) will support three additional daughterboards, so that you can setup multiple emitters, and completely saturate the region.



Has anyone started thinking about transmitters that could be controlled via hls or other sequencing software?

Thanks,

-joni-

RobG
03-02-2013, 01:17 AM
This is how my IR transmitter will most likely look like.

EDIT: latest edition

1.9" round
16 TSAL7600 (http://www.vishay.com/docs/81015/tsal7600.pdf) 60 deg. LEDs
4 MOSFET constant current drivers
3 pin Euro terminal
requires 12V/3A supply

183721837318374

johnnyb
03-03-2013, 08:13 PM
Sparkfun nor longer sells this Key fob based on the nRF24L01 (https://www.sparkfun.com/products/8602) but you can download the Eagle files and make them. The case can easily be found.

I went to MicroCenter to get a cable and noticed they have a better selection of Arduino and Sparkfun toys the Fry's. I picked up one of these IR Control Kit Retail (https://www.sparkfun.com/products/10783). I have started playing with the TSOP38238 and IR LED with the LaunchPad. The little remote might not be a bad way to communicate with an IR device.

timon
03-03-2013, 09:10 PM
Heck, you were less than 2 miles from my house. Had I know I would have come over.

I've not checked yet if Microcenter costs more than ordering it direct from Sparkfun.

johnnyb
03-04-2013, 01:13 AM
I live in the other end of Irvine. We'll have to make something happen. Maybe an excuse to visit Tustin Brewing Company. Is there a good electronics store in the area. I have not found one. Microcenter seems to sell the Sparkfun stuff for the listed price on the Sparkfun website.

timon
03-04-2013, 03:12 AM
There are only three stores that are worth anything, Fry's, Microcenter and MarVac. Well in a pinch maybe RatShack:cry:

I do have a local source for Meanwell supplies.

If I need cat5 cables, connectors and the like I have an account at GraybaR.

evilsoapbox
03-23-2013, 01:28 PM
Hello everyone,

I use an Arduino to interact with my ears. In the event anyone is going to do the same, or use a C-based microcontroller, I have thrown all of the colors of which I know into a header file for easy use:

https://github.com/evilsoapbox/EvilArduinoBox/tree/master/GlowShow

RobG
03-25-2013, 11:24 PM
Assembled half of the board, wrote a little driver for LaunchPad, did some experiments, then something got fried because of my messy wiring :( Oh well.

1875818759

timon
03-25-2013, 11:58 PM
Assembled half of the board, wrote a little driver for LaunchPad, did some experiments, then something got fried because of my messy wiring :( Oh well.

1875818759

So your pulling about 400ma at 12V with a 400ms/sr. Not bad, not bad at all. What housing will the board fit into? I could see putting some 3 pin waterproof pigtails on these in a nice housing that can be mounted along the eves. Something like these (http://www.lowes.com/pd_144255-30383-LV11760BK2_0__?productId=1017397&Ntt=landscape+lights) with the deck bracket (http://www.lowes.com/pd_329371-53027-EH524BK_0__?productId=3275981&Ntt=landscape+lights).

RobG
03-26-2013, 12:17 AM
It's 4 x 700mA @ 12V.

I didn't have time to look for the housing, but those do look nice.

BTW, it's the MSP that got fried (one port,) the IR board is fine :)

Samj435
03-26-2013, 12:28 AM
It's great to see that progress is still being made behind the scenes.

Looking forward to more pictures / updates!

rjchu
03-26-2013, 03:13 PM
Ditto here! :)

I'm also starting to work with Labrat, as time allows, to see if his DMX IR platform is a good fit for GwtS ears so hopefully there will be some good stuff coming out of that effort that can be leveraged here as well.

Thanks,

-joni-



It's great to see that progress is still being made behind the scenes.

Looking forward to more pictures / updates!

LabRat
03-26-2013, 04:02 PM
Hmm... as I've just been "let go" from my job. I should have PLENTY of time to work on this. :biggrin:

Sorry.. RJCHU, I didn't get to the post office today .. see first comment of my posting to explain why.





Ditto here! :)

I'm also starting to work with Labrat, as time allows, to see if his DMX IR platform is a good fit for GwtS ears so hopefully there will be some good stuff coming out of that effort that can be leveraged here as well.

Thanks,

-joni-

timon
03-26-2013, 04:20 PM
The only problem with Labrat's is that I don't think there is enough IR output for the Glow With the Show ears because of the way they are built. Rob's has much more output power so I think they will cover the GWTS ears better.

LabRat
03-26-2013, 04:45 PM
UHmm.. I think you may have missed the daughter card. I would have posted the picture earlier today, but they took my phone away, which had the pictures on it. :)

The daughter board (slave emitter) has 15 LEDs, and upto 3 of these daughter boards running connected to the pic. (at least.. that's what I'm aiming for).


Getting the wider angle LEDs from Mouser will certainly help, but those are backordered at the moment.



The only problem with Labrat's is that I don't think there is enough IR output for the Glow With the Show ears because of the way they are built. Rob's has much more output power so I think they will cover the GWTS ears better.

falingtrea
03-26-2013, 04:48 PM
Just a thought. I wonder if the transmitter in the hat is for the Sync to other hats function??

timon
03-26-2013, 06:32 PM
We've all pondered that. It looks like there are two IR transmitters in the hat, one high power and the other one low power. To date I don't think anyone has really looked at what they do other than to commentate between hats.

RobG
03-26-2013, 07:17 PM
...Getting the wider angle LEDs from Mouser will certainly help, but those are backordered at the moment.
Which ones are you getting?

LabRat
03-26-2013, 11:40 PM
Currently using the Vishay TSAL5100 (http://ca.mouser.com/Search/ProductDetail.aspx?R=TSAL5100virtualkey61370000vir tualkey782-TSAL5100), but eyeing the TSAL7600 (http://ca.mouser.com/ProductDetail/Vishay/TSAL7600/?qs=%2fha2pyFadugHCKKwtycfwJIa%2fIuQ3S1LN6l4LoEPUf 0%3d).

RobG
03-27-2013, 12:12 AM
I got mine from Avnet (https://avnetexpress.avnet.com/store/em/EMController/Transistor-and-Photovoltaic-Output-PhotoCouplers/Vishay-Semiconductor/TSAL7600/_/R-294247/A-294247/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1&page=1&rank=0), cheaper than Mouser and in stock.

rjchu
03-27-2013, 12:51 AM
What about these from eBay?

http://item.mobileweb.ebay.com/viewitem?itemId=390221393754&index=1&nav=SEARCH&nid=86633116655

-joni-

LabRat
03-27-2013, 06:10 AM
This is what happens when you get too used to one supplier. Ya get lazy and stop looking around to see if you really are paying the lowest price. [That's me.. referring to myself.. in case anyone was getting offended]

Just uploaded the proper image of the daughter card into the posting that was supposed to include both (http://doityourselfchristmas.com/forums/showthread.php?25474-DMX2IR-transceiver-(aka-Yet-Another-IR-thread)&p=265144#post265144).



I got mine from Avnet (https://avnetexpress.avnet.com/store/em/EMController/Transistor-and-Photovoltaic-Output-PhotoCouplers/Vishay-Semiconductor/TSAL7600/_/R-294247/A-294247/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1&page=1&rank=0), cheaper than Mouser and in stock.

timon
03-27-2013, 02:10 PM
This is both on and off topic at the same time. Took my ears to Disneyland yesterday and again realized quickly how much I both love and hate my GwtS ears.

Why? Because:

I HATE THE CAP! It's one of the worst looking caps I've seen and you look like a dork wearing it.
If your wearing the cap and no one is nearby you cannot see what's going on. Now that's not the caps fault just the way it is. (more on what I'm doing to get around that later)
The fit is terrible. The battery box sits on the top of you head so the hat rocks because it's so top heavy. The under chin strap is a joke. It's just very bad design and in my opinion not upto Disney standards.


So I decided I needed to do something about it so I set out to modify mine to make it a really nice looking cap and one I feed comfortable wearing at the park. So before we go into the modifications here is the "almost" final result.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18899&d=1365323048

So let the modifications begin.

Before you start digging into the cap put it on. Why? Because you need to decide just how well it currently fits. If your like me you can feel the battery compartment on the top of your head. If that's the case you'll likely have found that the hat does not want to stay stable on your head. If this is the case you'll likely want to do the battery compartment modification. It's up to you.

Next is the new hat selection. If you staying with a Disney hat I've found that there are made in two different depths. There is your standard ball cap and there are some that are about 1/2" deeper. The deeper ones are in Disney's Graphics Collection. These are the ones with lots of graphics on the front. I've found that these make the best hats for conversion. Problem with most of them is that they don't have the normal adjustment strap at the back. The hat I picked above is out of that collection but did have the strap in the back. I've found that the normal hats are a bit short but since each of us have a different head shape they may work.

Now it's time to disassemble the cap into it's basic pieces. You have to remove the foam to access the module. When you remove the foam from the hat only disconnect half of the foam and do that from the side where the battery compartment screw is located. That way you don't have to re-glue the foam and can fold it back to expose the electronic anytime it's needed. At this point note the 4 screws holding the ears. These will be removed later.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18902&d=1365323080

Be very careful when opening up the two ears. They are glued in spots and resist coming apart. You'll likely break some of the smaller tabs but that's life. NOTE: DO NOT take out the screws holding the ears to the hat until they ears have been opened up. If you do there is a real chance you'll damage the flexible circuit board.

Picture to follow.

Now remove the 4 screws holding the ears and carefully slide the ends of the flexible PCB out of the slots in the cap. Be careful you don't damage the flexible PCB.

Picture to follow

You how have the compete controller removed from the hat.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18771&d=1364407114

Ok, now let's go get your hat. Take the now empty GwtS skull cap and head off to the Part or where ever your going to get your ears. Your going to want to select the cap you like the best and that the original skull cap will fit into. Again you want to have it go in the new cap as far as you can. The goal is to get the skull cap to go under the head band.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18901&d=1365323064

Ok, you now have your new hat and are ready to add the ears.

If the original GwtS ears fit you just fine then you may want to skip all of the batter modifications. The first part of the change will be to the plastic structure that holds everything together.

As you can see in the picture it's not a real complex part. The main problem with it is the battery box. It's so deep that it end up resting on you head so the hat won't stay stable. The first modification is to the battery box. Look at the picture and notice where I've colored it gold. That's the part of the battery box which will be removed. Once removed it won't be as deep so it should rest much better on your head. There will still be enough structure to keep the part structurally solid.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18772&d=1364407124

Next problem is getting power since the battery box has been removed. I got lucky on this. My brother-in-law two christmases ago give me a head band light made by coast. You can still get them at HomeDepot Here is the link (http://www.homedepot.com/p/Coast-HL5-6-Chip-LED-Headlamp-TT7041CP/202500218#.UVMvGr_C5mM) or Global (free shipping) (http://www.globalindustrial.com/p/tools/portable-work-lights/headlamps/ct-hl5-led-headlamp) plus many others.

These are easy to tear down just for the battery pack which will then fit on the back adjusting band of the ball cap.Battery box update. Note that the original cable only has two wires so you'll have to find some small three conductor cable.

Pictures to follow

Here is what the cap will look like once the new battery compartment is added.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18776&d=1364407305

Information on adding the external battery pack to follow.

Now that the internal structure has been modified it's time to modify the new hat.

Your going to need to cut 6 holes in the new hat. Four for the screws and two for the flexible PCB. To locate those holes you need to take the skull cap and find the best position inside the new hat. Make sure that you have the back of the skull cap pointing to the back of the new hat. You can tell the back of the skull cap but the notch in the foam where the battery compartment is. Make sure that you have the skull cap alined so the ears are square.

One that's correct look start from the front and tuck the skull cap under the head band of the cap as shown before. You'll find that you can't do this at the rear because of the way the new cap is make. Not a problem just cut a slot in the skull cap so it will fit under the hat band. Your going to be cutting more of the skull cap away later.

Now you can start feeling for the holes in the skull cap through the new hat. Make any adjustments so the hole locations are symmetrical. Once you cut them your committed. There are many ways to cut the 4 holes and two slots. You can just puncture through the cap with a pair of scissors or use a hole punch or what ever works for you. The two slots are best cut in a "T" fashion. Look at the way they are cut in the original cap.

Picture to follow.

Now reassemble the cap. Remember that the ear with the touch switch will go on the left at you face the cap, it will be on your right when it's on your head, and the ears will be open to the rear. Again be very careful with the flexible PCB as it can be torn easily and that will ruin you entire day.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18902&d=1365323080

Now before putting the back side of the ears on let's test that they are working.

All good. Then snap the back side of the ears back on. If you were careful taking them apart they should hold without glue but it's your choice. If you want to clue them just put a tiny bit at two or three spots after they are together. That way you can split them back open with a xacto knife.

Now sit back and admire you handy work and head off to the park and show off you new set of GwtS ears.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18898&d=1365323033

Ok, I know what your saying, "this cap is getting expensive!". Well that's true but when did that every stop those on this forum:) So just what did this cost? If you get the 20% AP discount, or the one that you'll get if you by food at the larger shops, it will cost about $41.56 or about $53 if you don't. If you do the battery pack modification add about $20 more if you rip apart a Coast head lamp

So after I finish the cap where I'm I thinking to do to it next? Well I though about a jacket that can connect to the cap. The jacket will have additional RGB LEDs slaved to the one on the cap. I'll need to do a small interface PCB to pick off the RGB on the cap without loading it down. Should not be too bit of a problem. Still need to figure out how to attack the RGB strips to a jacket so they can be easily removed and the jacket washed.

That's in for now. I'll be adding more to this post as I go along. That way the entire modification will be in one place. I'll be moving this to it's own thread soon so it's easier to find.

Pokkito
03-27-2013, 06:58 PM
I agree with Timon with his gripes about the cap. It is ugly, uncomfortable, you can't see what is going on, and it could potentially block the view of someone standing behind you. I created my jacket so it would be more comfortable and so that I could watch it with the show. Taking the hat apart and working the electronics was done by a friend of mine. It works great and I'm very proud of it. You can see a couple of quick youtube videos of it posted here or search for "World of Color jacket Glow with the Show" and "Glow with the Show Jacket Mad Tea Party". My friend is going to post pictures of the electronic parts of the jacket to the micechat forum at some point. http://micechat.com/forums/disneyland-resort/178219-glow-show-jackets.html

http://www.youtube.com/watch?v=Idok_sN5tvc

http://www.youtube.com/watch?v=0Of8GPbXhdA

I'm really interested to see what you guys create because I would love to be able to have the jacket work at home while a video of the Disneyland shows play at home.

lightman
03-27-2013, 11:53 PM
Timon....

I like where you are going with this. Nice prototypes!

I agree...baseball caps do fit better. Placing compartment on the back is a great way to rebalance the weight. I did the same on my reindeer headsets.

Later....
Lightman

timon
03-28-2013, 12:17 AM
I'd like to put all of the electronics back there but that would be a major rebuild. We'll see how much material I can remove from the existing battery pack so it sets low enough but is still stable stable. Can you say balancing act:)

I just updated the post but not with new pictures, yet. Ran into a small problem with the new battery pack. Only two wires but the pack can be modified.

I'm going to the park in the next day or two and look at some more hats. I'm looking for one that just a bit taller than the one I have. Looked at some last night that look good but I didn't have anything with me to compare against. My other requirement is that can't be a goofy looking hat, no offense Goofy, but one that looks more adult.

johnnyb
03-29-2013, 11:57 PM
Timon nice work. I dislike wearing the hat on style grounds too. I would like to put one in Sourcerer's Apprentice hat.

timon
04-07-2013, 05:52 AM
After spending a couple of hours at the part looking for just the right had I got it all put together. I've not yet change out the battery compartment. With the taller hat it almost works for me but still bumps my head. After I take them to the part for a test run I'll make the battery modification.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=18898&d=1365323033

I've updated my original post (http://doityourselfchristmas.com/forums/showthread.php?25142-Glow-with-*OUR*-Show-and-MSP430G2553-discussion&p=265584#post265584) with more modification information.

RobG
04-19-2013, 04:32 PM
Found this IR Lamp (http://www.amazon.com/Gino-Round-Board-Security-Camera/dp/B0056XFS5S/ref=sr_1_15?m=A1THAZDOWP300U&s=merchant-items&ie=UTF8&qid=1366403348&sr=1-15&keywords=led) on Amazon. At less than $7 shipped, looks like a very good deal.
FYI, I bought something from uxcell few days ago and they gave me $5 off coupon with no minimum.

rjchu
04-20-2013, 12:48 AM
Interesting find. There are some on eBay as well but I ended up getting a bunch of LEDs there instead.

Has anyone had any luck on making a transmitter yet?

Thanks,

-joni-



Found this IR Lamp (http://www.amazon.com/Gino-Round-Board-Security-Camera/dp/B0056XFS5S/ref=sr_1_15?m=A1THAZDOWP300U&s=merchant-items&ie=UTF8&qid=1366403348&sr=1-15&keywords=led) on Amazon. At less than $7 shipped, looks like a very good deal.
FYI, I bought something from uxcell few days ago and they gave me $5 off coupon with no minimum.

oPossum
04-20-2013, 01:32 AM
Found this IR Lamp (http://www.amazon.com/Gino-Round-Board-Security-Camera/dp/B0056XFS5S/ref=sr_1_15?m=A1THAZDOWP300U&s=merchant-items&ie=UTF8&qid=1366403348&sr=1-15&keywords=led) on Amazon. At less than $7 shipped, looks like a very good deal.


That is the wrong wavelength. 940 or 950 nm is what is used for remote control.

RobG
04-20-2013, 07:47 AM
Duh, I was on my way out to dinner when I found it and I didn't pay attention.
Thanks for noticing it oPossum.

Materdaddy
04-25-2013, 02:09 AM
I can't seem to get this working using my arduino and both examples in this thread.

The one from Jon Fether in post 121 (page 13) (http://doityourselfchristmas.com/forums/showthread.php?25142-Glow-with-*OUR*-Show-and-MSP430G2553-discussion&p=259872#post259872), nor the one posted by evilsoapbox in post 180 (page 18) (http://doityourselfchristmas.com/forums/showthread.php?25142-Glow-with-*OUR*-Show-and-MSP430G2553-discussion&p=265044#post265044).

I bought 2 of the IR LEDs from Radio Shack (Part 276-0143) which is a 940nm wavelength. I have wired up either 1 with a 220 ohm resistor (per Jon's post), and I also tried wiring up 2 in series with a 33 ohm (limiting current to 80mA per http://led.linear1.org/led.wiz calculator).

I have verified that I see the LEDs emitting using my digital camera, so I know they're trying to transmit something. I have not made any modifications to the ears, and they worked at the park last week. Do I need to remove the IR receiver from the ears since these Radio Shack LEDs only have a 45 viewing angle? I've tried moving the hat all around the LEDs for testing with no success.

Any ideas?

Materdaddy
04-25-2013, 02:23 AM
I can't seem to get this working using my arduino and both examples in this thread.

Go figure, as soon as I hit post, I get things working. I didn't realize I had to turn the hat "on" for it to receive the codes. Once on, it responds to the simple color codes in timon's post 24 (http://doityourselfchristmas.com/forums/showthread.php?25142-Glow-with-*OUR*-Show-and-MSP430G2553-discussion&p=257733#post257733). However, it doesn't remain off, as pointed out by johnnyb in post 64 (http://doityourselfchristmas.com/forums/showthread.php?25142-Glow-with-*OUR*-Show-and-MSP430G2553-discussion&p=258586#post258586).

So now the questions are:

Is there a concise set of known commands, including force turning on/off (rather than only the temporary off, and manual turning "on")?
Does anybody know if there's a hard-coded palette of colors, or has somebody figured out the actual protocol down to the individual color values?

Jon Fether
04-26-2013, 01:19 AM
http://doityourselfchristmas.com/forums/showthread.php?25142-Glow-with-*OUR*-Show-and-MSP430G2553-discussion&p=259750#post259750

I posted a while ago some color approximations based on what I observed. The glow ears have a 1-bit palette (0x6X) and a Mixed palette (0x0E 0xXX). Both ear colors can be selected by adding an 0x08 or 0x80 to the 1-bit and mixed palette codes to change only the right ear after selecting both ears with the main code.

There sadly isn't a concise, official documentation of the system. I've tried to write a few things including some of the 0x48 0xXX effect codes. Every piece of documentation you see on here was simply derived from observation of how the ears react to these codes and observation of recordings that were made of the "official" transmitters (including the ears themselves).

http://doityourselfchristmas.com/forums/showthread.php?25142-Glow-with-*OUR*-Show-and-MSP430G2553-discussion&p=259872#post259872 - some more documentation I've badly cobbled together.

Jon Fether
04-26-2013, 01:29 AM
I forgot to mention...

My Arduino program adds the correct checksum for the 9X codes at the end. You can just type 90 67 to turn the ears white and don't have to calculate the checksums. (I keep meaning to remove the need to type 9X unless a 9X or 55 AA is typed explicitly..., alas a project for later.) Some true geniuses here found out the algorithm from Maxim 1-Wire.

To my knowledge, the ears cannot be powered up via the IR interface. At least I've never seen an example of that. This schematic http://stuffandymakes.com/wp-content/uploads/2012/07/RoughSchematic.jpg seems to imply that they might have some such ability. U4 (IR sensor) and U2 (MSP430 MCU) are both powered at all times. The MCU however is in a deep sleep mode when they are off and I don't know if the firmware allows for them to wake-up on input of P1.1/RX. The MCU will run for a very long time in deep sleep mode, it is extremely power efficient.

-Jon

Jon Fether
04-26-2013, 01:57 AM
Regarding your LED lamp, it's fine. The datasheet for the Vishay TSMP6000 receiver used in the glow ears seems to indicate it easily can handle the 850nm light at 95% of spectral sensitivity (http://www.vishay.com/docs/82620/tsmp6000.pdf Page 3, Figure 2).

For 940nm I found a Chinese company selling http://www.aliexpress.com/item/940nm-48-LED-5mm-Infrared-IR-Led-Board-For-Camera-60-Degree-Bulb-F36/580805683.html this on AliExpress. But it is sold/shipped from China. I suspect modifying/removing the CDS sensor interface might allow you to use the existing transistors to modulate the LED array. You'll have to do some sleuthing on that.

johnnyb
04-26-2013, 11:18 AM
So now the questions are:

Is there a concise set of known commands, including force turning on/off (rather than only the temporary off, and manual turning "on")?
Does anybody know if there's a hard-coded palette of colors, or has somebody figured out the actual protocol down to the individual color values?

I think the best list of commands is in the threads here including a list of colors. I do not recall an off command that is equivalent to the capacitance switch. There is the ears dark command which is essentially a color command. There is the turn off for some time they use to keep ears dark during a ride.

johnnyb
04-26-2013, 11:24 AM
Duh, I was on my way out to dinner when I found it and I didn't pay attention.
Thanks for noticing it oPossum.
I noticed too late, and my twitchy deal finger ordered one. $7 isn't the worst mistake I'll make on a given day, and it may be useful on another project. I'm glad to see deal sharing even if one occasionally doesn't work out as planned.

Materdaddy
04-26-2013, 12:26 PM
I think the best list of commands is in the threads here including a list of colors. I do not recall an off command that is equivalent to the capacitance switch. There is the ears dark command which is essentially a color command. There is the turn off for some time they use to keep ears dark during a ride.

I'm working on compiling a bit of the information spread throughout this thread. Unfortunately it seems some of it isn't clearly organized for somebody who didn't actually follow the technical aspects from the beginning.

It also sounds as though there's no known "on" or "off" command, only the one byte "dark" command (which is only a couple minutes) and the "don't respond to anything for a few minutes" while on a ride command.

Also, the unfortunate part for looking at a controller is that there's no known color mixing math, only a "table" of known colors. That means for sequencing/controlling, close matches will have to be made.

It seems there's still a lot to be investigated as well. I watched a few videos of the world of color show and see the ears fade out a few times, is there a known fade command?

Something else I've noticed. When the ears are in "default on" mode where the ears are just changing colors, and you send one of the "right ear only" commands, the other ear keeps doing it's rotation. Does anybody know if there's a way to set one or both ears to one of the rainbow modes? I know there's a reset command that will choose another one of the built-in patterns, but that's a little different.

RobG
04-26-2013, 01:31 PM
My kids are bored with the ears already so I can now take one apart and experiment. Where's my scalpel?

RobG
05-06-2013, 08:39 PM
Tayda has some nice and cheap IR LEDs (TSAL7400 (http://www.taydaelectronics.com/infrared-led-940nm-5mm-tsal7400.html).)
Smaller angle (50deg vs 60deg) than TSAL7600, but higer Pv (210mW vs 160mW,) and at $0.06/pcs you can't go wrong.

JonnyMac
06-06-2013, 02:11 PM
My processor of choice is the Parallax Propeller and I have done a lot of IR work with it, including transmitting 2400 baud serial across a modulated IR link. I whipped up a program to send messages my GwtS ears -- got nada.

I must be missing something. My IR serial driver is set to transmit at 2400 baud using a 38.5kHz modulation signal. I verified the program is working by pointing it at another board with an IR receiver and monitoring the data; it's coming across as expected.

I'm open to suggestions.

Materdaddy
06-06-2013, 02:32 PM
My processor of choice is the Parallax Propeller and I have done a lot of IR work with it, including transmitting 2400 baud serial across a modulated IR link. I whipped up a program to send messages my GwtS ears -- got nada.

I must be missing something. My IR serial driver is set to transmit at 2400 baud using a 38.5kHz modulation signal. I verified the program is working by pointing it at another board with an IR receiver and monitoring the data; it's coming across as expected.

I'm open to suggestions.

Maybe the same (dumb) mistake I initially made? Did you turn the hat "on"? Get the ears going through one of their pre-programmed sequences and then try again.

JonnyMac
06-07-2013, 10:31 PM
Got it working! I made a couple tweaks to the code so I'm not sure what did it, but it works as I expect now.

rjchu
06-08-2013, 12:50 AM
Congrats! Can you share some details like DMX or some other protocol to the transmitter? Range, etc?

Thanks,

-joni-


Got it working! I made a couple tweaks to the code so I'm not sure what did it, but it works as I expect now.

JonnyMac
06-11-2013, 01:16 AM
DMX is very easy with the Propeller; I have a nice DMX receiver module that has been used by Disneyland and the Imagineering group in Glendale. Writing a UART module that broadcasts via IR is easy, too. Each Propeller cog (processor) has two multi-function counters and one can be used as an oscillator that runs at 38kHz. Instead of taking the TX line high and low the code enables (for 0s) or disables (for 1s) the direction bit for the transmit pin -- which has also been assigned to the counter. I've attached my IR UART object for Propeller users that are interested in using it to send commands to the GwtS hats. Simply connect an IR LED to a pin (use 220-ohm resistor) and you're good to go (for testing, anyway).

elin05
06-22-2013, 05:54 AM
Hi everyone,

I was trying to reverse-engineer my GWtS hat this week and stumbled upon this wonderful thread today. Sorry, I haven't read through all 22 pages (yet!), but I do have a few questions:

What protocol are these 0x55 and 0x9X commands I keep seeing? Are they just serial commands?

Using a TSMP6000 (the same one used in the hat), oscilloscope and the help of the Adafruit tutorial (http://learn.adafruit.com/ir-sensor/ir-remote-signals), I recorded the signal out of diode D1 on another hat.

ON (ms), OFF (ms)
0.8, 0.8
0.4, 0.4
0.8, 0.8
0.8, 0.4
1.6, 0.4
0.4, 0.4
3.7, 0.4
3.7, 0.4
1.6, 0.4
0.8, 0.4
0.4, 0.4
1.6, 0.4
1.2, 0.8
1.2, 0.8
1.6, 0.4
1.2, 0.8
1.2, 0.8
0.4, 0.4
1.2, 0.8
0.8

So is this the IRDA SIR modulated signal? How would I go about extracting the next layer of information from this?

Thanks in advance!
Eric

elin05
07-01-2013, 10:56 PM
Hi everyone,

I just recently got into trying to reverse engineer the GWtS hat, and was hoping someone can point me in the right direction in trying to demodulate a signal I've captured.

I've captured the following decoded-38kHz signal from diode D1 (the signal that is transmitted every couple of seconds):

ON(ms), OFF(ms)
0.8, 0.8
0.4, 0.4
0.8, 0.8
0.8, 0.4
1.6, 0.4
0.4, 0.4
3.7, 0.4
3.7, 0.4
1.6, 0.4
0.8, 0.4
0.4, 0.4
1.6, 0.4
1.2, 0.8
1.2, 0.8
1.6, 0.4
1.2, 0.8
1.2, 0.8
0.4, 0.4
1.2, 0.8
0.8

I'm guessing this data is modulated w/ the IRDA protocol? How can I determine what type of encoding is used?

Thank you very much!
Eric

johnnyb
07-02-2013, 12:31 AM
It's serial. This thread has tons of details. Have a look back thruogh.

Nonsuch
07-05-2013, 06:28 PM
Hi everyone: I just found this thread and this is my first post.
A big THANK YOU for all the information.

I have wanted to fool around with these hats, and this thread will "jump start" my efforts.

World of Color is my favorite night show at Disneyland, but unfortunately the Glow with the Show hats are not very popular. The impressive youtube videos featuring the hats are special events where hats were given away free (or hats were required to attend). At normal performances (and I have viewed dozens), there are very few hats.

timon
07-05-2013, 09:03 PM
There is a possibility that the park will let those with hats up come into the main area for WoC and Rivers of America without getting a fast pass. This way the hats will be grouped plus more people will by hats so they can sit is a good viewing spot.

Personally I think a major problem is that people just don't like the current design. What they need to do is a major overhaul. So here are a few things I think they should do.


They need to get the battery off the top where it constantly hits your head.
Without adding much to the cost of the hat they could add a LiPoly battery with a USB connection so you could slow recharge it from any usb charger. You have to supply your own cable and charger but heck everyone has a USB charger these day so thats no big deal. This will also reduce the weight so the hat balances better.
There should be more than one type of hat and at least one should be a ball cap type. That way during the day you have the bill to shade your eyes plus people like ball caps.
Anyplace there is background music playing the hats need to respond. That way people see the hats working basically everywhere in the park and not just during the shows. This can easily be done for those areas where they already work such as Rivers of America, Main Street, The Tea Party stage area, Cars Land and the area around World of Color.

timon
07-05-2013, 09:31 PM
As much as I like the IR devices I think looking at the long term moving to 2.4 Ghz may be the better way to go. With the new nRF51288 it does not take much to make a very small wireless controller or even some very large wireless controllers. Plus, this way you would not have the speed limitations.

As an example here is a 1" diameter board that drives three RGB LEDs I may use for wireless pixel flowers. These are powered from 12VAC but it would have been driven just as easily from a 3.7V LiPoly cell. With a few minor modifications this could drive several LED directly from the chip if you limit to 5ma or you can add external transistors and drive LEDs at full power. You can get multiple transistors in a single very small case which won't take much space. You could also drive LED strings or pixels for use on hats and jackets.

Just something to think about.

http://doityourselfchristmas.com/forums/attachment.php?attachmentid=19671&d=1372967246

Nonsuch
07-05-2013, 09:51 PM
There is a possibility that the park will let those with hats up come into the main area for WoC and Rivers of America without getting a fast pass.
Some special areas have been setup for Glow with the Show, although I have only seen the one for fireworks. That was located at the end of Main Street where it meets the "hub". A decent location, but areas nearby can usually be found at the last minute. If the dedicated hat areas were in the "best" locations, sales would increase -- although this might anger some guests.


Personally I think a major problem is that people just don't like the current design. What they need to do is a major overhaul. So here are a few things I think they should do...
You suggestions are very good. A couple other issues:

Cost: $25 is too expensive, particularly for a family group.
Selfishness: the owner of the hat cannot see what it is doing, essentially paying for other guests enjoyment.

timon
07-05-2013, 09:59 PM
Some special areas have been setup for Glow with the Show, although I have only seen the one for fireworks. That was located at the end of Main Street where it meets the "hub". A decent location, but areas nearby can usually be found at the last minute.

We're heading to the park in a few minutes so I'll check this out.


If the dedicated hat areas were in the "best" locations, sales would increase -- although this might anger some guests.

Don't see why. Disney has all sorts of special way to get better seating.


You suggestions are very good. A couple other issues:

Cost: $25 is too expensive, particularly for a family group.
Selfishness: the owner of the hat cannot see what it is doing, essentially paying for other guests enjoyment.


Actually the price of the hat is only about $5 more than most of the cheap hats and about the same as the other fancy ones. They could add a family 4 pack that knocks off 5 or 10 bucks.

I'm taking my modified hat, rebuilt into a ball cap, and adding some fiber strands so they will light up under the bill of the cap.

Nonsuch
07-05-2013, 11:47 PM
We're heading to the park in a few minutes ...
I wish I was there too, next visit is in October.


Don't see why. Disney has all sorts of special way to get better seating.
You might be right. I was thinking that for Fantasmic and Fireworks, the best spots have been first come first served. World of Color has always had Preferred Dining, and guests cannot "camp out".


Actually the price of the hat is only about $5 more than most of the cheap hats and about the same as the other fancy ones. They could add a family 4 pack that knocks off 5 or 10 bucks.
A family pack would be a good idea. The issue might just be (as you posted), the existing design is unattractive and uncomfortable.


I'm taking my modified hat, rebuilt into a ball cap, and adding some fiber strands so they will light up under the bill of the cap.
Nice. I need to make my own custom hat.

rjchu
07-06-2013, 12:00 AM
I never saw the final build pics. In particular what you did about the power source.

-joni-


We're heading to the park in a few minutes so I'll check this out.



Don't see why. Disney has all sorts of special way to get better seating.



Actually the price of the hat is only about $5 more than most of the cheap hats and about the same as the other fancy ones. They could add a family 4 pack that knocks off 5 or 10 bucks.

I'm taking my modified hat, rebuilt into a ball cap, and adding some fiber strands so they will light up under the bill of the cap.

elin05
07-06-2013, 12:11 AM
Without adding much to the cost of the hat they could add a LiPoly battery with a USB connection so you could slow recharge it from any usb charger. You have to supply your own cable and charger but heck everyone has a USB charger these day so thats no big deal. This will also reduce the weight so the hat balances better.


I don't think Disney would risk putting LiPo's on people's heads. The slightest damage or short (what if it got wet on Grizzly River Rapids?) and the battery would be in flames or worse.

timon
07-06-2013, 01:21 AM
I never saw the final build pics. In particular what you did about the power source.

-joni-

I've not made the power change yet but I plan to put in a LiPoly 4.2v pack with a USB charger.

timon
07-06-2013, 01:22 AM
I don't think Disney would risk putting LiPo's on people's heads. The slightest damage or short (what if it got wet on Grizzly River Rapids?) and the battery would be in flames or worse.

The LiPolys are bullet proof.

budude
07-06-2013, 01:55 AM
The LiPolys are bullet proof.

If you're afraid of them don't stick a smart phone against your head! They are in every new iPhone anyway...

rjchu
07-06-2013, 03:31 PM
I've not made the power change yet but I plan to put in a LiPoly 4.2v pack with a USB charger.

How do you plan on getting both voltages needed? Thought they needed a 3v and a 4.5v supply - I don't recall which was for the LEDs vs the 420 processor...

-joni-

elin05
07-06-2013, 06:03 PM
How do you plan on getting both voltages needed? Thought they needed a 3v and a 4.5v supply - I don't recall which was for the LEDs vs the 420 processor...

-joni-

The 4.5V supply is only used for the LEDs, which shine bright enough at 3V anyway, so one power supply would be sufficient.

timon
07-06-2013, 06:40 PM
How do you plan on getting both voltages needed? Thought they needed a 3v and a 4.5v supply - I don't recall which was for the LEDs vs the 420 processor...

Logic uses 3V and LED uses 4.5V.


The 4.5V supply is only used for the LEDs, which shine bright enough at 3V anyway, so one power supply would be sufficient.

Correct, I'll pass the battery directly to the LEDs and use a 3.3V LDO regulator for the logic.

RobG
07-29-2013, 08:50 PM
I finally took my hat apart and can now confirm that the fuse on MCU is blown, so there's no way to get the firmware from it.

timon
07-29-2013, 08:54 PM
There is but not for Mere Mortals like us. If you had access to a "Real Lab" you could pop the top, find the fuse and laser it back. As I said not for us Mere Mortals.

rjchu
07-30-2013, 02:53 AM
I've got a laser pointer! ;)

Since you're both active today I thought I'd ask, has anyone started (or finished) a transmitter for these that can be used with either Vixen or HLS? I had planned to start looking at a DMX to GwtS/IR bridge based on Arduino but then I got bogged down with the CoroCanes I'd ordered then I got bogged down with figuring out how often I'd need to inject power into pixels based on my layout and then I got bogged down even more (but in a good way) when the twin boy were born - 3 weeks ago. So, since I've got even less free time these days, I thought I'd see if someone had done something already I could part out and build or otherwise shamelessly copy. :P

Thanks,

-joni-


There is but not for Mere Mortals like us. If you had access to a "Real Lab" you could pop the top, find the fuse and laser it back. As I said not for us Mere Mortals.

budude
07-30-2013, 03:43 AM
... when the twin boy were born - 3 weeks ago.

one at a time is enough for me - can't imagine doubling up on the "fun"... congrats!

ppohlman
07-30-2013, 09:30 AM
... when the twin boy were born - 3 weeks ago. ...

Having gone through that with my twins (boy and girl now 2 years old), I know what you're talking about. Have fun with them

rjchu
07-30-2013, 10:34 AM
Thanks guys! These are kiddos number 3 and 4 for us so yes, very busy and crazy. I'm looking a few more years down the road when Daddy will have lots of helpers when it's time to setup and teardown the lights! ;)

Everyone's got their own Glow with the Show hat now I just need a way to drive them. I've also already built one of Dirks minirenxblsd boards to wirelessly drive a couple RGBW superstrips that'll be mounted under the stroller running off battery power.

Thanks again,

-joni-

LabRat
07-30-2013, 10:46 AM
when the twin boy were born - 3 weeks ago.

*congrats* (they warned me to never let the kids outnumber the parents...I didn't listen. I can't imagine the impacts of twins)

Drop me a PM.. I can send you one of my DMX2IR bridge pcb's. (based on PIC16F1823)
Given the work already done on the GWTS protocol analysis.. the integration between the two should be pretty simple.

(I don't have a GWTS set of ears, so can't do too much to assist)

LabRat
07-31-2013, 02:45 PM
Is this header file still available? (Currently showing as a 404 error)


Hello everyone,

I use an Arduino to interact with my ears. In the event anyone is going to do the same, or use a C-based microcontroller, I have thrown all of the colors of which I know into a header file for easy use:

https://github.com/evilsoapbox/EvilArduinoBox/tree/master/GlowShow

rjchu
07-31-2013, 03:39 PM
Is this header file still available? (Currently showing as a 404 error)

It's all there, go here and browse to it.

https://github.com/evilsoapbox

Odd, I never noticed this post before. I'll have to check this out too!

Thanks,

-joni-

Materdaddy
07-31-2013, 06:21 PM
I've got a laser pointer! ;)

Since you're both active today I thought I'd ask, has anyone started (or finished) a transmitter for these that can be used with either Vixen or HLS? I had planned to start looking at a DMX to GwtS/IR bridge based on Arduino but then I got bogged down with the CoroCanes I'd ordered then I got bogged down with figuring out how often I'd need to inject power into pixels based on my layout and then I got bogged down even more (but in a good way) when the twin boy were born - 3 weeks ago. So, since I've got even less free time these days, I thought I'd see if someone had done something already I could part out and build or otherwise shamelessly copy. :P

Thanks,

-joni-

I was waiting for one of you guys to implement a transmitter. If I get enough stuff done on the other two projects I'm trying to contribute to (Komby and FPP) I'll give it a go. I have some ideas for color mapping, but not dimming based on my current knowledge of the GWtS protocol... My solution would be arduino (atmega) based, and maybe even run on Komby's RF1 with an IR daughter board.

CaptKirk
08-01-2013, 03:38 PM
Are there any good Arduino sketches to handle IR?? Wow, having an RF1 receive the data wirelessly, THEN rebroadcast IR would be THE way to do this- then you could just scatter around IR stations around and away you go...

JonnyMac
08-03-2013, 01:27 PM
I've got a laser pointer! ;)

Since you're both active today I thought I'd ask, has anyone started (or finished) a transmitter for these that can be used with either Vixen or HLS? I had planned to start looking at a DMX to GwtS/IR bridge based on Arduino but then I got bogged down with the CoroCanes I'd ordered then I got bogged down with figuring out how often I'd need to inject power into pixels based on my layout and then I got bogged down even more (but in a good way) when the twin boy were born - 3 weeks ago. So, since I've got even less free time these days, I thought I'd see if someone had done something already I could part out and build or otherwise shamelessly copy. :P

Thanks,

-joni-


I wrote my test code to use a terminal interface. It would be very easy to modify to accept a stream from Vixen (I do this all the time with animatronics projects). Again, I'm using the Propeller chip which I think gives me an advantage; I've got eight, 32-bit processors at my disposal and I can do with them what I choose. For some Halloween customers I created a program that accepts serial data from Vixen (using the Generic Serial driver, something KC did at my request) into the programming port of the Propeller. The first eight channels are played locally and the entire stream is rebroadcast via DMX. Easy-peasy. It would likewise be easy to start another cog to take the data from Vixen and transmit using an IR LED -- I'm doing that now (albeit very short range using a Propeller QuickStart board and the HID shield which as an IR LED).

KC wrote another Add-In for me that lets me take the show data and export it to a binary file. It's pretty simple, really: it has a header with three, 16-bit values (channels, event timing, and frames in show), followed by the raw values for each frame. I pop this onto a microSD card and into a Propeller board that reads the file and plays it back. This allows my customers to create shows in Vixen, then play them back stand-alone. The corresponding audio files are moved onto an external player that is controlled from the Propeller board; the code I wrote supports several shows with direct control or random order.

I don't work for Parallax anymore hence have nothing to gain by saying this -- if you're not including the Propeller in your bag of tricks, you're really missing out. My opinion, of course. :)

rjchu
08-14-2013, 03:08 PM
Before anyone gets too excited, there's a "but..." coming. :)

I've finished my version of a Renard to GwtS IR transmitter based on an Arduino Uno. My implementation uses XBee radios to send data from Vixen to the Ardiuno which then decodes 3 Renard channels per ear (representing RGB values) and then maps them into a hash table to get a corresponding GwtS color pallet value. For those of you that look at the code, yes, I know it's a VERY ROUGH color pallet and not at all granular. That's intentional, i'm trying to keep this simple for now. Given the implementation of a code lookup table it should be pretty easy to replace this with a more granular pallet later should that be desired and someone wants to implement it. All of this appears to be working just fine BUT... the ears do not actually respond to the codes being sent to them. I've validated that the codes and checksums calculated are all correct and that the ears perform as expected when I send them via Jon's transmission tool. I've also validated that the IR transmission code in this sketch works by hardcoding and sending the power on sequence codes whenever certain Renard command are received. For some reason, the glue that holds all of this together isn't setting correctly. Which is a good time for me to point out that this code is in large sections blatant copies of Jon F's Arduino transmitter and Materdaddy's Arduino Renard controller. Attached below are some pics of my hardware setup (for those curious about the XBee to Arduino connections) as well as the sketch itself for anyone wanting, willing and able to help debug. I'm still working on trying to fix this but after banging my head against the wall for several hours and watching 4 kids today, I'm probably not going to be able to progress very far in the next 24 hours. Thanks to Jon F and Materdaddy for sharing their code here, JohnnyB for a set of mouse ears which helped make testing possible, Timon and oPossum for their contributions and anyone else I'm forgetting. This would not have been possible without the bits and pieces everyone's contributed here.

If you have any questions, suggestions, or solutions please share them here or feel free to PM me.

Thanks,

-joni-

Some additional info from the docs/code:
//
// Preface/Thanks:
// This code is based in large part (read - lots of copying and pasting) on code from doityourselfchristmas.com users
// Jon Fether and "Mat er daddy" who I thank for their contributions and posts on this topic as well as Timon and
// everyone else that's contributed to the "Glow with *OUR* Show" effort. Thanks also go out to Dirk for
// his help with using XBee's for transmitting and receiving data to the Arduino and other hardware assistance.
//
// Documentation (sort of):
// I. Assumptions:
// 1. The input serial data stream is Renard (via Vixen or some other equivalent) and that individual RGB values
// are sent in on channels 1-3 for the left ear and (eventually) channels 4-6 for the right ear.
// 2. The input serial data comes in on pin 10, 8N1 @ 19,200 baud. Currently the serial receive code below is working
// with a XBee radio as the receiver with another paired XBee radio in an Explorer board as the transmitter attached
// to the Vixen computer. Wiring is such that (for pictures see posting on DIYC):
// XBee pin 1 -> Arudino 3.3v
// XBee pin 2 -> Arduino pin 10 (RX)
// XBee pin 3 -> Arduino pin 11 (TX)
// XBee pin 10 -> Arduino GND
// 3. IR LED emitter and cooresponding valued resistor attached to pin 3 and GND. If you want to use a different pin,
// adjust the value of IRLedPin accordingly.
// II. How's it work?
// The incoming Renard serial stream is decoded into RGB values ranging from 0-255. These are then hashed into buckets
// numbered 0-4 which are used as indices into a 3D array of GwtS codes in the 10bit color pallet published on DIYC.
// This is NOT a granular color pallet but is intended to be a v1.0 solution so please don't flame me with how you would
// have done it better, instead, please feel free to implement your solution and share it. I'd love to use it! :) The
// mapped color values are then send to the IR transmission logic prefaced with 0x91 and 0x0E to indicate the command and
// pallet and appended with the checksum byte as calculated based on the 3 command bytes being sent.
//
// To Do List:
// - Make it work. :)
// - Re-add right ear decoding logic once the IR transmission problem is solved
// - Write some docs and/or add better code comments
// - Clean things up a bit more and remove copy/paste artifacts
// - Add Renard start addressing code so the transmitter channels can be inserted anywhere in the Renard controller chain
// - Add a 4th channel for each of the two ears that, based on intensity level, adjust command sequence to include fade-in,
// fade-out, etc vs the instance on/off that's currently (only) supported
// - ???