Larson Scanner – Remote Controlled

Here is a little hack for Evil Mad Scientists’ Larson Scanner kit. It is possible to add an infrared detector so you can use a TV remote control to play around with the running lights, i.e. toggle the bright mode, skinny eye, and of course the speed. This is possible without any modifications to the original circuit board.

How to assemble

DSC 0394

Additional parts required:

  • ATtiny4313
  • IR detector (e.g. Vishay TSOP 4838)
  • 20 pin IC socket (recommended)
  • Header pins for the programmer (for either J1 or J2 on the circuit board)

Solder the resistors, LEDs, and the capacitor in place normally. I am using a modified version of Ken Shirriff’s Arduino IR library described in my previous post. The ‘2313 does not have enough memory for the original Larson scanner and the IR receiver, but the ‘4313 does. I would also recommend using an IC socket for the ‘4313.

Solder the IR detector in place.

Www vishay com docs 82090 tsop48xx pdf

  • Pin 1 (OUT) connects to S1 (away from the LED D8)
  • Pin 2 (GND) connects to S1 (close to the LED D8)
  • Pin 3 (Vs) connects to Vcc_2

DSC 0018

Program the ‘4313

The code repository is on github.

git clone git://github.com/alohr/avr.git
cd avr/larson_ir
# edit Makefile according to your programmer

# update flash and change AVR fuses:
make install

RC5 protocol only

I use a cheap key fob universal remote control, but any other RC5 remote control should do. While I was putting the Larson scanner and the IR library together I ran into odd problems where the code would simply not work. For example, you’d press any key on the remote control and all LEDs lit up dimly. The only explanation I have is that I ran out of memory (stack overflow or something like that), because there are only 256 bytes of RAM and the IR library already uses 68 of that for the raw buffer to store IR pulses. If I restrict the library to the RC5 protocol only, then I can get away with 24 bytes for this buffer. As soon as I did this, the odd problems went away.

// Length of raw buffer
#if defined(COMPILE_DECODE_NEC)  || \
    defined(COMPILE_DECODE_SONY) || \
    defined(COMPILE_DECODE_RC6)  || \
    defined(COMPILE_DECODE_JCV)
#define RAWBUF 68
#else
// RC5 only
#define RAWBUF 24
#endif

Remote Control Functions

DSC 0398

  • TV/AV = toggle skinny eye
  • Mute = toggle bright mode
  • Volume Up = increase speed
  • Volume Down = decrease speed
  • Channel Up = not used
  • Channel Down = not used
  • On/Off = not used
Advertisements
This entry was posted in attiny4313, infrared. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s