<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.diychristmas.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MikeKrebs</id>
	<title>diychristmas.org wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.diychristmas.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MikeKrebs"/>
	<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Special:Contributions/MikeKrebs"/>
	<updated>2026-04-20T15:48:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=3242</id>
		<title>Super-sized Animatronic Ball Ornaments</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=3242"/>
		<updated>2023-12-22T05:35:37Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:* &amp;#039;&amp;#039;&amp;#039;Supersized Animatronic Christmas Ball Ornament - [https://www.youtube.com/watch?v=i6EUMGoU_6s&amp;amp;feature=youtu.be Watch The Video! Click HERE] - from Tory Street Lights&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Expressions 3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is it?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
These are lip-syncing ornaments. The ornament is handmade polyester resin over fiberglass and cheesecloth with animatronic eyes, eyelids, eyebrows and mouth.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How did it go over?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Maybe you want to make a splash in your display? Terry said, &amp;#039;&amp;#039;&amp;quot;With the benefit of hindsight that was money well spent, judging from the comments that I hear from the viewing public.&amp;quot;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Where did this idea come from?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Brian &amp;quot;Lightman&amp;quot; Lincoln did this: [https://player.vimeo.com/video/148903061 Singing Christmas Tree]&lt;br /&gt;
 &lt;br /&gt;
