Software

This page shows the current state of the software.

2007-09-18: Proof of concept demo

Finally a real demo of the Chameleon board, connected to real TV hardware. This is mostly a proof of concept demo, although working quite well only 64 pixels from the image are used because of the limitations of the CPLD. The next version will probably have an FPGA to allow more image data to be used from the video source.

It is very difficult to get the effect on video correctly, in reality it looks much better. Chameleon is wired using a composite connection from a DVD player. The S-Video output of the same DVD player is used for the TV input. Two LED strips are used to generate the lighting effects.

Download the demo video (XVID, 3.4MB)

The 64 pixels from the image go through the AVR microcontroller which perfoms the lighting algorithm on them and updates the color. Currently only one color is used for the whole screen, even though there are more PWM outputs. The line moving through the screen is interference from the PWM control of the LEDs, I have to find the exact cause of the problem yet. Finally here are some pictures to show the current setup:

Chameleon connected. Composite video goes in on the left. Power is on the right and the crocodile clip and an old CD-ROM audio cable connect to the LED strips.
Proof of concept version connected

Power supply for the LED strips which work at 12V:
Power supply for the LED strips

The LED strips behind the TV. This placement is far from optimal but the short cables made it a bit difficult to place them correctly.
LED strips behind the TV

Some screenshots with the lighting active:
Proof of concept demo (blue colored)

Proof of concept demo (red colored)

Proof of concept demo (cyan colored)

2007-09-03: 8x8 pixel camera demo

The screenshot below is from a small movieclip showing an 8x8 pixel grid extracted from the composite output of a digital still camera.
8x8 pixel camera demo screenshot

The composite output is fed into Chameleon which takes 64 single pixels (no averaging) from the image at a speed of 25 frames per second. Five times a second it will send the 64 pixels to the PC over the USB line and a small C# program (shown on the left) displays them in a grid.

On the right are some colorful blocks drawn in Paint. When the camera is moved over these colored blocks you can see Chameleon react on them on the left.

2007-06-17: pixel sample demo

One of the first tests was to sample the video data completely and send it to the PC. However since the board has nearly no memory and the microcontroller and USB connection are not fast enough to send an image through in realtime the image needs to be sampled piece by piece while the video is still. This literally takes minutes to sample a single image but it does work.

The test began with an image on my digital still camera:
CD image original

My camera has a composite output which is handy for testing. The first sampling of the image showed some problems. The following image is taken by reading out data on the PC from the Chameleon board:
CD image sampled with errors

Luckily the problem (bad initialisation of the FIFO buffer) was found eventually and now a correct image could be sampled:
CD image sampled right

The camera has a pretty bad composite output so the quality is not that good. When connected to my PC and its S-Video output the results were above expectation. The original image displayed on the PC is as follows (scaled):
PC sample test original

The image sampled by Chameleon (one half frame so you have half the vertical resolution):
PC sample test sampled

Scaled horizontally to produce the right proportions again:
PC sample test scaled

And a zoomed-in version to show the excellent level of detail:
PC sample test detail

Sampling images is not a good task for Chameleon because it lacks the memory for it but it can do it if you have lots of time and the quality is excellent :)

2007-06-02: AVR programmer

One part that is working is a simple AVR programmer that makes use of the FT232R's synchronous bit-bang mode to program the ATmega32 AVR on the board without the need of AVR programmer hardware. Because of the smart bit-banging the FTDI chip has the programming time is very acceptable. Erasing, programming and verifying the complete 32KB of the chip takes around 30 seconds. This is not really fast, but later a bootloader will likely be added to allow faster programming. The bit-bang programmer can then be used to program the bootloader. A screenshot of the prototype programmer:
Prototype AVR programmer software
The programmer reads standard Intel hex files and programs them to the AVR. Fuse bits can also be modified but there is no user interface for that yet.

Finished parts

  • Prototype AVR programmer using FTDI bit-bang mode
  • UART serial communication with handshaking
  • SVF grammar and parser (SableCC)
  • CPLD programmer in the AVR
  • CPLD retrieving 64 pixels from the video
  • AVR reading the pixels regularly using an interrupt

In progress

  • I2C communication with the video decoder. Some basic tests are working.

To do

  • Bootloader for the AVR to program itself
  • AVR software
  • PC software
  • ...and much more