Illumination 1: RS-485 with Periodic 1200 Baud Rate Serial Signal via Waterproofing System

Last Updated on December 28, 2021

First Published on December 26, 2021

Here comes the holiday season of this winter, and we can watch places with illumination to light the dark night. I introduce a system of wide-range synchronized blinking illumination via a RS-485 waterproofing network. To test the feasibility of this system, I used Raspberry Pi Pico as a transmitter (host), and ATtiny85 as a receiver (device).


"serial_console/serial_console_periodic_1200" in the Repository for My Project with Raspberry Pi Pico


Sequencers postfixed "_uart" Like "85/sequencer_pwm_uart" in the Repository for My Projects with ATtiny


Caution that I'm not an electrical engineer, and you also need to consider a system of electric power supply in addition to this communication system.


This idea with low baud rate is come from an attempt to synchronize the tempo of a 8-bit drum sequencer which I made using ATtiny85 with other musical gadgets. First, I thought implementing a receiver of MIDI messages with 31250 baud rate to ATtiny85, but the workload of the receiver is heavy. To synchronize musical gadgets, communicating only clock timing is an enough idea as long as each gadget has been already programmed. Besides, selecting a program and working device groups can be implemented if the clock timing is made of a byte which have 8-bit. Besides, I thought a network of RS-485 because MIDI has been already moved its main interface to USB. RS-485 can communicate for the distance 1200 meters (4000 feet) long with connecting 32 devices. I realized this system could be applied on blinking illumination.


To get the wide-range synchronized system for illumination, its cost on money and resource becomes a big issue. To illuminate your house (or street), you have a limited budget. DMX512 is a system for stage lights, and can be used to control illumination. We need to know the system of DMX512 is expensive. Would you like to do DIY for DMX512? Dedicated ICs for transceivers of DMX512 can't be found in hobby markets. We may make a code running on a microcontroller to transmit and receive signals of DMX512, but the microcontroller needs to be powerful to transmit and receive iterating 250000 baud rate serial signals. I tested a code for a DMX512 receiver running on Raspberry Pi 2B, 3B and Zero, then I concluded it could be with a noticeable CPU overhead. Typical connectors for DMX512 aren't waterproofed. Besides, for a precise clock to get correct communication via UART, we need a crystal oscillator. Nowadays, the crystal is artificial through the lack of natural crystal for communication equipment. I think the high value of artificial crystal doesn't fit with the system for illumination, and lamps for aviation is fit with the crystal value.


In the atmosphere of wide-range synchronized blinking illumination is tough because of not only its suitable cost from a daddy's money and surplus of the electric industry but also strict environment, i.e., hot and cold temperature, stormy rain and snow, etc. Fortunately, ATtiny microcontrollers can change the frequency of its internal RC oscillator even in its running time. On the fixed temperature, the internal RC oscillator of ATtiny85 keeps the clock accuracy within +-1% change according to the page 164 of the datasheet of ATtiny25/45/85 (Rev.:2586Q-AVR-08/2013). However, the RC oscillator is affected by temperature, causing a possible error on transmission, but this issue can be resolved as long as each 1 byte serial signal from the host have equal interval. In the case that the host sends 1 byte serial signal at 60Hz, ATtiny85 can know the accuracy of its internal RC oscillator; i.e., when ATtiny85 gets 60 bytes (1 seconds) from the host, it compares the counting number of 9600Hz internal timer with the number of 9600 to adjust the value of OSCCAL, a register. I tested this system using Raspberry Pi Pico as a host, and ATtiny85 as a device with 1200 baud rate UART and 80Hz periodic sending, and I confirmed this system could actually work.


This system can make subsidiary layers using sequencers that transmit bytes with serial signals. In addition, relaying/repeating can be structured using RS-485 transceivers. Moreover, feedback from devices is also possible by structuring another network to send feedback from a device when a host send a control byte to request feedback from a unique device. I found IP68 waterproofing connectors for this system like Amphenol LTW X-Lok Mini series and TAKACHI THB381 series. If Raspberry Pi Pico is a host, it can be connected with a computer through USB to set a real time clock, and the illumination would give a fantasy to romantic viewers. Besides, this system with flexible microcontrollers and DMX512 can be connected.


With full duplex software UART running on ATtiny85, I tested this system and confirmed its feasibility so far. However, the work schedule to achieve my wide-range synchronized blinking illumination is long.


1. I haven't tested RS-485 with ATtiny85 yet.

2. I need to test a GPIO expander such as MCP23017 with ATtiny85 which has 8 pins.

3. The procedure and proper timing of powering on ATtiny85 and RS-485 transceiver, then setting pin states.

4. Hardware up to implementing solid state relays to blink LEDs (I think 2SK4017 and equivalents are enough to drive LEDs though).

5. A lot of LEDs, resistors, wires, and waterproofing plastic covers. Waterproofing connectors, RS-485 cables, and suitable enclosures to establish your project.

* If you do DIY (or "group-production") jewelry lights, you need a lot of pair of a LED and a resistor. Note that you shouldn't use lead solder because of RoHS, and the connection of a LED and a resistor would be crimped with any metal part. If you plan illumination in a room, LED strip lights would be your choice.

6. Whether waterproofing connectors can be fit with RS-485 cable and communication or not.

7. A place and a plan to illuminate. Also an enough warehouse to stock jewelry lights, cables, circuit boards, and enclosures.

8. Power supplies by professional electrical engineers.

9. Actual system-wide and external impact of the noise from 1200 baud rate serial signal and periodic sending such as 80Hz.

10. THE BUDGET BUILD UP BY LINCOLN'S BILLS


I think item No. 1-4 will be achieved by my technology. However, item No. 5 and later will need a big project. I just hope my hmm moves to you.

Please free to contact me by E-mail if you have any opinion or comment on this site.
Link: E-mail Adress
Push the "Search!" button to show results. How to search for a word?