Terry Sutton (Tory Street Lights aka T.D.Sutton) wanted to supersize the idea for his front porch. He custom designed the ornaments and made them by hand. He thinks it was about a three month journey and they each turned out to be quite expensive ([[#Cost]]). &lt;br /&gt;
&lt;br /&gt;
This entry was edited by MikeKrebs but most of it is Terry&amp;#039;s words either from the video or from correspondence with him. So, when you read first person comments, you should hear Terry talking and when you read third person comments, that would be Mike putting words to Terry&amp;#039;s project. If you make something similar and want to add your comments, please do so!&lt;br /&gt;
== Features ==&lt;br /&gt;
*Large ornament - about 2 feet across&lt;br /&gt;
*Sculpted eye sockets&lt;br /&gt;
*Eyes move together for natural look&lt;br /&gt;
*Eye moves in two dimensions - up/down and left-right&lt;br /&gt;
*Eye movements can be done at same time (roll eyes!)&lt;br /&gt;
*Eyebrows are independently controlled&lt;br /&gt;
*Ornament turns away from crowd when not doing show&lt;br /&gt;
*Controlled via Renard protocol&lt;br /&gt;
*Can be controlled by wireless ESP8266 module&lt;br /&gt;
*All custom made&lt;br /&gt;
&lt;br /&gt;
== Bill of Materials ==&lt;br /&gt;
&lt;br /&gt;
*Big ball (25 inches)&lt;br /&gt;
*PVA glue (Elmers!)&lt;br /&gt;
*Paper towels for mache&lt;br /&gt;
*Cheesecloth&lt;br /&gt;
*Fiberglass and polyester resin&lt;br /&gt;
*Bog filler (Bondo type could be used) to form up eye contours&lt;br /&gt;
*Planting container&lt;br /&gt;
&lt;br /&gt;
For the record there are eight servos in use in each ornament.&lt;br /&gt;
*1 - Mouth&lt;br /&gt;
*2 - Slow Rotate&lt;br /&gt;
*3 - Eyes Up / Down&lt;br /&gt;
*4 - Eyes Left / Right&lt;br /&gt;
*5 - Left Eyelid&lt;br /&gt;
*6 - Right Eyelid&lt;br /&gt;
*7 - Left Eye Brow&lt;br /&gt;
*8 - Right Eyebrow&lt;br /&gt;
 &lt;br /&gt;
The individual control of the eyelids was so that I could make them wink, while the separate eyebrows were also for expression / effect.&lt;br /&gt;
*There is also a motor that turns the whole assembly. &lt;br /&gt;
&lt;br /&gt;
*brass rods&lt;br /&gt;
*wire rods&lt;br /&gt;
*bicycle spokes&lt;br /&gt;
*foam board&lt;br /&gt;
*board board&lt;br /&gt;
&lt;br /&gt;
*Renard board&lt;br /&gt;
*Renard servo software&lt;br /&gt;
*Opto-couplers&lt;br /&gt;
*Drivers&lt;br /&gt;
&lt;br /&gt;
*1000 watt slide projector with template&lt;br /&gt;
&lt;br /&gt;
*Chris Maloney&amp;#039;s Audacity converter.&lt;br /&gt;
 &lt;br /&gt;
*Many cans of paint.&lt;br /&gt;
&lt;br /&gt;
== Eye Mechanism ==&lt;br /&gt;
The inspiration was [https://www.youtube.com/watch?v=6jqvu_MQ5pc Marshall Tearle&amp;#039;s Eyes]. If you look his over, you will see how Tory Street Light&amp;#039;s came together. &lt;br /&gt;
&lt;br /&gt;
Setting up the eye mechanism required an inordinate amount of time.  Placing the eyeball mounting rod with the universal joint exactly in the geometric center of the ball required a center mark to be made on the outside of the ball with a black marker pen while the ball half was spun up in my metal lathe to locate the eye center. A 1/8 inch brass rod, with a washer soldered on the end, roughly shaped to a convex curve to match the internal surface of the ball, was then &amp;quot;5 minute Epoxied&amp;quot; into the ball. The rod was located over the ball&amp;#039;s center mark, while being held at the outside end by the centering plate. The brass rod was then cut to length once the Epoxy had cured.&lt;br /&gt;
&lt;br /&gt;
This was centering was most important, as the eyeball had to be concentric with the eyelids to allow them to open and close with the eyeballs in any position, but not touch one another. The clearances involved in this project were very fine and created problems when I glued the photograph of the eye in position.  Many hours of adjustment was required to get everything operating and in the correct place.&lt;br /&gt;
&lt;br /&gt;
The pictures of real eyes, obtained from the internet, were adjusted to the required size and then printed as photographs in a local photo lab. They were cut to shape and then had three radial cuts made in to the black iris. To make them to conform to the eye&amp;#039;s spherical form they were soaked in Methylated spirits (denatured alcohol), then pressed between waste disk sections removed from the rear of the eyeball when it was opened up for mounting and control.&lt;br /&gt;
&lt;br /&gt;
The eye mechanism in the photographs is a spare set, and as such has micro servos to operate the eyelids, the display ornaments have digital servos in that position that are three or four times faster. These were necessary because human eyelids &amp;quot;Blink&amp;quot; very quickly, to replicate this, super fast servos were required.&lt;br /&gt;
&lt;br /&gt;
== Ornament Mounting ==&lt;br /&gt;
Each &amp;quot;Ball&amp;quot; is supported on a 3/8 inch threaded rod running through ball races mounted under the two marine ply plates that are fiber-glassed inside the ball.  The weight is taken on nuts threaded on the rod with two nuts locked together at the bottom, and another pair under, and on top of, the top bearing.  At the bottom, inside the ball, an arm is lock-nutted to the rod, which is connected to an arm on a jumbo servo to allow slow controlled rotation of the ball, over about 60 degrees, so that they can &amp;quot;look&amp;quot; at each other.&lt;br /&gt;
&lt;br /&gt;
The top end of the rod has a purpose made threaded female adapter screwed on and lock-nutted to it that converts from 3/8 inch to 6.0 mm. The 6.0 mm socket end has a 6.00 mm threaded &amp;quot;Rawl Anchor&amp;quot; hook that is made for concrete &amp;quot;Rawl Anchor&amp;quot; attachments. These were used because I did not trust my welding should I welded the two rods together.&lt;br /&gt;
&lt;br /&gt;
The hook is simply hooked over a bolt running through two plates that are bolted through another eye-bolt in the same plates, this eye-bolt is attached to the 180 degree rotating mechanism in a similar way to the ball&amp;#039;s hook.  This setup is visible in the picture under the rotating mechanism. Once the ball is hooked onto its cross bolt, the bolts are tightened up very tight, because all the rotating forces are transferred through the fixture. The hook makes for &amp;quot;easy&amp;quot; mounting and demounting of the Ball.&lt;br /&gt;
&lt;br /&gt;
== Ornament Rotation ==&lt;br /&gt;
The rotating mechanism may require some further explanation, it is based on a 24 volt gearbox out of a soft drink dispenser, or similar. It has another three times reduction to it&amp;#039;s output shaft using some discarded heavy duty gears from my work at the time. The 3/8 inch threaded output shaft is once more supported on ball races top and bottom, lock nutted as required. The large output gear has bolts on it to operate the Micro switch end-stops. Electrically the mechanism has 12 volts DC supplied permanently, and is controlled by a signal from one of the display Renard controller channels. When the channel is &amp;quot;Off&amp;quot; the ball is &amp;quot;Parked&amp;quot;, when the channel is &amp;quot;On&amp;quot; the ball rotates 180 degrees and faces the street, then returns to parked again when the channel is switched &amp;quot;Off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here you can see the gears including the limit switches and the stop bolt that provide the stop position for &amp;quot;Off&amp;quot; and &amp;quot;On&amp;quot;.&lt;br /&gt;
[[FILE:Complete_view_of_Turning_Mech_fromTop2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Rotating mechanism is mounted on a discarded satellite dish mounting arm, locked up good and tight at right angles. The arm is attached to a wooden plate that is &amp;quot;F&amp;quot; cramped to a verandah rafter when on display. This plate has hooks to slip under the iron roof for added support.  The result being the balls are kept out of the weather for protection, and out of sight when not &amp;quot;Performing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Renard controller ==&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Controller_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Another item that may require further explanation is the Renard controller. This is housed in a re-purposed electric drill case, with the electronics separated inside plastic sandwich boxes for safety. The controller is a strip-board 32 channel Renard controller, using regular PIC16F688 chips, loaded with Chris Maloney&amp;#039;s Ren Servo software, running at 11500 baud. There are 32 Channels because it was initially intended to have four &amp;quot;Ornaments&amp;quot;. The controller is capable of running from the ESP8266 Pixelstick in the lower lefthand corner of the picture, but I prefer it to be cabled from the end of a 448 Channel controller chain. The Renard controller talks to the opto-couplers via the cable bundles on the right side of the case. &lt;br /&gt;
&lt;br /&gt;
The Renservo software came from Dirk’s Wiki, originally written by Chris Maloney &amp;quot;Ctmal&amp;quot; on the forum and updated by “GDYRDAVE”, who passed away a couple of years ago. :-(&lt;br /&gt;
 &lt;br /&gt;
[[Firmware_-_multiple_versions]]&lt;br /&gt;
 &lt;br /&gt;
I used the Pic16F688 version which worked fine for me. I tried the PIC 16F1825 version, this worked fine but inverted the data/servo positions and as such I didn’t have the time to correct all the data so I returned to the PIC16F688.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Opto-coupler and buffer box ==&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Opto_Buffer_and_Gating_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Opto-coupler and buffer box also has 32 channels available. The opto-couplers are wired to the buffer chips that send the signals to the servos and relays. The buffer/driver chips are hidden under the linking cables on the right hand side of the picture. It was fortuitous that the buffer chips have a tri-state gating pin. I was able to take advantage of this to disable the data to the Ornaments when they were not &amp;quot;Performing&amp;quot;. This was necessary because the Renard chain was outputting pulse width data outside the range of the servos when not &amp;quot;performing&amp;quot;, the effect was that all the servos went to random positions way outside their expected positions. The gating signal was gained by using the projector control signal from a Renard controller channel, applied through an opto-coupler. The gating to &amp;quot;On&amp;quot; occurs 100 milliseconds after the start of the sequence, and &amp;quot;Off&amp;quot; occurs 60 milliseconds before the end of the sequence.&lt;br /&gt;
&lt;br /&gt;
== Cost ==&lt;br /&gt;
The whole project took around three months or so, full time. Thankfully I am retired; so time is not too much of a problem.  I did not have a budget for the project. It just had a life of its own, and as it transpired, it was a good thing I didn’t. Only when the project was completed I managed to locate all the invoices / till dockets and totaled them up. It was a good thing I was sitting down when I saw the bottom line!!  They cost around $600.00 (US) each, way above my guestimation!!  With the benefit of hindsight that was money well spent, judging from the comments that I hear from the viewing public.&lt;br /&gt;
 &lt;br /&gt;
The most expensive items would be the Fiberglass Dynal Cloth, Polyester Resin and the thinners. Then the Rustoleum Glitter spray-can paint, these were about $20.00 (US) per can and I used around 10 per Ornament. Also about 8 or 10 Cans of clear sealing spray, thankfully slightly cheaper than the Glitter paint!  Next in line would be the several pounds of Polyester builders / car body filler or “Bog” that was required to form/create the eyebrows and eye sockets. The next most expensive would be the big Jumbo servos, they were around the $30.00 – $40.00 each, two per ornament, plus spares, as well as the very fast eyelid servo’s they were in the region of $15.00 each with two per Ornament, plus spares.&lt;br /&gt;
 &lt;br /&gt;
It was fortuitous that I was able to acquire from my employer, prior to retirement, discarded, out of spec, Ball races, big gears, micro switches and the industrial plastic parts that I used to create the eye mechanism. The ball races, (8 per ornament) and the mounting plates that support the ornaments are included in the above!&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=3241</id>
		<title>Super-sized Animatronic Ball Ornaments</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=3241"/>
		<updated>2023-12-22T05:32:45Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:* &amp;#039;&amp;#039;&amp;#039;Supersized Animatronic Christmas Ball Ornament - [https://www.youtube.com/watch?v=i6EUMGoU_6s&amp;amp;feature=youtu.be Watch The Video! Click HERE] - from Tory Street Lights&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Expressions 3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is it?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
These are lip-syncing ornaments. The ornament is handmade polyester resin over fiberglass and cheesecloth with animatronic eyes, eyelids, eyebrows and mouth.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How did it go over?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Maybe you want to make a splash in your display? Terry said, &amp;#039;&amp;#039;&amp;quot;With the benefit of hindsight that was money well spent, judging from the comments that I hear from the viewing public.&amp;quot;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Where did this idea come from?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Brian &amp;quot;Lightman&amp;quot; Lincoln did this: [https://player.vimeo.com/video/148903061 Singing Christmas Tree]&lt;br /&gt;
 &lt;br /&gt;
Terry Sutton (Tory Street Lights aka T.D.Sutton) wanted to supersize the idea for his front porch. He custom designed the ornaments and made them by hand. He thinks it was about a three month journey and they each turned out to be quite expensive ([[#Cost]]). &lt;br /&gt;
&lt;br /&gt;
This entry was edited by MikeKrebs but most of it is Terry&amp;#039;s words either from the video or from correspondence with him. So, when you read first person comments, you should hear Terry talking and when you read third person comments, that would be Mike putting words to Terry&amp;#039;s project. If you make something similar and want to add your comments, please do so!&lt;br /&gt;
== Features ==&lt;br /&gt;
*Large ornament - about 2 feet across&lt;br /&gt;
*Sculpted eye sockets&lt;br /&gt;
*Eyes move together for natural look&lt;br /&gt;
*Eye moves in two dimensions - up/down and left-right&lt;br /&gt;
*Eye movements can be done at same time (roll eyes!)&lt;br /&gt;
*Eyebrows are independently controlled&lt;br /&gt;
*Ornament turns away from crowd when not doing show&lt;br /&gt;
*Controlled via Renard protocol&lt;br /&gt;
*Can be controlled by wireless ESP8266 module&lt;br /&gt;
*All custom made&lt;br /&gt;
&lt;br /&gt;
== Bill of Materials ==&lt;br /&gt;
&lt;br /&gt;
*Big ball (25 inches)&lt;br /&gt;
*PVA glue (Elmers!)&lt;br /&gt;
*Paper towels for mache&lt;br /&gt;
*Cheesecloth&lt;br /&gt;
*Fiberglass and polyester resin&lt;br /&gt;
*Bog filler (Bondo type could be used) to form up eye contours&lt;br /&gt;
*Planting container&lt;br /&gt;
&lt;br /&gt;
For the record there are eight servos in use in each ornament.&lt;br /&gt;
*1 - Mouth&lt;br /&gt;
*2 - Slow Rotate&lt;br /&gt;
*3 - Eyes Up / Down&lt;br /&gt;
*4 - Eyes Left / Right&lt;br /&gt;
*5 - Left Eyelid&lt;br /&gt;
*6 - Right Eyelid&lt;br /&gt;
*7 - Left Eye Brow&lt;br /&gt;
*8 - Right Eyebrow&lt;br /&gt;
 &lt;br /&gt;
The individual control of the eyelids was so that I could make them wink, while the separate eyebrows were also for expression / effect.&lt;br /&gt;
*There is also a motor that turns the whole assembly. &lt;br /&gt;
&lt;br /&gt;
*brass rods&lt;br /&gt;
*wire rods&lt;br /&gt;
*bicycle spokes&lt;br /&gt;
*foam board&lt;br /&gt;
*board board&lt;br /&gt;
&lt;br /&gt;
*Renard board&lt;br /&gt;
*Renard servo software&lt;br /&gt;
*Opto-couplers&lt;br /&gt;
*Drivers&lt;br /&gt;
&lt;br /&gt;
*1000 watt slide projector with template&lt;br /&gt;
&lt;br /&gt;
*Chris Maloney&amp;#039;s Audacity converter.&lt;br /&gt;
 &lt;br /&gt;
*Many cans of paint.&lt;br /&gt;
&lt;br /&gt;
== Eye Mechanism ==&lt;br /&gt;
The inspiration was [https://www.youtube.com/watch?v=6jqvu_MQ5pc Marshall Tearle&amp;#039;s Eyes]. If you look his over, you will see how Tory Street Light&amp;#039;s came together. &lt;br /&gt;
&lt;br /&gt;
Setting up the eye mechanism required an inordinate amount of time.  Placing the eyeball mounting rod with the universal joint exactly in the geometric center of the ball required a center mark to be made on the outside of the ball with a black marker pen while the ball half was spun up in my metal lathe to locate the eye center. A 1/8 inch brass rod, with a washer soldered on the end, roughly shaped to a convex curve to match the internal surface of the ball, was then &amp;quot;5 minute Epoxied&amp;quot; into the ball. The rod was located over the ball&amp;#039;s center mark, while being held at the outside end by the centering plate. The brass rod was then cut to length once the Epoxy had cured.&lt;br /&gt;
&lt;br /&gt;
This was centering was most important, as the eyeball had to be concentric with the eyelids to allow them to open and close with the eyeballs in any position, but not touch one another. The clearances involved in this project were very fine and created problems when I glued the photograph of the eye in position.  Many hours of adjustment was required to get everything operating and in the correct place.&lt;br /&gt;
&lt;br /&gt;
The pictures of real eyes, obtained from the internet, were adjusted to the required size and then printed as photographs in a local photo lab. They were cut to shape and then had three radial cuts made in to the black iris. To make them to conform to the eye&amp;#039;s spherical form they were soaked in Methylated spirits (denatured alcohol), then pressed between waste disk sections removed from the rear of the eyeball when it was opened up for mounting and control.&lt;br /&gt;
&lt;br /&gt;
The eye mechanism in the photographs is a spare set, and as such has micro servos to operate the eyelids, the display ornaments have digital servos in that position that are three or four times faster. These were necessary because human eyelids &amp;quot;Blink&amp;quot; very quickly, to replicate this, super fast servos were required.&lt;br /&gt;
&lt;br /&gt;
== Ornament Mounting ==&lt;br /&gt;
Each &amp;quot;Ball&amp;quot; is supported on a 3/8 inch threaded rod running through ball races mounted under the two marine ply plates that are fiber-glassed inside the ball.  The weight is taken on nuts threaded on the rod with two nuts locked together at the bottom, and another pair under, and on top of, the top bearing.  At the bottom, inside the ball, an arm is lock-nutted to the rod, which is connected to an arm on a jumbo servo to allow slow controlled rotation of the ball, over about 60 degrees, so that they can &amp;quot;look&amp;quot; at each other.&lt;br /&gt;
&lt;br /&gt;
The top end of the rod has a purpose made threaded female adapter screwed on and lock-nutted to it that converts from 3/8 inch to 6.0 mm. The 6.0 mm socket end has a 6.00 mm threaded &amp;quot;Rawl Anchor&amp;quot; hook that is made for concrete &amp;quot;Rawl Anchor&amp;quot; attachments. These were used because I did not trust my welding should I welded the two rods together.&lt;br /&gt;
&lt;br /&gt;
The hook is simply hooked over a bolt running through two plates that are bolted through another eye-bolt in the same plates, this eye-bolt is attached to the 180 degree rotating mechanism in a similar way to the ball&amp;#039;s hook.  This setup is visible in the picture under the rotating mechanism. Once the ball is hooked onto its cross bolt, the bolts are tightened up very tight, because all the rotating forces are transferred through the fixture. The hook makes for &amp;quot;easy&amp;quot; mounting and demounting of the Ball.&lt;br /&gt;
&lt;br /&gt;
== Ornament Rotation ==&lt;br /&gt;
The rotating mechanism may require some further explanation, it is based on a 24 volt gearbox out of a soft drink dispenser, or similar. It has another three times reduction to it&amp;#039;s output shaft using some discarded heavy duty gears from my work at the time. The 3/8 inch threaded output shaft is once more supported on ball races top and bottom, lock nutted as required. The large output gear has bolts on it to operate the Micro switch end-stops. Electrically the mechanism has 12 volts DC supplied permanently, and is controlled by a signal from one of the display Renard controller channels. When the channel is &amp;quot;Off&amp;quot; the ball is &amp;quot;Parked&amp;quot;, when the channel is &amp;quot;On&amp;quot; the ball rotates 180 degrees and faces the street, then returns to parked again when the channel is switched &amp;quot;Off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here you can see the gears including the limit switches and the stop bolt that provide the stop position for &amp;quot;Off&amp;quot; and &amp;quot;On&amp;quot;.&lt;br /&gt;
[[FILE:Complete_view_of_Turning_Mech_fromTop2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Rotating mechanism is mounted on a discarded satellite dish mounting arm, locked up good and tight at right angles. The arm is attached to a wooden plate that is &amp;quot;F&amp;quot; cramped to a verandah rafter when on display. This plate has hooks to slip under the iron roof for added support.  The result being the balls are kept out of the weather for protection, and out of sight when not &amp;quot;Performing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Renard controller ==&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Controller_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Another item that may require further explanation is the Renard controller. This is housed in a re-purposed electric drill case, with the electronics separated inside plastic sandwich boxes for safety. The controller is a strip-board 32 channel Renard controller, using regular PIC16F688 chips, loaded with Chris Maloney&amp;#039;s Ren Servo software, running at 11500 baud. There are 32 Channels because it was initially intended to have four &amp;quot;Ornaments&amp;quot;. The controller is capable of running from the ESP8266 Pixelstick in the lower lefthand corner of the picture, but I prefer it to be cabled from the end of a 448 Channel controller chain. The Renard controller talks to the opto-couplers via the cable bundles on the right side of the case. &lt;br /&gt;
&lt;br /&gt;
The Renservo software came from Dirk’s Wiki, originally written by Chris Maloney &amp;quot;Ctmal&amp;quot; on the forum and updated by “GDYRDAVE”, who passed away a couple of years ago. :-&lt;br /&gt;
 &lt;br /&gt;
[[Firmware_-_multiple_versions]]&lt;br /&gt;
 &lt;br /&gt;
I used the Pic16F688 version which worked fine for me. I tried the PIC 16F1825 version, this worked fine but inverted the data/servo positions and as such I didn’t have the time to correct all the data so I returned to the PIC16F688.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Opto-coupler and buffer box ==&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Opto_Buffer_and_Gating_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Opto-coupler and buffer box also has 32 channels available. The opto-couplers are wired to the buffer chips that send the signals to the servos and relays. The buffer/driver chips are hidden under the linking cables on the right hand side of the picture. It was fortuitous that the buffer chips have a tri-state gating pin. I was able to take advantage of this to disable the data to the Ornaments when they were not &amp;quot;Performing&amp;quot;. This was necessary because the Renard chain was outputting pulse width data outside the range of the servos when not &amp;quot;performing&amp;quot;, the effect was that all the servos went to random positions way outside their expected positions. The gating signal was gained by using the projector control signal from a Renard controller channel, applied through an opto-coupler. The gating to &amp;quot;On&amp;quot; occurs 100 milliseconds after the start of the sequence, and &amp;quot;Off&amp;quot; occurs 60 milliseconds before the end of the sequence.&lt;br /&gt;
&lt;br /&gt;
== Cost ==&lt;br /&gt;
The whole project took around three months or so, full time. Thankfully I am retired; so time is not too much of a problem.  I did not have a budget for the project. It just had a life of its own, and as it transpired, it was a good thing I didn’t. Only when the project was completed I managed to locate all the invoices / till dockets and totaled them up. It was a good thing I was sitting down when I saw the bottom line!!  They cost around $600.00 (US) each, way above my guestimation!!  With the benefit of hindsight that was money well spent, judging from the comments that I hear from the viewing public.&lt;br /&gt;
 &lt;br /&gt;
The most expensive items would be the Fiberglass Dynal Cloth, Polyester Resin and the thinners. Then the Rustoleum Glitter spray-can paint, these were about $20.00 (US) per can and I used around 10 per Ornament. Also about 8 or 10 Cans of clear sealing spray, thankfully slightly cheaper than the Glitter paint!  Next in line would be the several pounds of Polyester builders / car body filler or “Bog” that was required to form/create the eyebrows and eye sockets. The next most expensive would be the big Jumbo servos, they were around the $30.00 – $40.00 each, two per ornament, plus spares, as well as the very fast eyelid servo’s they were in the region of $15.00 each with two per Ornament, plus spares.&lt;br /&gt;
 &lt;br /&gt;
It was fortuitous that I was able to acquire from my employer, prior to retirement, discarded, out of spec, Ball races, big gears, micro switches and the industrial plastic parts that I used to create the eye mechanism. The ball races, (8 per ornament) and the mounting plates that support the ornaments are included in the above!&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_pixels_V1&amp;diff=3175</id>
		<title>Arduino and pixels V1</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_pixels_V1&amp;diff=3175"/>
		<updated>2020-10-19T03:00:49Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Created page with &amp;quot;This is untested code. Awaiting feedback. Serial may not support this many pixels at 115200.  &amp;lt;nowiki&amp;gt; // Basic Vixen &amp;quot;generic&amp;quot; serial  //  - Setup a generic serial controller...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is untested code. Awaiting feedback. Serial may not support this many pixels at 115200.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// Basic Vixen &amp;quot;generic&amp;quot; serial &lt;br /&gt;
//  - Setup a generic serial controller to use this sketch&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;FastLED.h&amp;gt; //include the FastLED library in the Arduino project&lt;br /&gt;
#define LED_PIN1 2 //for first arc strip of 100 LEDs, pin 2 on the MEGA&lt;br /&gt;
#define LED_PIN2 3 //for second arc strip of 100 LEDs, pin 3 on the MEGA&lt;br /&gt;
#define LED_PIN3 4 //for third arc strip of 100 LEDs, pin 4 on the MEGA&lt;br /&gt;
#define LED_PIN4 5 //for fourth arc strip of 100 LEDs, pin 5 on the MEGA&lt;br /&gt;
#define LED_PIN5 6 //for fifth arc strip of 100 LEDs, pin 6 on the MEGA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Vixen information&lt;br /&gt;
// speed for the com port for talking with player&lt;br /&gt;
const long BAUD_RATE = 115200L;&lt;br /&gt;
#define NUM_LEDS 100&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in sequencer)&lt;br /&gt;
&lt;br /&gt;
#define GRB_ORDER GRB //pixel strips is set to use GRB color codes&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(CONTROLLER_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
&lt;br /&gt;
#define LED_TYPE WS2811 //type of LED&lt;br /&gt;
&lt;br /&gt;
//create arrays to hold the FastLED CRBG code for each of the 50 pixels in the:&lt;br /&gt;
CRGB leds1[NUM_LEDS]; //first arc.&lt;br /&gt;
CRGB leds2[NUM_LEDS]; //second arc.&lt;br /&gt;
CRGB leds3[NUM_LEDS]; //third arc.&lt;br /&gt;
CRGB leds4[NUM_LEDS]; //fourth arc.&lt;br /&gt;
CRGB leds5[NUM_LEDS]; //fifth arc.&lt;br /&gt;
&lt;br /&gt;
int g; //a variable for loop section&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  Serial.begin(BAUD_RATE);&lt;br /&gt;
  pinMode(LED_PIN1, OUTPUT); //set pins to output. PIN1 is pin 2 on the Arduino board.&lt;br /&gt;
  pinMode(LED_PIN2, OUTPUT);&lt;br /&gt;
  pinMode(LED_PIN3, OUTPUT);&lt;br /&gt;
  pinMode(LED_PIN4, OUTPUT);&lt;br /&gt;
  pinMode(LED_PIN5, OUTPUT);&lt;br /&gt;
&lt;br /&gt;
  ////Set up the pixel strips to run using FastLED&lt;br /&gt;
  FastLED.addLeds&amp;lt;LED_TYPE, LED_PIN1, GRB_ORDER&amp;gt;(leds1, NUM_LEDS).setCorrection(TypicalLEDStrip); //for the first arc&lt;br /&gt;
  FastLED.addLeds&amp;lt;LED_TYPE, LED_PIN2, GRB_ORDER&amp;gt;(leds2, NUM_LEDS).setCorrection(TypicalLEDStrip); //for the second arc&lt;br /&gt;
  FastLED.addLeds&amp;lt;LED_TYPE, LED_PIN3, GRB_ORDER&amp;gt;(leds3, NUM_LEDS).setCorrection(TypicalLEDStrip); //for the third arc&lt;br /&gt;
  FastLED.addLeds&amp;lt;LED_TYPE, LED_PIN4, GRB_ORDER&amp;gt;(leds4, NUM_LEDS).setCorrection(TypicalLEDStrip); //for the fourth arc&lt;br /&gt;
  FastLED.addLeds&amp;lt;LED_TYPE, LED_PIN5, GRB_ORDER&amp;gt;(leds5, NUM_LEDS).setCorrection(TypicalLEDStrip); //for the fifth arc&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  if (Serial.available() &amp;gt; 0) {&lt;br /&gt;
    waitForControllerHeader(CONTROLLER_HEADER);&lt;br /&gt;
    readSequenceData();&lt;br /&gt;
    FastLED.show(); //then we tell FastLED to show the pixels!&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readSequenceData()&lt;br /&gt;
{&lt;br /&gt;
  // We assume that since we found the header, we can just read the rest of the bytes&lt;br /&gt;
  for (g = 0; g &amp;lt; NUM_LEDS; g++) {&lt;br /&gt;
    Serial.readBytes( ( char*)(&amp;amp;leds1[g]), 3);&lt;br /&gt;
  }&lt;br /&gt;
  for (g = 0; g &amp;lt; NUM_LEDS; g++) {    //then we read the next 300 bytes for the second arc of LEDs&lt;br /&gt;
    Serial.readBytes( ( char*)(&amp;amp;leds2[g]), 3);&lt;br /&gt;
  }&lt;br /&gt;
  for (g = 0; g &amp;lt; NUM_LEDS; g++) {    //then we read the next 300 bytes for the third arc of LEDs&lt;br /&gt;
    Serial.readBytes( ( char*)(&amp;amp;leds3[g]), 3);&lt;br /&gt;
  }&lt;br /&gt;
  for (g = 0; g &amp;lt; NUM_LEDS; g++) {    //then we read the next 300 bytes for the fourth arc of LEDs&lt;br /&gt;
    Serial.readBytes( ( char*)(&amp;amp;leds4[g]), 3);&lt;br /&gt;
  }&lt;br /&gt;
  for (g = 0; g &amp;lt; NUM_LEDS; g++) {    //then we read the next 300 bytes for the fifth arc of LEDs&lt;br /&gt;
    Serial.readBytes( ( char*)(&amp;amp;leds5[g]), 3);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForControllerHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the CONTROLLER_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != CONTROLLER_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // Let&amp;#039;s test if all the pixels work.&lt;br /&gt;
  // This will be too fast for real discernment but they should all be on at end of this&lt;br /&gt;
  FastLED.clear();&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; NUM_LEDS; channelIndex++) {&lt;br /&gt;
    leds1[channelIndex] = CRGB::Red;&lt;br /&gt;
    FastLED.show();&lt;br /&gt;
  }&lt;br /&gt;
  delay(500);&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; NUM_LEDS; channelIndex++) {&lt;br /&gt;
    leds2[channelIndex] = CRGB::Red;&lt;br /&gt;
    FastLED.show();&lt;br /&gt;
  }&lt;br /&gt;
  delay(500);&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; NUM_LEDS; channelIndex++) {&lt;br /&gt;
    leds3[channelIndex] = CRGB::Red;&lt;br /&gt;
    FastLED.show();&lt;br /&gt;
  }&lt;br /&gt;
  delay(500);&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; NUM_LEDS; channelIndex++) {&lt;br /&gt;
    leds4[channelIndex] = CRGB::Red;&lt;br /&gt;
    FastLED.show();&lt;br /&gt;
  }&lt;br /&gt;
  delay(500);&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; NUM_LEDS; channelIndex++) {&lt;br /&gt;
    leds5[channelIndex] = CRGB::Red;&lt;br /&gt;
    FastLED.show();&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  FastLED.clear();&lt;br /&gt;
  FastLED.show();&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino&amp;diff=3174</id>
		<title>Arduino</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino&amp;diff=3174"/>
		<updated>2020-10-19T02:51:32Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: added pixel code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Arduino Table of Contents&lt;br /&gt;
&lt;br /&gt;
* [[Arduino and the mechanical relay]]&lt;br /&gt;
&lt;br /&gt;
* [[Arduino and pixels V1]]&lt;br /&gt;
&lt;br /&gt;
* yet another new page&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=File:Hanging_Rod_and_Hook2.jpg&amp;diff=2919</id>
		<title>File:Hanging Rod and Hook2.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=File:Hanging_Rod_and_Hook2.jpg&amp;diff=2919"/>
		<updated>2020-04-30T04:51:30Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=File:Turning_Mech_Underside2.jpg&amp;diff=2918</id>
		<title>File:Turning Mech Underside2.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=File:Turning_Mech_Underside2.jpg&amp;diff=2918"/>
		<updated>2020-04-30T04:49:45Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=File:Internal_view_of_the_Slow_Rotate_Servo_and_Ball_Race_Mounting3.jpg&amp;diff=2917</id>
		<title>File:Internal view of the Slow Rotate Servo and Ball Race Mounting3.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=File:Internal_view_of_the_Slow_Rotate_Servo_and_Ball_Race_Mounting3.jpg&amp;diff=2917"/>
		<updated>2020-04-30T04:49:16Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Internal view of the slow rotate servo and ball race mounting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Internal view of the slow rotate servo and ball race mounting&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2916</id>
		<title>Super-sized Animatronic Ball Ornaments</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2916"/>
		<updated>2020-04-30T04:43:54Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Features&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:* &amp;#039;&amp;#039;&amp;#039;Supersized Animatronic Christmas Ball Ornament - [https://www.youtube.com/watch?v=i6EUMGoU_6s&amp;amp;feature=youtu.be Watch The Video! Click HERE] - from Tory Street Lights&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Expressions 3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is it?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
These are lip-syncing ornaments. The ornament is handmade polyester resin over fiberglass and cheesecloth with animatronic eyes, eyelids, eyebrows and mouth.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How did it go over?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Maybe you want to make a splash in your display? Terry said, &amp;#039;&amp;#039;&amp;quot;With the benefit of hindsight that was money well spent, judging from the comments that I hear from the viewing public.&amp;quot;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Where did this idea come from?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Brian &amp;quot;Lightman&amp;quot; Lincoln did this: [https://player.vimeo.com/video/148903061 Singing Christmas Tree]&lt;br /&gt;
 &lt;br /&gt;
Terry Sutton (Tory Street Lights aka T.D.Sutton) wanted to supersize the idea for his front porch. He custom designed the ornaments and made them by hand. He thinks it was about a three month journey and they each turned out to be quite expensive ([[#Cost]]). &lt;br /&gt;
&lt;br /&gt;
This entry was edited by MikeKrebs but most of it is Terry&amp;#039;s words either from the video or from correspondence with him. So, when you read first person comments, you should hear Terry talking and when you read third person comments, that would be Mike putting words to Terry&amp;#039;s project. If you make something similar and want to add your comments, please do so!&lt;br /&gt;
== Features ==&lt;br /&gt;
*Large ornament - about 2 feet across&lt;br /&gt;
*Sculpted eye sockets&lt;br /&gt;
*Eyes move together for natural look&lt;br /&gt;
*Eye moves in two dimensions - up/down and left-right&lt;br /&gt;
*Eye movements can be done at same time (roll eyes!)&lt;br /&gt;
*Eyebrows are independently controlled&lt;br /&gt;
*Ornament turns away from crowd when not doing show&lt;br /&gt;
*Controlled via Renard protocol&lt;br /&gt;
*Can be controlled by wireless ESP8266 module&lt;br /&gt;
*All custom made&lt;br /&gt;
&lt;br /&gt;
== Bill of Materials ==&lt;br /&gt;
&lt;br /&gt;
*Big ball (25 inches)&lt;br /&gt;
*PVA glue (Elmers!)&lt;br /&gt;
*Paper towels for mache&lt;br /&gt;
*Cheesecloth&lt;br /&gt;
*Fiberglass and polyester resin&lt;br /&gt;
*Bog filler (Bondo type could be used) to form up eye contours&lt;br /&gt;
*Planting container&lt;br /&gt;
&lt;br /&gt;
For the record there are eight servos in use in each ornament.&lt;br /&gt;
*1 - Mouth&lt;br /&gt;
*2 - Slow Rotate&lt;br /&gt;
*3 - Eyes Up / Down&lt;br /&gt;
*4 - Eyes Left / Right&lt;br /&gt;
*5 - Left Eyelid&lt;br /&gt;
*6 - Right Eyelid&lt;br /&gt;
*7 - Left Eye Brow&lt;br /&gt;
*8 - Right Eyebrow&lt;br /&gt;
 &lt;br /&gt;
The individual control of the eyelids was so that I could make them wink, while the separate eyebrows were also for expression / effect.&lt;br /&gt;
*There is also a motor that turns the whole assembly. &lt;br /&gt;
&lt;br /&gt;
*brass rods&lt;br /&gt;
*wire rods&lt;br /&gt;
*bicycle spokes&lt;br /&gt;
*foam board&lt;br /&gt;
*board board&lt;br /&gt;
&lt;br /&gt;
*Renard board&lt;br /&gt;
*Renard servo software&lt;br /&gt;
*Opto-couplers&lt;br /&gt;
*Drivers&lt;br /&gt;
&lt;br /&gt;
*1000 watt slide projector with template&lt;br /&gt;
&lt;br /&gt;
*Chris Maloney&amp;#039;s Audacity converter.&lt;br /&gt;
 &lt;br /&gt;
*Many cans of paint.&lt;br /&gt;
&lt;br /&gt;
== Eye Mechanism ==&lt;br /&gt;
The inspiration was [https://www.youtube.com/watch?v=6jqvu_MQ5pc Marshall Tearle&amp;#039;s Eyes]. If you look his over, you will see how Tory Street Light&amp;#039;s came together. &lt;br /&gt;
&lt;br /&gt;
Setting up the eye mechanism required an inordinate amount of time.  Placing the eyeball mounting rod with the universal joint exactly in the geometric center of the ball required a center mark to be made on the outside of the ball with a black marker pen while the ball half was spun up in my metal lathe to locate the eye center. A 1/8 inch brass rod, with a washer soldered on the end, roughly shaped to a convex curve to match the internal surface of the ball, was then &amp;quot;5 minute Epoxied&amp;quot; into the ball. The rod was located over the ball&amp;#039;s center mark, while being held at the outside end by the centering plate. The brass rod was then cut to length once the Epoxy had cured.&lt;br /&gt;
&lt;br /&gt;
This was centering was most important, as the eyeball had to be concentric with the eyelids to allow them to open and close with the eyeballs in any position, but not touch one another. The clearances involved in this project were very fine and created problems when I glued the photograph of the eye in position.  Many hours of adjustment was required to get everything operating and in the correct place.&lt;br /&gt;
&lt;br /&gt;
The pictures of real eyes, obtained from the internet, were adjusted to the required size and then printed as photographs in a local photo lab. They were cut to shape and then had three radial cuts made in to the black iris. To make them to conform to the eye&amp;#039;s spherical form they were soaked in Methylated spirits (denatured alcohol), then pressed between waste disk sections removed from the rear of the eyeball when it was opened up for mounting and control.&lt;br /&gt;
&lt;br /&gt;
The eye mechanism in the photographs is a spare set, and as such has micro servos to operate the eyelids, the display ornaments have digital servos in that position that are three or four times faster. These were necessary because human eyelids &amp;quot;Blink&amp;quot; very quickly, to replicate this, super fast servos were required.&lt;br /&gt;
&lt;br /&gt;
== Ornament Mounting ==&lt;br /&gt;
Each &amp;quot;Ball&amp;quot; is supported on a 3/8 inch threaded rod running through ball races mounted under the two marine ply plates that are fiber-glassed inside the ball.  The weight is taken on nuts threaded on the rod with two nuts locked together at the bottom, and another pair under, and on top of, the top bearing.  At the bottom, inside the ball, an arm is lock-nutted to the rod, which is connected to an arm on a jumbo servo to allow slow controlled rotation of the ball, over about 60 degrees, so that they can &amp;quot;look&amp;quot; at each other.&lt;br /&gt;
&lt;br /&gt;
The top end of the rod has a purpose made threaded female adapter screwed on and lock-nutted to it that converts from 3/8 inch to 6.0 mm. The 6.0 mm socket end has a 6.00 mm threaded &amp;quot;Rawl Anchor&amp;quot; hook that is made for concrete &amp;quot;Rawl Anchor&amp;quot; attachments. These were used because I did not trust my welding should I welded the two rods together.&lt;br /&gt;
&lt;br /&gt;
The hook is simply hooked over a bolt running through two plates that are bolted through another eye-bolt in the same plates, this eye-bolt is attached to the 180 degree rotating mechanism in a similar way to the ball&amp;#039;s hook.  This setup is visible in the picture under the rotating mechanism. Once the ball is hooked onto its cross bolt, the bolts are tightened up very tight, because all the rotating forces are transferred through the fixture. The hook makes for &amp;quot;easy&amp;quot; mounting and demounting of the Ball.&lt;br /&gt;
&lt;br /&gt;
== Ornament Rotation ==&lt;br /&gt;
The rotating mechanism may require some further explanation, it is based on a 24 volt gearbox out of a soft drink dispenser, or similar. It has another three times reduction to it&amp;#039;s output shaft using some discarded heavy duty gears from my work at the time. The 3/8 inch threaded output shaft is once more supported on ball races top and bottom, lock nutted as required. The large output gear has bolts on it to operate the Micro switch end-stops. Electrically the mechanism has 12 volts DC supplied permanently, and is controlled by a signal from one of the display Renard controller channels. When the channel is &amp;quot;Off&amp;quot; the ball is &amp;quot;Parked&amp;quot;, when the channel is &amp;quot;On&amp;quot; the ball rotates 180 degrees and faces the street, then returns to parked again when the channel is switched &amp;quot;Off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here you can see the gears including the limit switches and the stop bolt that provide the stop position for &amp;quot;Off&amp;quot; and &amp;quot;On&amp;quot;.&lt;br /&gt;
[[FILE:Complete_view_of_Turning_Mech_fromTop2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Rotating mechanism is mounted on a discarded satellite dish mounting arm, locked up good and tight at right angles. The arm is attached to a wooden plate that is &amp;quot;F&amp;quot; cramped to a verandah rafter when on display. This plate has hooks to slip under the iron roof for added support.  The result being the balls are kept out of the weather for protection, and out of sight when not &amp;quot;Performing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Renard controller ==&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Controller_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Another item that may require further explanation is the Renard controller. This is housed in a re-purposed electric drill case, with the electronics separated inside plastic sandwich boxes for safety. The controller is a strip-board 32 channel Renard controller, using regular PIC16F688 chips, loaded with Chris Maloney&amp;#039;s Ren Servo software, running at 11500 baud. There are 32 Channels because it was initially intended to have four &amp;quot;Ornaments&amp;quot;. The controller is capable of running from the ESP8266 Pixelstick in the lower lefthand corner of the picture, but I prefer it to be cabled from the end of a 448 Channel controller chain. The Renard controller talks to the opto-couplers via the cable bundles on the right side of the case. &lt;br /&gt;
&lt;br /&gt;
The Renservo software came from Dirk’s Wiki, originally written by “GDYRDAVE”, who passed away a couple of years ago, and updated by Chris Maloney, “Ctmal” on the forum :-&lt;br /&gt;
 &lt;br /&gt;
[[Firmware_-_multiple_versions]]&lt;br /&gt;
 &lt;br /&gt;
I used the Pic16F688 version which worked fine for me. I tried the PIC 16F1825 version, this worked fine but inverted the data/servo positions and as such I didn’t have the time to correct all the data so I returned to the PIC16F688.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Opto-coupler and buffer box ==&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Opto_Buffer_and_Gating_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Opto-coupler and buffer box also has 32 channels available. The opto-couplers are wired to the buffer chips that send the signals to the servos and relays. The buffer/driver chips are hidden under the linking cables on the right hand side of the picture. It was fortuitous that the buffer chips have a tri-state gating pin. I was able to take advantage of this to disable the data to the Ornaments when they were not &amp;quot;Performing&amp;quot;. This was necessary because the Renard chain was outputting pulse width data outside the range of the servos when not &amp;quot;performing&amp;quot;, the effect was that all the servos went to random positions way outside their expected positions. The gating signal was gained by using the projector control signal from a Renard controller channel, applied through an opto-coupler. The gating to &amp;quot;On&amp;quot; occurs 100 milliseconds after the start of the sequence, and &amp;quot;Off&amp;quot; occurs 60 milliseconds before the end of the sequence.&lt;br /&gt;
&lt;br /&gt;
== Cost ==&lt;br /&gt;
The whole project took around three months or so, full time. Thankfully I am retired; so time is not too much of a problem.  I did not have a budget for the project. It just had a life of its own, and as it transpired, it was a good thing I didn’t. Only when the project was completed I managed to locate all the invoices / till dockets and totaled them up. It was a good thing I was sitting down when I saw the bottom line!!  They cost around $600.00 (US) each, way above my guestimation!!  With the benefit of hindsight that was money well spent, judging from the comments that I hear from the viewing public.&lt;br /&gt;
 &lt;br /&gt;
The most expensive items would be the Fiberglass Dynal Cloth, Polyester Resin and the thinners. Then the Rustoleum Glitter spray-can paint, these were about $20.00 (US) per can and I used around 10 per Ornament. Also about 8 or 10 Cans of clear sealing spray, thankfully slightly cheaper than the Glitter paint!  Next in line would be the several pounds of Polyester builders / car body filler or “Bog” that was required to form/create the eyebrows and eye sockets. The next most expensive would be the big Jumbo servos, they were around the $30.00 – $40.00 each, two per ornament, plus spares, as well as the very fast eyelid servo’s they were in the region of $15.00 each with two per Ornament, plus spares.&lt;br /&gt;
 &lt;br /&gt;
It was fortuitous that I was able to acquire from my employer, prior to retirement, discarded, out of spec, Ball races, big gears, micro switches and the industrial plastic parts that I used to create the eye mechanism. The ball races, (8 per ornament) and the mounting plates that support the ornaments are included in the above!&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2866</id>
		<title>Super-sized Animatronic Ball Ornaments</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2866"/>
		<updated>2020-04-24T04:55:18Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Getting there - added more content&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:* &amp;#039;&amp;#039;&amp;#039;Supersized Animatronic Christmas Ball Ornament - [https://www.youtube.com/watch?v=i6EUMGoU_6s&amp;amp;feature=youtu.be Watch The Video! Click HERE] - from Tory Street Lights&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Expressions 3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is it?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
These are lip-syncing ornaments. The ornament is handmade polyester resin over fiberglass and cheesecloth with animatronic eyes, eyelids, eyebrows and mouth.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How did it go over?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Maybe you want to make a splash in your display? Terry said, &amp;#039;&amp;#039;&amp;quot;With the benefit of hindsight that was money well spent, judging from the comments that I hear from the viewing public.&amp;quot;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Where did this idea come from?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Brian &amp;quot;Lightman&amp;quot; Lincoln did this:&lt;br /&gt;
&lt;br /&gt;
[https://player.vimeo.com/video/148903061 Singing Christmas Tree]&lt;br /&gt;
 &lt;br /&gt;
Terry Sutton (Tory Street Lights aka T.D.Sutton) wanted to supersize the idea for his front porch. He custom designed the ornaments and made them by hand. He thinks it was about a three month journey and they each turned out to be quite expensive ([[#Cost]]). &lt;br /&gt;
&lt;br /&gt;
This entry was edited by MikeKrebs but most of it is Terry&amp;#039;s words either from the video or from correspondence with him. So, when you read first person comments, you should hear Terry talking and when you read third person comments, that would be Mike putting words to Terry&amp;#039;s project. If you make something similar and want to add your comments, please do so!&lt;br /&gt;
&lt;br /&gt;
== Bill of Materials ==&lt;br /&gt;
&lt;br /&gt;
*Big ball (25 inches)&lt;br /&gt;
*PVA glue (Elmers!)&lt;br /&gt;
*Paper towels for mache&lt;br /&gt;
*Cheesecloth&lt;br /&gt;
*Fiberglass and polyester resin&lt;br /&gt;
*Bog filler (Bondo type could be used) to form up eye contours&lt;br /&gt;
*Planting container&lt;br /&gt;
&lt;br /&gt;
For the record there are eight servos in use in each ornament.&lt;br /&gt;
*1 - Mouth&lt;br /&gt;
*2 - Slow Rotate&lt;br /&gt;
*3 - Eyes Up / Down&lt;br /&gt;
*4 - Eyes Left / Right&lt;br /&gt;
*5 - Left Eyelid&lt;br /&gt;
*6 - Right Eyelid&lt;br /&gt;
*7 - Left Eye Brow&lt;br /&gt;
*8 - Right Eyebrow&lt;br /&gt;
 &lt;br /&gt;
The individual control of the eyelids was so that I could make them wink, while the separate eyebrows were also for expression / effect.&lt;br /&gt;
*There is also a motor that turns the whole assembly. &lt;br /&gt;
&lt;br /&gt;
*brass rods&lt;br /&gt;
*wire rods&lt;br /&gt;
*bicycle spokes&lt;br /&gt;
*foam board&lt;br /&gt;
*board board&lt;br /&gt;
&lt;br /&gt;
*Renard board&lt;br /&gt;
*Renard servo software&lt;br /&gt;
*Opto-couplers&lt;br /&gt;
*Drivers&lt;br /&gt;
&lt;br /&gt;
*1000 watt slide projector with template&lt;br /&gt;
&lt;br /&gt;
*Chris Maloney&amp;#039;s Audacity converter.&lt;br /&gt;
 &lt;br /&gt;
*Many cans of paint.&lt;br /&gt;
&lt;br /&gt;
== Eye Mechanism ==&lt;br /&gt;
The inspiration was [https://www.youtube.com/watch?v=6jqvu_MQ5pc Marshall Tearle&amp;#039;s Eyes]. If you look his over, you will see how Tory Street Light&amp;#039;s came together. &lt;br /&gt;
&lt;br /&gt;
Setting up the eye mechanism required an inordinate amount of time.  Placing the eyeball mounting rod with the universal joint exactly in the geometric center of the ball required a center mark to be made on the outside of the ball with a black marker pen while the ball half was spun up in my metal lathe to locate the eye center. A 1/8 inch brass rod, with a washer soldered on the end, roughly shaped to a convex curve to match the internal surface of the ball, was then &amp;quot;5 minute Epoxied&amp;quot; into the ball. The rod was located over the ball&amp;#039;s center mark, while being held at the outside end by the centering plate. The brass rod was then cut to length once the Epoxy had cured.&lt;br /&gt;
&lt;br /&gt;
This was centering was most important, as the eyeball had to be concentric with the eyelids to allow them to open and close with the eyeballs in any position, but not touch one another. The clearances involved in this project were very fine and created problems when I glued the photograph of the eye in position.  Many hours of adjustment was required to get everything operating and in the correct place.&lt;br /&gt;
&lt;br /&gt;
The pictures of real eyes, obtained from the internet, were adjusted to the required size and then printed as photographs in a local photo lab. They were cut to shape and then had three radial cuts made in to the black iris. To make them to conform to the eye&amp;#039;s spherical form they were soaked in Methylated spirits (denatured alcohol), then pressed between waste disk sections removed from the rear of the eyeball when it was opened up for mounting and control.&lt;br /&gt;
&lt;br /&gt;
The eye mechanism in the photographs is a spare set, and as such has micro servos to operate the eyelids, the display ornaments have digital servos in that position that are three or four times faster. These were necessary because human eyelids &amp;quot;Blink&amp;quot; very quickly, to replicate this, super fast servos were required.&lt;br /&gt;
&lt;br /&gt;
== Ornament Mounting ==&lt;br /&gt;
Each &amp;quot;Ball&amp;quot; is supported on a 3/8 inch threaded rod running through ball races mounted under the two marine ply plates that are fiber-glassed inside the ball.  The weight is taken on nuts threaded on the rod with two nuts locked together at the bottom, and another pair under, and on top of, the top bearing.  At the bottom, inside the ball, an arm is lock-nutted to the rod, which is connected to an arm on a jumbo servo to allow slow controlled rotation of the ball, over about 60 degrees, so that they can &amp;quot;look&amp;quot; at each other.&lt;br /&gt;
&lt;br /&gt;
The top end of the rod has a purpose made threaded female adapter screwed on and lock-nutted to it that converts from 3/8 inch to 6.0 mm. The 6.0 mm socket end has a 6.00 mm threaded &amp;quot;Rawl Anchor&amp;quot; hook that is made for concrete &amp;quot;Rawl Anchor&amp;quot; attachments. These were used because I did not trust my welding should I welded the two rods together.&lt;br /&gt;
&lt;br /&gt;
The hook is simply hooked over a bolt running through two plates that are bolted through another eye-bolt in the same plates, this eye-bolt is attached to the 180 degree rotating mechanism in a similar way to the ball&amp;#039;s hook.  This setup is visible in the picture under the rotating mechanism. Once the ball is hooked onto its cross bolt, the bolts are tightened up very tight, because all the rotating forces are transferred through the fixture. The hook makes for &amp;quot;easy&amp;quot; mounting and demounting of the Ball.&lt;br /&gt;
&lt;br /&gt;
== Ornament Rotation ==&lt;br /&gt;
The rotating mechanism may require some further explanation, it is based on a 24 volt gearbox out of a soft drink dispenser, or similar. It has another three times reduction to it&amp;#039;s output shaft using some discarded heavy duty gears from my work at the time. The 3/8 inch threaded output shaft is once more supported on ball races top and bottom, lock nutted as required. The large output gear has bolts on it to operate the Micro switch end-stops. Electrically the mechanism has 12 volts DC supplied permanently, and is controlled by a signal from one of the display Renard controller channels. When the channel is &amp;quot;Off&amp;quot; the ball is &amp;quot;Parked&amp;quot;, when the channel is &amp;quot;On&amp;quot; the ball rotates 180 degrees and faces the street, then returns to parked again when the channel is switched &amp;quot;Off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here you can see the gears including the limit switches and the stop bolt that provide the stop position for &amp;quot;Off&amp;quot; and &amp;quot;On&amp;quot;.&lt;br /&gt;
[[FILE:Complete_view_of_Turning_Mech_fromTop2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Rotating mechanism is mounted on a discarded satellite dish mounting arm, locked up good and tight at right angles. The arm is attached to a wooden plate that is &amp;quot;F&amp;quot; cramped to a verandah rafter when on display. This plate has hooks to slip under the iron roof for added support.  The result being the balls are kept out of the weather for protection, and out of sight when not &amp;quot;Performing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Renard controller ==&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Controller_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Another item that may require further explanation is the Renard controller. This is housed in a re-purposed electric drill case, with the electronics separated inside plastic sandwich boxes for safety. The controller is a strip-board 32 channel Renard controller, using regular PIC16F688 chips, loaded with Chris Maloney&amp;#039;s Ren Servo software, running at 11500 baud. There are 32 Channels because it was initially intended to have four &amp;quot;Ornaments&amp;quot;. The controller is capable of running from the ESP8266 Pixelstick in the lower lefthand corner of the picture, but I prefer it to be cabled from the end of a 448 Channel controller chain. The Renard controller talks to the opto-couplers via the cable bundles on the right side of the case. &lt;br /&gt;
&lt;br /&gt;
The Renservo software came from Dirk’s Wiki, originally written by “GDYRDAVE”, who passed away a couple of years ago, and updated by Chris Maloney, “Ctmal” on the forum :-&lt;br /&gt;
 &lt;br /&gt;
[[Firmware_-_multiple_versions]]&lt;br /&gt;
 &lt;br /&gt;
I used the Pic16F688 version which worked fine for me. I tried the PIC 16F1825 version, this worked fine but inverted the data/servo positions and as such I didn’t have the time to correct all the data so I returned to the PIC16F688.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Opto-coupler and buffer box ==&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Opto_Buffer_and_Gating_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Opto-coupler and buffer box also has 32 channels available. The opto-couplers are wired to the buffer chips that send the signals to the servos and relays. The buffer/driver chips are hidden under the linking cables on the right hand side of the picture. It was fortuitous that the buffer chips have a tri-state gating pin. I was able to take advantage of this to disable the data to the Ornaments when they were not &amp;quot;Performing&amp;quot;. This was necessary because the Renard chain was outputting pulse width data outside the range of the servos when not &amp;quot;performing&amp;quot;, the effect was that all the servos went to random positions way outside their expected positions. The gating signal was gained by using the projector control signal from a Renard controller channel, applied through an opto-coupler. The gating to &amp;quot;On&amp;quot; occurs 100 milliseconds after the start of the sequence, and &amp;quot;Off&amp;quot; occurs 60 milliseconds before the end of the sequence.&lt;br /&gt;
&lt;br /&gt;
== Cost ==&lt;br /&gt;
The whole project took around three months or so, full time. Thankfully I am retired; so time is not too much of a problem.  I did not have a budget for the project. It just had a life of its own, and as it transpired, it was a good thing I didn’t. Only when the project was completed I managed to locate all the invoices / till dockets and totaled them up. It was a good thing I was sitting down when I saw the bottom line!!  They cost around $600.00 (US) each, way above my guestimation!!  With the benefit of hindsight that was money well spent, judging from the comments that I hear from the viewing public.&lt;br /&gt;
 &lt;br /&gt;
The most expensive items would be the Fiberglass Dynal Cloth, Polyester Resin and the thinners. Then the Rustoleum Glitter spray-can paint, these were about $20.00 (US) per can and I used around 10 per Ornament. Also about 8 or 10 Cans of clear sealing spray, thankfully slightly cheaper than the Glitter paint!  Next in line would be the several pounds of Polyester builders / car body filler or “Bog” that was required to form/create the eyebrows and eye sockets. The next most expensive would be the big Jumbo servos, they were around the $30.00 – $40.00 each, two per ornament, plus spares, as well as the very fast eyelid servo’s they were in the region of $15.00 each with two per Ornament, plus spares.&lt;br /&gt;
 &lt;br /&gt;
It was fortuitous that I was able to acquire from my employer, prior to retirement, discarded, out of spec, Ball races, big gears, micro switches and the industrial plastic parts that I used to create the eye mechanism. The ball races, (8 per ornament) and the mounting plates that support the ornaments are included in the above!&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2865</id>
		<title>Super-sized Animatronic Ball Ornaments</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2865"/>
		<updated>2020-04-23T05:12:22Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: added some more pictures&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:* &amp;#039;&amp;#039;&amp;#039;Supersized Animatronic Christmas Ball Ornament - [https://www.youtube.com/watch?v=i6EUMGoU_6s&amp;amp;feature=youtu.be Click HERE] - from Tory Street Lights&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
[[File:Expressions 3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is it?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
These are lip-syncing ornaments. The general ideas for how to put them together is valid for any similar item you want to make.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Where did this idea come from?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Brian &amp;quot;Lightman&amp;quot; Lincoln did this:&lt;br /&gt;
&lt;br /&gt;
[https://player.vimeo.com/video/148903061 Singing Christmas Tree]&lt;br /&gt;
 &lt;br /&gt;
Terry Sutton (Tory Street Lights aka T.D.Sutton) wanted to supersize the idea for his front porch.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Bill of Materials&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Big ball (25 inches)&lt;br /&gt;
PVA/paper&lt;br /&gt;
Cheesecloth&lt;br /&gt;
Fiberglass and poly&lt;br /&gt;
&lt;br /&gt;
Planting container&lt;br /&gt;
&lt;br /&gt;
Servos of various sizes &lt;br /&gt;
4 servos for the eyes.&lt;br /&gt;
2 servos for the eyebrows&lt;br /&gt;
1 servo for the mouth.&lt;br /&gt;
1 motor and gears for the ornament to turn away from crowd when not performing&lt;br /&gt;
&lt;br /&gt;
brass rods&lt;br /&gt;
wire rods&lt;br /&gt;
foam board&lt;br /&gt;
board board&lt;br /&gt;
&lt;br /&gt;
Renard board&lt;br /&gt;
Optocouplers&lt;br /&gt;
Drivers&lt;br /&gt;
&lt;br /&gt;
1000 watt slide projector with template&lt;br /&gt;
&lt;br /&gt;
Chris Maloney&amp;#039;s Audacity&lt;br /&gt;
 &lt;br /&gt;
Many cans of paint.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Some further comments about the &amp;quot;Supersized Christmas Balls&amp;quot; to clarify some points about the project may be in order.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Eye Mechanism&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Setting up the eye mechanism required an inordinate amount of time.  Placing the eyeball mounting rod with the universal joint exactly in the geometric center of the ball required a center mark to be made on the outside of the ball with a black marker pen while the ball half was spun up in my metal lathe to locate the eye center. A 1/8 inch brass rod, with a washer soldered on the end, roughly shaped to a convex curve to match the internal surface of the ball, was then &amp;quot;5 minute Epoxied&amp;quot; into the ball. The rod was located over the ball&amp;#039;s center mark, while being held at the outside end by the centering plate. The brass rod was then cut to length once the Epoxy had cured.&lt;br /&gt;
&lt;br /&gt;
This was centering was most important, as the eyeball had to be concentric with the eyelids to allow them to open and close with the eyeballs in any position, but not touch one another. The clearances involved in this project were very fine and created problems when I glued the photograph of the eye in position.  Many hours of adjustment was required to get everything operating and in the correct place.&lt;br /&gt;
&lt;br /&gt;
The pictures of real eyes, obtained from the internet, were adjusted to the required size and then printed as photographs in a local photo lab. They were cut to shape and then had three radial cuts made in to the black iris. To make them to conform to the eye&amp;#039;s spherical form they were soaked in Methylated spirits (denatured alcohol), then pressed between waste disk sections removed from the rear of the eyeball when it was opened up for mounting and control.&lt;br /&gt;
&lt;br /&gt;
The eye mechanism in the photographs is a spare set, and as such has micro servos to operate the eyelids, the display ornaments have digital servos in that position that are three or four times faster. These were necessary because human eyelids &amp;quot;Blink&amp;quot; very quickly, to replicate this, super fast servos were required.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ornament Mounting&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Each &amp;quot;Ball&amp;quot; is supported on a 3/8 inch threaded rod running through ball races mounted under the two marine ply plates that are fiber-glassed inside the ball.  The weight is taken on nuts threaded on the rod with two nuts locked together at the bottom, and another pair under, and on top of, the top bearing.  At the bottom, inside the ball, an arm is lock-nutted to the rod, which is connected to an arm on a jumbo servo to allow slow controlled rotation of the ball, over about 60 degrees, so that they can &amp;quot;look&amp;quot; at each other.&lt;br /&gt;
&lt;br /&gt;
The top end of the rod has a purpose made threaded female adapter screwed on and lock-nutted to it that converts from 3/8 inch to 6.0 mm. The 6.0 mm socket end has a 6.00 mm threaded &amp;quot;Rawl Anchor&amp;quot; hook that is made for concrete &amp;quot;Rawl Anchor&amp;quot; attachments. These were used because I did not trust my welding should I welded the two rods together.&lt;br /&gt;
&lt;br /&gt;
The hook is simply hooked over a bolt running through two plates that are bolted through another eye-bolt in the same plates, this eye-bolt is attached to the 180 degree rotating mechanism in a similar way to the ball&amp;#039;s hook.  This setup is visible in the picture under the rotating mechanism. Once the ball is hooked onto its cross bolt, the bolts are tightened up very tight, because all the rotating forces are transferred through the fixture. The hook makes for &amp;quot;easy&amp;quot; mounting and demounting of the Ball.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ornament Rotation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The rotating mechanism may require some further explanation, it is based on a 24 volt gearbox out of a soft drink dispenser, or similar. It has another three times reduction to it&amp;#039;s output shaft using some discarded heavy duty gears from my work at the time. The 3/8 inch threaded output shaft is once more supported on ball races top and bottom, lock nutted as required. The large output gear has bolts on it to operate the Micro switch end-stops. Electrically the mechanism has 12 volts DC supplied permanently, and is controlled by a signal from one of the display Renard controller channels. When the channel is &amp;quot;Off&amp;quot; the ball is &amp;quot;Parked&amp;quot;, when the channel is &amp;quot;On&amp;quot; the ball rotates 180 degrees and faces the street, then returns to parked again when the channel is switched &amp;quot;Off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here you can see the gears including the limit switches and the stop bolt that provide the stop position for &amp;quot;Off&amp;quot; and &amp;quot;On&amp;quot;.&lt;br /&gt;
[[FILE:Complete_view_of_Turning_Mech_fromTop2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Rotating mechanism is mounted on a discarded satellite dish mounting arm, locked up good and tight at right angles. The arm is attached to a wooden plate that is &amp;quot;F&amp;quot; cramped to a verandah rafter when on display. This plate has hooks to slip under the iron roof for added support.  The result being the balls are kept out of the weather for protection, and out of sight when not &amp;quot;Performing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Renard controller&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Controller_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Another item that may require further explanation is the Renard controller. This is housed in a re-purposed electric drill case, with the electronics separated inside plastic sandwich boxes for safety. The controller is a strip-board 32 channel Renard controller, using regular PIC16F688 chips, loaded with Chris Maloney&amp;#039;s Ren Servo software, running at 11500 baud. There are 32 Channels because it was initially intended to have four &amp;quot;Ornaments&amp;quot;. The controller is capable of running from the ESP8266 Pixelstick in the lower lefthand corner of the picture, but I prefer it to be cabled from the end of a 448 Channel controller chain. The Renard controller talks to the opto-couplers via the cable bundles on the right side of the case. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Opto-coupler and buffer box&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
[[FILE:32_Channel_Ren_Servo_Opto_Buffer_and_Gating_Box2.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Opto-coupler and buffer box also has 32 channels available. The opto-couplers are wired to the buffer chips that send the signals to the servos and relays. The buffer/driver chips are hidden under the linking cables on the right hand side of the picture. It was fortuitous that the buffer chips have a tri-state gating pin. I was able to take advantage of this to disable the data to the Ornaments when they were not &amp;quot;Performing&amp;quot;. This was necessary because the Renard chain was outputting pulse width data outside the range of the servos when not &amp;quot;performing&amp;quot;, the effect was that all the servos went to random positions way outside their expected positions. The gating signal was gained by using the projector control signal from a Renard controller channel, applied through an opto-coupler. The gating to &amp;quot;On&amp;quot; occurs 100 milliseconds after the start of the sequence, and &amp;quot;Off&amp;quot; occurs 60 milliseconds before the end of the sequence,&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=File:Complete_view_of_Turning_Mech_fromTop2.jpg&amp;diff=2864</id>
		<title>File:Complete view of Turning Mech fromTop2.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=File:Complete_view_of_Turning_Mech_fromTop2.jpg&amp;diff=2864"/>
		<updated>2020-04-23T05:03:29Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=File:32_Channel_Ren_Servo_Opto_Buffer_and_Gating_Box2.jpg&amp;diff=2863</id>
		<title>File:32 Channel Ren Servo Opto Buffer and Gating Box2.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=File:32_Channel_Ren_Servo_Opto_Buffer_and_Gating_Box2.jpg&amp;diff=2863"/>
		<updated>2020-04-21T04:33:11Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=File:32_Channel_Ren_Servo_Controller_Box2.jpg&amp;diff=2862</id>
		<title>File:32 Channel Ren Servo Controller Box2.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=File:32_Channel_Ren_Servo_Controller_Box2.jpg&amp;diff=2862"/>
		<updated>2020-04-21T04:30:44Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2861</id>
		<title>Super-sized Animatronic Ball Ornaments</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2861"/>
		<updated>2020-04-21T04:28:01Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:* &amp;#039;&amp;#039;&amp;#039;Supersized Animatronic Christmas Ball Ornament - [https://www.youtube.com/watch?v=i6EUMGoU_6s&amp;amp;feature=youtu.be Click HERE] - from Tory Street Lights&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
[[File:Expressions 3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is it?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
These are lip-syncing ornaments. The general ideas for how to put them together is valid for any similar item you want to make.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Where did this idea come from?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Brian &amp;quot;Lightman&amp;quot; Lincoln did this:&lt;br /&gt;
&lt;br /&gt;
[https://player.vimeo.com/video/148903061 Singing Christmas Tree]&lt;br /&gt;
 &lt;br /&gt;
Terry Sutton (Tory Street Lights aka T.D.Sutton) wanted to supersize the idea for his front porch.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Bill of Materials&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Big ball (25 inches)&lt;br /&gt;
PVA/paper&lt;br /&gt;
Cheesecloth&lt;br /&gt;
&lt;br /&gt;
Planting container&lt;br /&gt;
&lt;br /&gt;
Servos of various sizes &lt;br /&gt;
4 servos for the eyes.&lt;br /&gt;
2 servos for the eyebrows&lt;br /&gt;
1 servo for the mouth.&lt;br /&gt;
1 motor and gears for the ornament to turn away from crowd when not performing&lt;br /&gt;
&lt;br /&gt;
brass rod&lt;br /&gt;
foam board&lt;br /&gt;
&lt;br /&gt;
Renard board&lt;br /&gt;
Optocouplers&lt;br /&gt;
Drivers&lt;br /&gt;
&lt;br /&gt;
1000 watt slide projector with template&lt;br /&gt;
&lt;br /&gt;
Chris Maloney&amp;#039;s Audacity&lt;br /&gt;
 &lt;br /&gt;
Many cans of paint.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Some further comments about the &amp;quot;Supersized Christmas Balls&amp;quot; to clarify some points about the project may be in order.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Eye Mechanism&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Setting up the eye mechanism required an inordinate amount of time.  Placing the eyeball mounting rod with the universal joint exactly in the geometric center of the ball required a center mark to be made on the outside of the ball with a black marker pen while the ball half was spun up in my metal lathe to locate the eye center. A 1/8 inch brass rod, with a washer soldered on the end, roughly shaped to a convex curve to match the internal surface of the ball, was then &amp;quot;5 minute Epoxied&amp;quot; into the ball. The rod was located over the ball&amp;#039;s center mark, while being held at the outside end by the centering plate. The brass rod was then cut to length once the Epoxy had cured.&lt;br /&gt;
&lt;br /&gt;
This was centering was most important, as the eyeball had to be concentric with the eyelids to allow them to open and close with the eyeballs in any position, but not touch one another. The clearances involved in this project were very fine and created problems when I glued the photograph of the eye in position.  Many hours of adjustment was required to get everything operating and in the correct place.&lt;br /&gt;
&lt;br /&gt;
The pictures of real eyes, obtained from the internet, were adjusted to the required size and then printed as photographs in a local photo lab. They were cut to shape and then had three radial cuts made in to the black iris. To make them to conform to the eye&amp;#039;s spherical form they were soaked in Methylated spirits (denatured alcohol), then pressed between waste disk sections removed from the rear of the eyeball when it was opened up for mounting and control.&lt;br /&gt;
&lt;br /&gt;
The eye mechanism in the photographs is a spare set, and as such has micro servos to operate the eyelids, the display ornaments have digital servos in that position that are three or four times faster. These were necessary because human eyelids &amp;quot;Blink&amp;quot; very quickly, to replicate this, super fast servos were required.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ornament Mounting&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Each &amp;quot;Ball&amp;quot; is supported on a 3/8 inch threaded rod running through ball races mounted under the two marine ply plates that are fiber-glassed inside the ball.  The weight is taken on nuts threaded on the rod with two nuts locked together at the bottom, and another pair under, and on top of, the top bearing.  At the bottom, inside the ball, an arm is lock-nutted to the rod, which is connected to an arm on a jumbo servo to allow slow controlled rotation of the ball, over about 60 degrees, so that they can &amp;quot;look&amp;quot; at each other.&lt;br /&gt;
&lt;br /&gt;
The top end of the rod has a purpose made threaded female adapter screwed on and lock-nutted to it that converts from 3/8 inch to 6.0 mm. The 6.0 mm socket end has a 6.00 mm threaded &amp;quot;Rawl Anchor&amp;quot; hook that is made for concrete &amp;quot;Rawl Anchor&amp;quot; attachments. These were used because I did not trust my welding should I welded the two rods together.&lt;br /&gt;
&lt;br /&gt;
The hook is simply hooked over a bolt running through two plates that are bolted through another eye-bolt in the same plates, this eye-bolt is attached to the 180 degree rotating mechanism in a similar way to the ball&amp;#039;s hook.  This setup is visible in the picture under the rotating mechanism. Once the ball is hooked onto its cross bolt, the bolts are tightened up very tight, because all the rotating forces are transferred through the fixture. The hook makes for &amp;quot;easy&amp;quot; mounting and demounting of the Ball.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ornament Rotation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The rotating mechanism may require some further explanation, it is based on a 24 volt gearbox out of a soft drink dispenser, or similar. It has another three times reduction to it&amp;#039;s output shaft using some discarded heavy duty gears from my work at the time. The 3/8 inch threaded output shaft is once more supported on ball races top and bottom, lock nutted as required. The large output gear has bolts on it to operate the Micro switch end-stops. Electrically the mechanism has 12 volts DC supplied permanently, and is controlled by a signal from one of the display Renard controller channels. When the channel is &amp;quot;Off&amp;quot; the ball is &amp;quot;Parked&amp;quot;, when the channel is &amp;quot;On&amp;quot; the ball rotates 180 degrees and faces the street, then returns to parked again when the channel is switched &amp;quot;Off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The Rotating mechanism is mounted on a discarded satellite dish mounting arm, locked up good and tight at right angles. The arm is attached to a wooden plate that is &amp;quot;F&amp;quot; cramped to a verandah rafter when on display. This plate has hooks to slip under the iron roof for added support.  The result being the balls are kept out of the weather for protection, and out of sight when not &amp;quot;Performing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Renard controller&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Another item that may require further explanation is the Renard controller. This is housed in a re-purposed Electric Drill case, with the electronics separated inside plastic sandwich boxes for safety. The controller is a strip-board 32 channel Renard controller, using regular PIC16F688 chips, loaded with Chris Maloney&amp;#039;s Ren Servo software, running at 11500 baud. There are 32 Channels because it was initially intended to have four &amp;quot;Ornaments&amp;quot;. The controller is capable of running from the ESP8266 Pixelstick in the lower lefthand corner of the picture, but I prefer it to be cabled from the end of a 448 Channel controller chain.&lt;br /&gt;
&lt;br /&gt;
The Opto-coupler and buffer box also has 32 channels available, with the buffer/driver chips hidden under the linking cables on the Right hand side of the picture. It was fortuitous that the buffer chips have a tri-state gating pin. I was able to take advantage of this to disable the data to the Ornaments when they were not &amp;quot;Performing&amp;quot;. This was necessary because the Renard chain was outputting pulse width data outside the range of the servos when not &amp;quot;performing&amp;quot;, the effect was that all the servos went to random positions way outside their expected positions. The gating signal was gained by using the projector control signal from a display Renard controller channel, applied through an opto coupler. The gating to &amp;quot;On&amp;quot; occurs 100 milliseconds after the start of the sequence, and &amp;quot;Off&amp;quot; occurs 60 milliseconds before the end of the sequence,&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=File:Expressions_3.jpg&amp;diff=2860</id>
		<title>File:Expressions 3.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=File:Expressions_3.jpg&amp;diff=2860"/>
		<updated>2020-04-21T04:17:11Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Supersize ornaments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Supersize ornaments&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2859</id>
		<title>Super-sized Animatronic Ball Ornaments</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2859"/>
		<updated>2020-04-21T03:56:12Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Added content from Terry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:* &amp;#039;&amp;#039;&amp;#039;Supersized Animatronic Christmas Ball Ornament - [https://www.youtube.com/watch?v=i6EUMGoU_6s&amp;amp;feature=youtu.be Click HERE] - from Tory Street Lights&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
More below...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is it?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
These are lip-syncing ornaments. The idea for how to put them together is valid for any similar item you want to make.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Where did this idea come from?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Brian &amp;quot;Lightman&amp;quot; Lincoln did this:&lt;br /&gt;
&lt;br /&gt;
[https://player.vimeo.com/video/148903061 Singing Christmas Tree]&lt;br /&gt;
 &lt;br /&gt;
Terry Sutton (Tory Street Lights aka T.D.Sutton) wanted to supersize the idea for his front porch.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Bill of Materials&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Big ball (25 inches)&lt;br /&gt;
PVA/paper&lt;br /&gt;
Cheesecloth&lt;br /&gt;
&lt;br /&gt;
Planting container&lt;br /&gt;
&lt;br /&gt;
Servos of various sizes &lt;br /&gt;
4 servos for the eyes.&lt;br /&gt;
2 servos for the eyebrows&lt;br /&gt;
1 servo for the mouth.&lt;br /&gt;
1 motor and gears for the ornament to turn away from crowd when not performing&lt;br /&gt;
&lt;br /&gt;
brass rod&lt;br /&gt;
foam board&lt;br /&gt;
&lt;br /&gt;
Renard board&lt;br /&gt;
Optocouplers&lt;br /&gt;
Drivers&lt;br /&gt;
&lt;br /&gt;
1000 watt slide projector with template&lt;br /&gt;
&lt;br /&gt;
Chris Maloney&amp;#039;s Audacity&lt;br /&gt;
 &lt;br /&gt;
Many cans of paint.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Some further comments about the &amp;quot;Supersized Christmas Balls&amp;quot; to clarify some points about the project may be in order.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Setting up the eye mechanism required an inordinate amount of time.  Placing the eyeball mounting rod with the universal joint exactly in the geometric center of the ball required a center mark to be made on the outside of the ball with a black marker pen while the ball half was spun up in my metal lathe to locate the eye center. A 1/8 inch brass rod, with a washer soldered on the end, roughly shaped to a convex curve to match the internal surface of the ball, was then &amp;quot;5 minute Epoxied&amp;quot; into the ball. The rod was located over the ball&amp;#039;s center mark, while being held at the outside end by the centering plate. The brass rod was then cut to length once the Epoxy had cured.&lt;br /&gt;
&lt;br /&gt;
This was centering was most important, as the eyeball had to be concentric with the eyelids to allow them to open and close with the eyeballs in any position, but not touch one-another. The clearances involved in this project were very fine and created problems when I glued the photograph of the eye in position.  Many hours of adjustment was required to get everything operating and in the correct place.&lt;br /&gt;
&lt;br /&gt;
The pictures of real eyes, obtained from the internet, were adjusted to the required size and then printed as photographs in a local photo lab. They were cut to shape and then had three radial cuts made in to the black iris. To make them to conform to the eye&amp;#039;s spherical form they were soaked in Methylated spirits, then pressed between waste disk sections removed from the rear of the eyeball when it was opened up for mounting and control.&lt;br /&gt;
&lt;br /&gt;
The eye mechanism in the photographs is a spare set, and as such has micro servos to operate the eyelids, the display ornaments have digital servos in that position that are three or four times faster. These were necessary because human eyelids &amp;quot;Blink&amp;quot; very quickly, to replicate this, super fast servos were required.&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;Ball&amp;quot; is supported on a 3/8 inch threaded rod running through ball races mounted under the two marine ply plates that are fiber-glassed inside the ball.  The weight is taken on nuts threaded on the rod with two nuts locked together at the bottom, and another pair under, and on top of, the top bearing.  At the bottom, inside the ball, an arm is lock-nutted to the rod, which is connected to an arm on a jumbo servo to allow slow controlled rotation of the ball, over about 60 degrees, so that they can &amp;quot;look&amp;quot; at each other.&lt;br /&gt;
&lt;br /&gt;
The top end of the rod has a purpose made threaded female adaptor screwed on and lock-nutted to it that converts from 3/8 inch to 6.0 mm. The 6.0 mm socket end has a 6.00 mm threaded &amp;quot;Rawl Anchor&amp;quot; hook that is made for concrete &amp;quot;Rawl Anchor&amp;quot; attachments. These were used because I did not trust my welding should I welded the two rods together.&lt;br /&gt;
&lt;br /&gt;
The hook is simply hooked over a bolt running through two plates that are bolted through another eyebolt in the same plates, this eyebolt is attached to the 180 degree rotating mechanism in a similar way to the ball&amp;#039;s hook.  This setup is visible in the picture under the rotating mechanism. Once the ball is hooked onto its cross bolt, the bolts are tightened up very tight, because all the rotating forces are transferred through the fixture. The hook makes for &amp;quot;easy&amp;quot; mounting and demounting of the Ball.&lt;br /&gt;
&lt;br /&gt;
The rotating mechanism may require some further explanation, it is based on a 24 volt gearbox out of a soft drink dispenser, or similar. It has another three times reduction to it&amp;#039;s output shaft using some discarded heavy duty gears from my work at the time. The 3/8 inch threaded output shaft is once more supported on ball races top and bottom, lock nutted as required. The large output gear has bolts on it to operate the Micro switch end-stops. Electrically the mechanism has 12 volts DC supplied permanently, and is controlled by a signal from one of the display Renard controller channels. When the channel is &amp;quot;Off&amp;quot; the ball is &amp;quot;Parked&amp;quot;, when the channel is &amp;quot;On&amp;quot; the ball rotates 180 degrees and faces the street, then returns to parked again when the channel is switched &amp;quot;Off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The Rotating mechanism is mounted on a discarded satellite dish mounting arm, locked up good and tight at right angles. The arm is attached to a wooden plate that is &amp;quot;F&amp;quot; cramped to a verandah rafter when on display. This plate has hooks to slip under the iron roof for added support.  The result being the balls are kept out of the weather for protection, and out of sight when not &amp;quot;Performing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another item that may require further explanation is the Renard controller. This is housed in a re-purposed Electric Drill case, with the electronics separated inside plastic sandwich boxes for safety. The controller is a stripboard 32 channel Renard controller, using regular PIC16F688 chips, loaded with Chris Maloney&amp;#039;s Ren Servo software, running at 11500 baud. There are 32 Channels because it was initially intended to have four &amp;quot;Ornaments&amp;quot;. The controller is capable of running from the ESP8266 Pixelstick in the lower lefthand corner of the picture, but I prefer it to be cabled from the end of a 448 Channel controller chain.&lt;br /&gt;
&lt;br /&gt;
The Opto-coupler and buffer box also has 32 channels available, with the buffer/driver chips hidden under the linking cables on the Right hand side of the picture. It was fortuitous that the buffer chips have a tri-state gating pin. I was able to take advantage of this to disable the data to the Ornaments when they were not &amp;quot;Performing&amp;quot;. This was necessary because the Renard chain was outputting pulse width data outside the range of the servos when not &amp;quot;performing&amp;quot;, the effect was that all the servos went to random positions way outside their expected positions. The gating signal was gained by using the projector control signal from a display Renard controller channel, applied through an opto coupler. The gating to &amp;quot;On&amp;quot; occurs 100 milliseconds after the start of the sequence, and &amp;quot;Off&amp;quot; occurs 60 milliseconds before the end of the sequence,&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2858</id>
		<title>Super-sized Animatronic Ball Ornaments</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Super-sized_Animatronic_Ball_Ornaments&amp;diff=2858"/>
		<updated>2020-04-20T05:30:19Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Started putting Wiki entry together&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:* &amp;#039;&amp;#039;&amp;#039;Supersized Animatronic Christmas Ball Ornament - [https://www.youtube.com/watch?v=i6EUMGoU_6s&amp;amp;feature=youtu.be Click HERE] - from Tory Street Lights&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
More below...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is it?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
These are lip-syncing ornaments. The idea for how to put them together is valid for any similar item you want to make.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Where did this idea come from?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Brian &amp;quot;Lightman&amp;quot; Lincoln did this:&lt;br /&gt;
&lt;br /&gt;
[https://player.vimeo.com/video/148903061 Singing Christmas Tree]&lt;br /&gt;
 &lt;br /&gt;
Terry Sutton (Tory Street Lights aka T.D.Sutton) wanted to supersize the idea for his front porch.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Bill of Materials&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Big ball (25 inches)&lt;br /&gt;
PVA/paper&lt;br /&gt;
Cheesecloth&lt;br /&gt;
&lt;br /&gt;
Planting container&lt;br /&gt;
&lt;br /&gt;
Servos of various sizes &lt;br /&gt;
4 servos for the eyes.&lt;br /&gt;
2 servos for the eyebrows&lt;br /&gt;
1 servo for the mouth.&lt;br /&gt;
1 motor and gears for the ornament to turn away from crowd when not performing&lt;br /&gt;
&lt;br /&gt;
brass rod&lt;br /&gt;
foam board&lt;br /&gt;
&lt;br /&gt;
Renard board&lt;br /&gt;
Optocouplers&lt;br /&gt;
Drivers&lt;br /&gt;
&lt;br /&gt;
1000 watt slide projector with template&lt;br /&gt;
&lt;br /&gt;
Chris Maloney&amp;#039;s Audacity&lt;br /&gt;
 &lt;br /&gt;
Many cans of paint.&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay_using_Renard&amp;diff=2391</id>
		<title>Arduino and the mechanical relay using Renard</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay_using_Renard&amp;diff=2391"/>
		<updated>2018-08-04T05:01:56Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Start&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Okay! Maybe you started with generic serial but noticed that most DIY controllers are using the Renard protocol. We have a sketch for that!&lt;br /&gt;
Renard is a version of a serial protocol. What makes it Renard is that it has a built-in sync byte, start addresses, and escaped values for the values used for those things. Bill Porter (madsci1016) wrote a small library that handles the protocol so the base code becomes very easy.&lt;br /&gt;
&lt;br /&gt;
You get the library here: [https://github.com/madsci1016/Arduino-Renard Renard Protocol]&lt;br /&gt;
&lt;br /&gt;
Once you have it downloaded, just load it using Sketch/Include Library/Add .ZIP Library.&lt;br /&gt;
&lt;br /&gt;
Having a library for the bringing in the serial data makes the program really simple. In the loop(), all we do is wait until we have filled the buffer and then we turn on/off lights.&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2390</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2390"/>
		<updated>2018-08-04T03:51:00Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you bought an arduino and then you got one of those cheap relay boards and you decided to try to do blinky flashy with them. First, it is not a great idea but assuming you want to try it, here you go!&lt;br /&gt;
&lt;br /&gt;
== Second, here&amp;#039;s the program code -- comments follow later! ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// *** diychristmas.org free software so long as this line remains in sketch!&lt;br /&gt;
// Basically Vixen &amp;quot;generic&amp;quot; serial mechanical relay sketch&lt;br /&gt;
//  - Setup a generic serial controller to use this sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen information&lt;br /&gt;
// speed for the com port for talking with player&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in sequencer)&lt;br /&gt;
&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(CONTROLLER_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
const int CHANNEL_COUNT = sizeof(channels) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(SERIAL_COM_SPEED);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForControllerHeader(CONTROLLER_HEADER);&lt;br /&gt;
  readSequenceData();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readSequenceData()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForControllerHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the CONTROLLER_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != CONTROLLER_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s talk about the code...&lt;br /&gt;
At the top of the sketch, you will find the definitions of how you are going to use the Arduino with Vixen or any other serial output. These things are self explanatory but for the &amp;quot;I&amp;#039;ve never seen an Arduino or Vixen setup&amp;quot; people, here is another try to explain them.&lt;br /&gt;
&lt;br /&gt;
== Things you might have to change ==&lt;br /&gt;
&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
This line assigns pins from the arduino to specific &amp;quot;channels&amp;quot;. The order of definition is the order the pins will be turned on or off. In your software, you would assign channel one to Shrub1, channel two to Shrub2, etc. This is done in the element to controller mapping in Vixen. You will need to map these through the Arduino pins to the specific relay on your relay board and out to the lights.&lt;br /&gt;
It might look like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Channel&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Relay&lt;br /&gt;
|-&lt;br /&gt;
| Shrub1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In1&lt;br /&gt;
|-&lt;br /&gt;
| Shrub2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In2&lt;br /&gt;
|-&lt;br /&gt;
| Shrub3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In3&lt;br /&gt;
|-&lt;br /&gt;
| Shrub4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In4&lt;br /&gt;
|-&lt;br /&gt;
| Post1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In5&lt;br /&gt;
|-&lt;br /&gt;
| Post2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In6&lt;br /&gt;
|-&lt;br /&gt;
| Post3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In7&lt;br /&gt;
|-&lt;br /&gt;
| Post4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
This sets the communication speed back to the player. This will have to match the controller setup in your player. 115,200 baud is equivalent to 115,200 bps which translates to:&lt;br /&gt;
115,200 / 8 bits of data plus 2 bits of overhead = 11,520 bytes per second&lt;br /&gt;
11,520 bytes / 20 fps (50 ms) = 576 bytes per frame&lt;br /&gt;
&lt;br /&gt;
This is way more than enough for this setup but this becomes more important when we start doing pixels. So, we might as well use the faster speed.&lt;br /&gt;
&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35};&lt;br /&gt;
This is how we find the beginning of a packet. This is also set in the controller setup in the player. The player will send these bytes before sending the data bytes. We define them in integer so consult an ASCII chart to find the appropriate values. Using three values and using values that are one digit apart will make it hard to accidentally send these values. The reason we do this is because the communication stream could be interrupted and this will re-sync the stream. This also means that if something is wrong with your lights, you can fix it, turn the power back on and it will find which lights to turn on in order.&lt;br /&gt;
  &lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
Most mechanical relays turn on when we send off (LOW or x&amp;#039;00&amp;#039;). If your relays are off when they should be on (and on when they should be off), then you will need to flip the LOW and HIGH.&lt;br /&gt;
&lt;br /&gt;
Everything else in this sketch should just work with generic serial controller. As of June, 2018, this limits you to Vixen 2 or Vixen 3. If you need a Renard sketch, see [[Arduino and the mechanical relay using Renard]].&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2387</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2387"/>
		<updated>2018-07-02T03:15:00Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you bought an arduino and then you got one of those cheap relay boards and you decided to try to do blinky flashy with them. First, it is not a great idea but assuming you want to try it, here you go!&lt;br /&gt;
&lt;br /&gt;
== Second, here&amp;#039;s the program code -- comments follow later! ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// *** diychristmas.org free software so long as this line remains in sketch!&lt;br /&gt;
// Basically Vixen &amp;quot;generic&amp;quot; serial mechanical relay sketch&lt;br /&gt;
//  - Setup a generic serial controller to use this sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen information&lt;br /&gt;
// speed for the com port for talking with player&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in sequencer)&lt;br /&gt;
&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(CONTROLLER_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
const int CHANNEL_COUNT = sizeof(channels) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(SERIAL_COM_SPEED);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForControllerHeader(CONTROLLER_HEADER);&lt;br /&gt;
  readSequenceData();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readSequenceData()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForControllerHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the CONTROLLER_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != CONTROLLER_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s talk about the code...&lt;br /&gt;
At the top of the sketch, you will find the definitions of how you are going to use the Arduino with Vixen or any other serial output. These things are self explanatory but for the &amp;quot;I&amp;#039;ve never seen an Arduino or Vixen setup&amp;quot; people, here is another try to explain them.&lt;br /&gt;
&lt;br /&gt;
== Things you might have to change ==&lt;br /&gt;
&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
This line assigns pins from the arduino to specific &amp;quot;channels&amp;quot;. The order of definition is the order the pins will be turned on or off. In your software, you would assign channel one to Shrub1, channel two to Shrub2, etc. This is done in the element to controller mapping in Vixen. You will need to map these through the Arduino pins to the specific relay on your relay board and out to the lights.&lt;br /&gt;
It might look like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Channel&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Relay&lt;br /&gt;
|-&lt;br /&gt;
| Shrub1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In1&lt;br /&gt;
|-&lt;br /&gt;
| Shrub2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In2&lt;br /&gt;
|-&lt;br /&gt;
| Shrub3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In3&lt;br /&gt;
|-&lt;br /&gt;
| Shrub4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In4&lt;br /&gt;
|-&lt;br /&gt;
| Post1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In5&lt;br /&gt;
|-&lt;br /&gt;
| Post2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In6&lt;br /&gt;
|-&lt;br /&gt;
| Post3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In7&lt;br /&gt;
|-&lt;br /&gt;
| Post4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
This set the communication speed back to the player. This will have to match the controller setup in your player. 115,200 baud is equivalent to 115,200 bps which translates to:&lt;br /&gt;
115,200 / 8 bits of data plus 2 bits of overhead = 11,520 bytes per second&lt;br /&gt;
11,520 bytes / 20 fps (50 ms) = 576 bytes per frame&lt;br /&gt;
&lt;br /&gt;
This is way more than enough for this setup but this becomes more important when we start doing pixels. So, we might as well use the faster speed.&lt;br /&gt;
&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35};&lt;br /&gt;
This is how we find the beginning of a packet. This is also set in the controller setup in the player. The player will send these bytes before sending the data bytes. We define them in integer so consult an ASCII chart to find the appropriate values. Using three values and using values that are one digit apart will make it hard to accidentally send these values. The reason we do this is because the communication stream could be interrupted and this will re-sync the stream. This also means that if something is wrong with your lights, you can fix it, turn the power back on and it will find which lights to turn on in order.&lt;br /&gt;
  &lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
Most mechanical relays turn on when we send off (LOW or x&amp;#039;00&amp;#039;). If your relays are off when they should be on (and on when they should be off), then you will need to flip the LOW and HIGH.&lt;br /&gt;
&lt;br /&gt;
Everything else in this sketch should just work with generic serial controller. As of June, 2018, this limits you to Vixen 2 or Vixen 3. If you need a Renard sketch, see [[Arduino and the mechanical relay using Renard]].&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2386</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2386"/>
		<updated>2018-07-02T03:14:03Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you bought an arduino and then you got one of those cheap relay boards and you decided to try to do blinky flashy with them. First, it is not a great idea but assuming you want to try it, here you go!&lt;br /&gt;
&lt;br /&gt;
== First, here&amp;#039;s the program code -- comments follow later! ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// *** diychristmas.org free software so long as this line remains in sketch!&lt;br /&gt;
// Basically Vixen &amp;quot;generic&amp;quot; serial mechanical relay sketch&lt;br /&gt;
//  - Setup a generic serial controller to use this sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen information&lt;br /&gt;
// speed for the com port for talking with player&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in sequencer)&lt;br /&gt;
&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(CONTROLLER_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
const int CHANNEL_COUNT = sizeof(channels) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(SERIAL_COM_SPEED);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForControllerHeader(CONTROLLER_HEADER);&lt;br /&gt;
  readSequenceData();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readSequenceData()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForControllerHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the CONTROLLER_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != CONTROLLER_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s talk about the code...&lt;br /&gt;
At the top of the sketch, you will find the definitions of how you are going to use the Arduino with Vixen or any other serial output. These things are self explanatory but for the &amp;quot;I&amp;#039;ve never seen an Arduino or Vixen setup&amp;quot; people, here is another try to explain them.&lt;br /&gt;
&lt;br /&gt;
== Things you might have to change ==&lt;br /&gt;
&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
This line assigns pins from the arduino to specific &amp;quot;channels&amp;quot;. The order of definition is the order the pins will be turned on or off. In your software, you would assign channel one to Shrub1, channel two to Shrub2, etc. This is done in the element to controller mapping in Vixen. You will need to map these through the Arduino pins to the specific relay on your relay board and out to the lights.&lt;br /&gt;
It might look like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Channel&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Relay&lt;br /&gt;
|-&lt;br /&gt;
| Shrub1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In1&lt;br /&gt;
|-&lt;br /&gt;
| Shrub2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In2&lt;br /&gt;
|-&lt;br /&gt;
| Shrub3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In3&lt;br /&gt;
|-&lt;br /&gt;
| Shrub4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In4&lt;br /&gt;
|-&lt;br /&gt;
| Post1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In5&lt;br /&gt;
|-&lt;br /&gt;
| Post2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In6&lt;br /&gt;
|-&lt;br /&gt;
| Post3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In7&lt;br /&gt;
|-&lt;br /&gt;
| Post4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
This set the communication speed back to the player. This will have to match the controller setup in your player. 115,200 baud is equivalent to 115,200 bps which translates to:&lt;br /&gt;
115,200 / 8 bits of data plus 2 bits of overhead = 11,520 bytes per second&lt;br /&gt;
11,520 bytes / 20 fps (50 ms) = 576 bytes per frame&lt;br /&gt;
&lt;br /&gt;
This is way more than enough for this setup but this becomes more important when we start doing pixels. So, we might as well use the faster speed.&lt;br /&gt;
&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35};&lt;br /&gt;
This is how we find the beginning of a packet. This is also set in the controller setup in the player. The player will send these bytes before sending the data bytes. We define them in integer so consult an ASCII chart to find the appropriate values. Using three values and using values that are one digit apart will make it hard to accidentally send these values. The reason we do this is because the communication stream could be interrupted and this will re-sync the stream. This also means that if something is wrong with your lights, you can fix it, turn the power back on and it will find which lights to turn on in order.&lt;br /&gt;
  &lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
Most mechanical relays turn on when we send off (LOW or x&amp;#039;00&amp;#039;). If your relays are off when they should be on (and on when they should be off), then you will need to flip the LOW and HIGH.&lt;br /&gt;
&lt;br /&gt;
Everything else in this sketch should just work with generic serial controller. As of June, 2018, this limits you to Vixen 2 or Vixen 3. If you need a Renard sketch, see [[Arduino and the mechanical relay using Renard]].&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2385</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2385"/>
		<updated>2018-07-02T03:05:04Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Update the things you might want to change&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First, here&amp;#039;s the program code -- comments follow later! ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// *** diychristmas.org free software so long as this line remains in sketch!&lt;br /&gt;
// Basically Vixen &amp;quot;generic&amp;quot; serial mechanical relay sketch&lt;br /&gt;
//  - Setup a generic serial controller to use this sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen information&lt;br /&gt;
// speed for the com port for talking with player&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in sequencer)&lt;br /&gt;
&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(CONTROLLER_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
const int CHANNEL_COUNT = sizeof(channels) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(SERIAL_COM_SPEED);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForControllerHeader(CONTROLLER_HEADER);&lt;br /&gt;
  readSequenceData();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readSequenceData()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForControllerHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the CONTROLLER_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != CONTROLLER_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s talk about the code...&lt;br /&gt;
At the top of the sketch, you will find the definitions of how you are going to use the Arduino with Vixen, xLights or any other serial output. These things are self explanatory but for the &amp;quot;I&amp;#039;ve never seen an Arduino or Vixen setup&amp;quot; people, here is another try to explain them.&lt;br /&gt;
&lt;br /&gt;
== Things you might have to change ==&lt;br /&gt;
&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
This line assigns pins from the arduino to specific &amp;quot;channels&amp;quot;. The order of definition is the order the pins will be turned on or off. In your software, you would assign channel one to Shrub1, channel two to Shrub2, etc. This is done in the element to controller mapping in Vixen or in model definition in xLights. You will need to map these through the Arduino pins to the specific relay on your relay board and out to the lights.&lt;br /&gt;
It might look like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Channel&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Relay&lt;br /&gt;
|-&lt;br /&gt;
| Shrub1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In1&lt;br /&gt;
|-&lt;br /&gt;
| Shrub2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In2&lt;br /&gt;
|-&lt;br /&gt;
| Shrub3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In3&lt;br /&gt;
|-&lt;br /&gt;
| Shrub4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In4&lt;br /&gt;
|-&lt;br /&gt;
| Post1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In5&lt;br /&gt;
|-&lt;br /&gt;
| Post2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In6&lt;br /&gt;
|-&lt;br /&gt;
| Post3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In7&lt;br /&gt;
|-&lt;br /&gt;
| Post4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
This set the communication speed back to the player. This will have to match the controller setup in your player. 115,200 baud is equivalent to 115,200 bps which translates to:&lt;br /&gt;
115,200 / 8 bits of data plus 2 bits of overhead = 11,520 bytes per second&lt;br /&gt;
11,520 bytes / 20 fps (50 ms) = 576 bytes per frame&lt;br /&gt;
&lt;br /&gt;
This is way more than enough for this setup but this becomes more important when we start doing pixels. So, we might as well use the faster speed.&lt;br /&gt;
&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35};&lt;br /&gt;
This is how we find the beginning of a packet. This is also set in the controller setup in the player. The player will send these bytes before sending the data bytes. We define them in integer so consult an ASCII chart to find the appropriate values. Using three values and using values that are one digit apart will make it hard to accidentally send these values. The reason we do this is because the communication stream could be interrupted and this will re-sync the stream. This also means that if something is wrong with your lights, you can fix it, turn the power back on and it will find which lights to turn on in order.&lt;br /&gt;
  &lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
Most mechanical relays turn on when we send off (LOW or x&amp;#039;00&amp;#039;). If your relays are off when they should be on (and on when they should be off), then you will need to flip the LOW and HIGH.&lt;br /&gt;
&lt;br /&gt;
Everything else in this sketch should just work with generic serial controller. As of June, 2018, this limits you to Vixen 2 or Vixen 3. If you need a Renard sketch, see Arduino and the mechanical relay using Renard.&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2384</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2384"/>
		<updated>2018-07-02T00:57:10Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First, here&amp;#039;s the program code -- comments follow later! ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// *** diychristmas.org free software so long as this line remains in sketch!&lt;br /&gt;
// Vixen/xLights &amp;quot;generic&amp;quot; serial mechanical relay sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen/xLights information&lt;br /&gt;
// speed for the com port for talking with player&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in sequencer)&lt;br /&gt;
&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(CONTROLLER_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
const int CHANNEL_COUNT = sizeof(channels) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(SERIAL_COM_SPEED);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForControllerHeader(CONTROLLER_HEADER);&lt;br /&gt;
  readSequenceData();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readSequenceData()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForControllerHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the CONTROLLER_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != CONTROLLER_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s talk about the code...&lt;br /&gt;
At the top of the sketch, you will find the definitions of how you are going to use the Arduino with Vixen, xLights or any other serial output. These things are self explanatory but for the &amp;quot;I&amp;#039;ve never seen an Arduino or Vixen setup&amp;quot; people, here is another try to explain them.&lt;br /&gt;
&lt;br /&gt;
== Things you might have to change ==&lt;br /&gt;
&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
This line assigns pins from the arduino to specific &amp;quot;channels&amp;quot;. The order of definition is the order the pins will be turned on or off. In your software, you would assign channel one to Shrub1, channel two to Shrub2, etc. This is done in the element to controller mapping in Vixen or in model definition in xLights. You will need to map these through the Arduino pins to the specific relay on your relay board and out to the lights.&lt;br /&gt;
It might look like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Channel&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Relay&lt;br /&gt;
|-&lt;br /&gt;
| Shrub1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In1&lt;br /&gt;
|-&lt;br /&gt;
| Shrub2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In2&lt;br /&gt;
|-&lt;br /&gt;
| Shrub3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In3&lt;br /&gt;
|-&lt;br /&gt;
| Shrub4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In4&lt;br /&gt;
|-&lt;br /&gt;
| Post1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In5&lt;br /&gt;
|-&lt;br /&gt;
| Post2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In6&lt;br /&gt;
|-&lt;br /&gt;
| Post3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In7&lt;br /&gt;
|-&lt;br /&gt;
| Post4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35};&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2383</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2383"/>
		<updated>2018-07-02T00:54:53Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First, here&amp;#039;s the program code -- comments follow later! ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// *** diychristmas.org free software so long as this line remains in sketch!&lt;br /&gt;
// Vixen/xLights &amp;quot;generic&amp;quot; serial mechanical relay sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen/xLights information&lt;br /&gt;
// speed for the com port for talking with player&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int CONTROLLER_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in sequencer)&lt;br /&gt;
&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(CONTROLLER_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
const int CHANNEL_COUNT = sizeof(channels) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(SERIAL_COM_SPEED);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForControllerHeader(CONTROLLER_HEADER);&lt;br /&gt;
  readSequenceData();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readSequenceData()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForControllerHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the CONTROLLER_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != CONTROLLER_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s talk about the code...&lt;br /&gt;
At the top of the sketch, you will find the definitions of how you are going to use the Arduino with Vixen, xLights or any other serial output. These things are self explanatory but for the &amp;quot;I&amp;#039;ve never seen an Arduino or Vixen setup&amp;quot; people, here is another try to explain them.&lt;br /&gt;
&lt;br /&gt;
== Things you might have to change ==&lt;br /&gt;
&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
This line assigns pins from the arduino to specific &amp;quot;channels&amp;quot;. The order of definition is the order the pins will be turned on or off. In your software, you would assign channel one to Shrub1, channel two to Shrub2, etc. This is done in the element to controller mapping in Vixen or in model definition in xLights. You will need to map these through the Arduino pins to the specific relay on your relay board and out to the lights.&lt;br /&gt;
It might look like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Channel&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Relay&lt;br /&gt;
|-&lt;br /&gt;
| Shrub1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In1&lt;br /&gt;
|-&lt;br /&gt;
| Shrub2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In2&lt;br /&gt;
|-&lt;br /&gt;
| Shrub3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In3&lt;br /&gt;
|-&lt;br /&gt;
| Shrub4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In4&lt;br /&gt;
|-&lt;br /&gt;
| Post1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In5&lt;br /&gt;
|-&lt;br /&gt;
| Post2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In6&lt;br /&gt;
|-&lt;br /&gt;
| Post3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In7&lt;br /&gt;
|-&lt;br /&gt;
| Post4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const int CHANNEL_COUNT = 8;&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
const int VIXEN_HEADER[3] = {33, 34, 35};&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2381</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2381"/>
		<updated>2018-06-23T05:12:25Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: /* Things you might have to change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// *** diychristmas.org free software so long as this line remains in sketch! &lt;br /&gt;
// Vixen/xLights &amp;quot;generic&amp;quot; serial mechanical relay sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen information&lt;br /&gt;
//  - CHANNEL_COUNT is number of channels it will listen for from Vixen&lt;br /&gt;
const int CHANNEL_COUNT = 8;&lt;br /&gt;
// speed for the com port for talking with vixen&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int VIXEN_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in Vixen sequence)&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(VIXEN_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(SERIAL_COM_SPEED);&lt;br /&gt;
  Serial.write(&amp;quot;Setup&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForVixenHeader(VIXEN_HEADER);&lt;br /&gt;
  readFromVixen();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readFromVixen()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForVixenHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the VIXEN_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != VIXEN_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s talk about the code...&lt;br /&gt;
At the top of the sketch, you will find the definitions of how you are going to use the Arduino with Vixen, xLights or any other serial output. These things are self explanatory but for the &amp;quot;I&amp;#039;ve never seen an Arduino or Vixen setup&amp;quot; people, here is another try to explain them.&lt;br /&gt;
&lt;br /&gt;
== Things you might have to change ==&lt;br /&gt;
&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
This line assigns pins from the arduino to specific &amp;quot;channels&amp;quot;. The order of definition is the order the pins will be turned on or off. In your software, you would assign channel one to Shrub1, channel two to Shrub2, etc. This is done in the element to controller mapping in Vixen or in model definition in xLights. You will need to map these through the Arduino pins to the specific relay on your relay board and out to the lights.&lt;br /&gt;
It might look like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Channel&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Relay&lt;br /&gt;
|-&lt;br /&gt;
| Shrub1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In1&lt;br /&gt;
|-&lt;br /&gt;
| Shrub2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In2&lt;br /&gt;
|-&lt;br /&gt;
| Shrub3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In3&lt;br /&gt;
|-&lt;br /&gt;
| Shrub4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In4&lt;br /&gt;
|-&lt;br /&gt;
| Post1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In5&lt;br /&gt;
|-&lt;br /&gt;
| Post2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In6&lt;br /&gt;
|-&lt;br /&gt;
| Post3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In7&lt;br /&gt;
|-&lt;br /&gt;
| Post4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const int CHANNEL_COUNT = 8;&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
const int VIXEN_HEADER[3] = {33, 34, 35};&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2380</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2380"/>
		<updated>2018-06-23T05:08:31Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Started explaining the code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// *** diychristmas.org free software so long as this line remains in sketch! &lt;br /&gt;
// Vixen/xLights &amp;quot;generic&amp;quot; serial mechanical relay sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen information&lt;br /&gt;
//  - CHANNEL_COUNT is number of channels it will listen for from Vixen&lt;br /&gt;
const int CHANNEL_COUNT = 8;&lt;br /&gt;
// speed for the com port for talking with vixen&lt;br /&gt;
const long SERIAL_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int VIXEN_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in Vixen sequence)&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(VIXEN_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(SERIAL_COM_SPEED);&lt;br /&gt;
  Serial.write(&amp;quot;Setup&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForVixenHeader(VIXEN_HEADER);&lt;br /&gt;
  readFromVixen();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readFromVixen()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForVixenHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the VIXEN_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != VIXEN_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s talk about the code...&lt;br /&gt;
At the top of the sketch, you will find the definitions of how you are going to use the Arduino with Vixen, xLights or any other serial output. These things are self explanatory but for the &amp;quot;I&amp;#039;ve never seen an Arduino or Vixen setup&amp;quot; people, here is another try to explain them.&lt;br /&gt;
&lt;br /&gt;
== Things you might have to change ==&lt;br /&gt;
&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
This line assigns pins from the arduino to specific &amp;quot;channels&amp;quot; in order. In your software, you would assign channel one to Shrub1, channel two to Shrub2, etc. You will need to map these through the Arduino pins to the specific relay on your relay board and out to the lights.&lt;br /&gt;
It might look like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Channel&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Relay&lt;br /&gt;
|-&lt;br /&gt;
| Shrub1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 1&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In1&lt;br /&gt;
|-&lt;br /&gt;
| Shrub2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In2&lt;br /&gt;
|-&lt;br /&gt;
| Shrub3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In3&lt;br /&gt;
|-&lt;br /&gt;
| Shrub4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 4&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In4&lt;br /&gt;
|-&lt;br /&gt;
| Post1Left&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 5&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In5&lt;br /&gt;
|-&lt;br /&gt;
| Post2&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 6&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In6&lt;br /&gt;
|-&lt;br /&gt;
| Post3&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 7&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In7&lt;br /&gt;
|-&lt;br /&gt;
| Post4Right&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 8&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | 10&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot; | In8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const int CHANNEL_COUNT = 8;&lt;br /&gt;
const long VIXEN_COM_SPEED = 115200L;&lt;br /&gt;
const int VIXEN_HEADER[3] = {33, 34, 35};&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2379</id>
		<title>Arduino and the mechanical relay</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino_and_the_mechanical_relay&amp;diff=2379"/>
		<updated>2018-06-22T03:51:57Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Add code to page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// Vixen/xLights generic serial mechanical relay sketch&lt;br /&gt;
//  - Uses digitalWrite as this outputs LOW or HIGH no pwm values&lt;br /&gt;
//  - This is what is needed for a mechanical relay&lt;br /&gt;
&lt;br /&gt;
// Hookup the relay in order of channel definition&lt;br /&gt;
// Define as many as you need&lt;br /&gt;
// put channels (pins) in an array so we can use looping structures to control&lt;br /&gt;
int channels[] = {2, 3, 4, 5, 6, 7, 8, 10};&lt;br /&gt;
&lt;br /&gt;
// Vixen information&lt;br /&gt;
//  - CHANNEL_COUNT is number of channels it will listen for from Vixen&lt;br /&gt;
const int CHANNEL_COUNT = 8;&lt;br /&gt;
// speed for the com port for talking with vixen&lt;br /&gt;
const long VIXEN_COM_SPEED = 115200L;&lt;br /&gt;
// Generic Serial controller config - must be present, must match controller setup&lt;br /&gt;
const int VIXEN_HEADER[3] = {33, 34, 35}; // This is character !&amp;quot;# (hard to replicate in Vixen sequence)&lt;br /&gt;
// Relays&lt;br /&gt;
//  - most mechanical relays turn on when pin is low, off on high&lt;br /&gt;
const int ON  = LOW;&lt;br /&gt;
const int OFF = HIGH;&lt;br /&gt;
&lt;br /&gt;
// these are program variables we need to use in multiple places&lt;br /&gt;
const int SIZE_OF_HEADER = sizeof(VIXEN_HEADER) / sizeof(int); // no need to change&lt;br /&gt;
int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(VIXEN_COM_SPEED);&lt;br /&gt;
  Serial.write(&amp;quot;Setup&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // set the channel pins to output mode&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    pinMode(channels[channelIndex], OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
  powerOnSelfTest(); // watch your lights to make sure they are all going on in order&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  waitForVixenHeader(VIXEN_HEADER);&lt;br /&gt;
  readFromVixen();&lt;br /&gt;
  outputToLights();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void turnLightsOff()&lt;br /&gt;
{&lt;br /&gt;
  //turn them all off&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void outputToLights()&lt;br /&gt;
{&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    // we should only be seeing 255 and 0 but in case someone tried a fade&lt;br /&gt;
    // 48 is used for debug purposes. You can use the serial monitor to test&lt;br /&gt;
    // send this string !&amp;quot;#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49)&lt;br /&gt;
    if (buffer[channelIndex] &amp;gt; 48) {&lt;br /&gt;
      digitalWrite(channels[channelIndex], ON);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void readFromVixen()&lt;br /&gt;
{&lt;br /&gt;
  char buffer2[CHANNEL_COUNT];&lt;br /&gt;
  int index = 0;&lt;br /&gt;
&lt;br /&gt;
  while (Serial.available() &amp;lt; CHANNEL_COUNT) {}&lt;br /&gt;
  // We have enough data!&lt;br /&gt;
  for (int i = 0; i &amp;lt; CHANNEL_COUNT; i++) {&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    buffer[i] = inByte;&lt;br /&gt;
    Serial.write(inByte);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void waitForVixenHeader(int header[])&lt;br /&gt;
{&lt;br /&gt;
  for (int i = 0; i &amp;lt; SIZE_OF_HEADER; i++) {&lt;br /&gt;
    // wait for serial available&lt;br /&gt;
    while (!Serial.available()) {}&lt;br /&gt;
    // Check the byte until it matches the VIXEN_HEADER byte&lt;br /&gt;
    int inByte = Serial.read();&lt;br /&gt;
    if (inByte != VIXEN_HEADER[i]) {&lt;br /&gt;
      i = -1; // wrong data set to &amp;quot;zero&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  // found the header!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// powerOnSelfTest - does a couple of checks to make sure everything turns on and off&lt;br /&gt;
//  - watch your lights, they should go on in order&lt;br /&gt;
void powerOnSelfTest()&lt;br /&gt;
{&lt;br /&gt;
  // This routines turns on and off each relay in order&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // turn on one channel at a time&lt;br /&gt;
    delay(2000);&lt;br /&gt;
    digitalWrite(channels[channelIndex], OFF);&lt;br /&gt;
  }&lt;br /&gt;
  // This routines turns on each relay in order leaving them all on for .5 seconds&lt;br /&gt;
  for (int channelIndex = 0; channelIndex &amp;lt; CHANNEL_COUNT; channelIndex++) {&lt;br /&gt;
    digitalWrite(channels[channelIndex], ON); // all on test&lt;br /&gt;
    delay(500); // wait .5 seconds&lt;br /&gt;
  }&lt;br /&gt;
  delay(2000); // slight pause to check all on&lt;br /&gt;
  turnLightsOff();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
	<entry>
		<id>https://www.diychristmas.org/wiki/index.php?title=Arduino&amp;diff=2378</id>
		<title>Arduino</title>
		<link rel="alternate" type="text/html" href="https://www.diychristmas.org/wiki/index.php?title=Arduino&amp;diff=2378"/>
		<updated>2018-06-22T03:35:37Z</updated>

		<summary type="html">&lt;p&gt;MikeKrebs: Just getting started&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Arduino Table of Contents&lt;br /&gt;
&lt;br /&gt;
* [[Arduino and the mechanical relay]]&lt;br /&gt;
&lt;br /&gt;
* another new page&lt;br /&gt;
&lt;br /&gt;
* yet another new page&lt;/div&gt;</summary>
		<author><name>MikeKrebs</name></author>
	</entry>
</feed>