Panteltje's ethernet color pic page

Panteltje's ethernet color pic page


This project is a color controller for strings of RGB LEDs
The controller has an ethernet interface.
Control is via UDP packets.
There is a real time clock, and up to 5 timers can be set.
There is also a light sensing input, plus some extra analog inputs that can be read remotely, for example for temperature.
This project is still in development, so things may change.
I am making the diagram and asm source code available under the GPL2 license.
The controller consists of a 3 Microchip PIC 18F14K22s connected to an ENC28J60 ethernet controller.
The green and red PIC are controlled via a 115200 Bd serial link by the blue one.
On board is also a MAX 232 providing a serial interface for testing purposes, for exampel to monitor the communication between the PICS.

Changes from version 0.2:
Added 2 extra PICs so there is real hardware PWM for each color.
The advantage is that there is no flicker during UDP communication.
Also the PWM frequency is much higher.
Changes in version 0.6:
Now all three PICs run on the same clock.
This configuration prevents low frequency interference between the PWM outputs that resulted in flickering light.
The 3.3V power supply has been replaced with a LM317 based switchmode to reduce heat.
Changes in version 0.7:
Fixed error in buffer pointer calculation in subroutine 'read_byte_rx_buffer'.
Changed to IP port 1079, and gateway for subnet 192.168.178.XXX

The tgz archive contains both the asm source as well as an assembled hex file, README, and LICENCE, for more info see the asm source.
Click here to download ecolor_pic-0.7.tgz.

Here is the diagram, IRLZ34N MOSFETS are used to drive the LED strings, should be good for a few amperes,
3 PICs 18F14K22 are used, the PWM unit in each for each color, one also does the ethernet processing.
PWM frequency is around 15 kHz.

Diagram of the 3.3V LM317 based switching power supply:

Here is a picture of the hardware:

It is possible to control the device from a script, for example using netcat:
This will set red to 10 (on a scale of 0 to 255).
echo R10 | netcat -u -q 0 1024

The following commands are available via ethernet UDP:
UDP commandfunction
a nprint adc.
B nnnset blue.
c nclear digital output.
G nnnset green.
H nnset hours.
hhelp, this help.
i nprint digital input.
K nnnset clock calibration.
L nnnset light sensitivity.
lprint light sensitivity.
M nnset minutes.
R nnnset red.
Ssave settings.
s nset digital output.
T n hh mm rrr ggg bbb set timers (n = 0-4).
v print status.

This program light_control-0.1.tgz, if run in the background, will use ethernet_color_pic to switch on the LEDs one hour before sunset, and switch of the LEDs one hour after sunrise.
Click here light_control-0.1.lsm for the lsm info file

If you want easy control of color via the serial port in Linux, try col_pic-0.7.2.tgz from here :

Click here for some programs I make available under the GPL.

Click here to send mail