Fixing the dreaded E02 error on your Bestway, Coleman or Lay-Z-Spa tub

962{icon} {views}


If you have reached this page, you have undoubtedly been looking for a solution for the E02 error that is showing up on your pump/heater unit, AKA the egg, that is preventing you from relaxing in your hot tub right now. In this guide we'll go over the many things that cause this error to appear. We'll then show you what you need to do to fix it. Keep reading and we'll have your tub back up and running in no time.

Getting Prepared

For the procedures you will be doing in this article you will need some basic tools to perform the tasks. A phillips #2 and flat head screwdriver. For some things it may be easiest to have a cordless drill with a screwdiver attachment. A set of small pliers, both standard and needle nose may help for some things. A volt meter that can check continuity may also be needed. You should also have your black caps for your water ports handy as it may be necessary to disconnect the egg when the tub is filled. These prevent water from flowing out when the hoses are disconnected.

In the steps outlined here, there are many causes that can be fixed without the need to replace parts. Some of the solutions listed however will require replacing parts. The order in which we will cover the listed solutions is to cover the basics that don't require part replacements first to rule them out first. This will save you from purchasing parts you don't need and getting your tub back in order the cheapest way possible.

Whenever working on your egg, be sure to unplug the power cord from the mains line when doing any service. Only plug it in when told to do so. This is for your safety and to prevent further damage to your egg.

Part of being prepared is knowing what you are dealing with. So what does the E02 error actually mean. The E02 error simply means that the egg is not sensing proper water flow through the water's path. A number of things can cause this. Let's go through them now. We'll start with the easy ones first. After each one of these procedures, plug in the egg and give it a test run.

First Things First

Let's start with the simple and most obvious things to get them out of the way. If you try to start your water pump with no water in the tub or with the water level below the filter inlets, you will get this error. This only makes sense since the E02 error indicates a problem with water flow. If there is no water there, it cannot flow. As long as the water is above the two filter inlet pipes and at least half way to the outlet pipe, you should be able to get water to flow. It is best though to have the water above the outlet pipe. WIth that out of the way, lets get into the other causes of this error.

Dirty Filters

Believe it or not, your filters being dirty can actually cause this error. A buildup of dirt and other things on the filters can slow the flow of water through the system. If the water slows enough, the water flow sensor paddle will not move enough to trigger the sensor to tell the system that water is in fact moving. One EASY way to tell if this is your issue is to remove the filter housings and start your pump. If it runs and doesn't give you the E02 error, this is your problem. Simply hosing off the dirt and junk from the filters can restore the water flow to a normal level. If the filters are too dirty, they may require replacing.

Clogged Debris FIlter

Another thing that can restrict water flow is a dirt and junk buildup in the debris filter that is on the output side of the pump directly above one of the filter housings. On some models it is the piece that your ChemConnect attaches to. Remove this piece and look inside. If you see a bunch of junk in there, it is probably restricting the water flow enough to cause the error. The easiest way to clen this is to back flush this with your garden hose. In some cases you may need a brush to get it clean. Then re-attach it to the liner.

Dirt Buildup on the Flow Sensor Paddle

Sometimes, depending on conditions, the water flow sensor paddle can get a buildup of dirt and debris on it that will prevent it from moving to the correct position when water is flowing. This paddle is supposed to lift up and trigger a sensor to tell the system that water is moving when the pump is turned on. Start by putting your black stoppers on all of your debris screens inside the tub and disconnect the egg. This requires you to remove both filter housings to put these stoppers on. Look inside the top hose connector and you should see the flow sensor paddle hanging down. If you can see dirt and debris around that you need to clean it. First, flush water through the egg in both directions to help loosen and remove any other debris that may be hanging around inside. To do this , run your hose into the top port on your egg for one to two minutes as seen in the picture. Then switch the hose to the port just below that one and do the same thing from that end. Now look inside the top port again and see if the debris has cleared. Once flushed, re-attach the egg to the tub and re-test. Remember to remove the black stoppers from the ports inside the tub. Forgetting this will DEFINITELY cause an E02 error.

Crushed or Kinked Inlet/Outlet Pipe

A crushed or kinked inlet or outlet pipe can be caused from different things. One reason could be that your liner is low on air. The main reason for this is usually due to a kink in one of the hoses that goes through the liner from the egg because of a sag in the liner. The loss of air will allow the hose to bend which will restrict the water flow. Simply fill your liner with air can straighten the pipes out and if that was the issue you should be good. Other things such as pipes going soft over time can cause this. Another option to solve this would be to get a short piece of rigid pipe to fit inside this pipe to keep it from collapsing. This may be helpful to do to both the top and bottom water pipes.the pipe should fit inside the gray end and be long enough to go through the liner but not come out the other side. This length can be different depending on your tub model.

Limescale Buildup

If you live in an area with hard water you are no stranger to limescale. A limescale buildup on things can cause a number of different issues. If you cleaned out your debris filter in the previous steps and found white flaky bits in it, you most likely have a limescale problem. These bits can get on and into various things and cause problems. The image to the right is a heater unit that is caked with limescale. You can see how this could easily restrict water flow. You may have heard of people talking about descaling their egg. A simple descaler can be seen to the left. The square tube with connectors is attached to the pump inlet and outlet and filled with cold water just a bit above the top tube. You will then need some sort of descaling solution. These can come in powder or liquid form. A common brand is made by a company called Oust and is designed to clean coffee kettles, irons and dishwashers. Some other brands are lime-away and CLR. Putting a good bit of this solution in the descaler and turning the pump and heater on for 15 to 30 minutes will break up and disolve the limescale buildup and get you back running quickly. If you are getting the E02 error immediately after turning on the pump, you may want to let this descaling solution sit for about an hour to see if it breaks up a little bit of the lime to get things flowing. Once it is flowing and you can turn the pump on, let it run for the 15 to 30 minutes and you should be set. If you live in an area of hard water you should do this a couple times per year to prevent these problems.

Broken, Stuck or Damaged Impeller or Impeller Shaft

The impeller is the part of the pump that actually makes the water move. The motor spins this and the paddles push the water. There are a number of things that can fail with regards to the impeller, one being the impeller shaft. The impeller shaft in the image to the right is the pin that goes through the center of the impeller with the two small black caps on it. Many of the impellers used in the egg have an impeller shaft that is made of ceramic. These shafts have been known to break on occasion. When this breaks, the impeller will not spin freely and can lead to a decrease or complete stop of the water flow. If the impeller is moving with a broken shaft the egg can be very noisy and making a rattling sound.

Another thing with the impeller can be a rusty or damaged magnet. To the left is an example of a rusty impeller magnet. When a magnet gets rusty, it gets weaker. When the magnet gets weaker it cannot spin as efficiently, or at all. In this case you will need to replace the impeller. Some of these have the magnet encased in plastic like the one to the left, and some have the magnet exposed like the one shown above. Replacemtns can be found on ebay, amazon and other online stores such as Some of these kits will also include the rubber o-ring seals. If you are taking your pump apart, why not replace them. An ounce of prevention is worth a pound of cure.

Damaged Water Flow Sensor

These pumps are equiped with a water flow sensor to tell the pump that water is actually moving through the system. The water flow sensor is a tube that has a small paddle that contains a small magnet that hangs in the water's path, and when water flows through the tube, the paddle is pushed upwards causing the magnet to trigger a magnetic switch. When the switch is triggered, it indicates that water is flowing. The way the system works with this sensor can trigger not only the E02 error, but it can also trigger an E01 error.

We'll start with the E01 error. When the pump is turned on, it immediately checks this sensor for a split second looking to see that it is not triggered before turning on the pump. If the system sees that the flow sensor is triggered immediately upon startup, it assumes that the paddle is stuck in the up position. With the paddle stuck in the up position, the system assumes that it cannot accurately detect water flow and will display an E01 error. If this is the case, sometimes a quick smack, not too hard, to the side of the pump will get the paddle to drop into the normal position. Another thing that can cause this is debris being stuck in the sensor, but if you did the flush in the earlier steps, this should not be an issue.

Now back to the original E02 issue. There are a few things that can cause the sensor to not trigger the magnetic switch. One of the main causes of this is broken plastic around the magnet that causes the magnet to get wet and rust. As a magnet gets rusty, it gets weaker and if it gets weak enough, it can't trigger the sensor mounted at the top. If this is the case, the paddle will need to be replaced. You will need to remove the cover to access the sensor. Start by putting your black stoppers on the inlet and outlet ports on the inside of the tub and disconnect the pump from the tub. Once disconnected, remove the screws on the lip about half way up the pump. Slowly lift the cover off, but watch for the ribbon cable that is attached. You may be able to just set the lid aside with the ribbon cable attached. If you need to disconnect it for any reason, grab the black connector on the sides and squeeze it, then pull the connector apart. Once the lid is off, look just behind the top outlet pipe and you will see the water flow sensor. Remove the four screws on the top of the sensor and lift the top off being careful of the sensor wire that is connected to it and the rubber o-ring seal under the lid. There will be a pin through the side that holds the paddle in place. Push that pin from the side being careful not to break it, and pull it out. Install the new paddle and replace the pin. Move the paddle back and forth to ensure that it moves freely. Now inspect the o-ring seal to see if it is damaged or looks worn. If so, it is best to replace it. I sell kits that come with the paddle and seal in one package. I also sell just the paddle separately. Click here to see my store for both. Once you have the paddle replaced and the o-ring inspected/replaced, re-assemble the flow sensor being careful not to knock the o-ring out of place and screw it back together. DO NOT overtighten the screws as you may damage the housing which will cause the seal to be weak and leak over time. Replace the cover being sure to connect the ribbon cable if you had it disconnected. Then re-connect the pump to your tub and give it a test. You should be back running.


By following these steps you should have been able to resolve any issue that would cause an E02 error. I hope thisarticle helped you and got you back to tubbing again. If you find any errors or just have questions, you can contact me here. Happy tubbing to all.

Bestway, Coleman, Lay-Z-Spa and Mspa LED lighting

1.2k{icon} {views}


hot tub LED lightingDo you own a Bestway, Coleman, Lay-Z-Spa or Mspa brand inflatable hot tub? Have you seen hot tubs lit at night with colored LED lighting and wondered how you can get that effect with your tub. In this article I will go over options for adding color changing LED lights to just about any one of these brands and models of airjet and hydrojet inflatable hot tubs. Get the night time glow and ambiance that you see in some of the more expensive hot tubs, from your cheaper model tub.

Lighting options and limitations

The hot tubs manufactured by Bestway which include the Coleman and Lay-Z-Spa line of tubs are some of the easiest tubs to add lighting to. The Mspa line of tubs have some limitations as far as the scope of this article, but I will discuss how to tell if your tub can handle one of the options I have. I will go through two different lighting options and show how they fit to the different tub models.

Intex LED lightThe first option I will touch on actually uses a light manufactured by Intex for their purespa line of tubs. This light uses a threaded fitting that it screws onto for the Intex tubs. Because of this, an adapter is needed to fit this to another brand of hot tub. There are three adapter options that can fit this light to a good number of the Bestway and Mspa brand tubs, but not all of the models will support this. This light can be purchased on Amazon by clicking here.

The first adapter for this light will work with any of the Bestway, Coleman or Lay-Z-Spa tubs that use the ChemConnect chlorine dispenser. The ChemConnect is a simple push with a 1/4 twist to secure it to the tub. The adapter for this light uses the same push and twist fit that the ChemConnect has as seen in the picture to the right. This makes installing the light and swapping between that and the ChemConnect easy. You can purchase this adapter by clicking here.

The second adapter for this light works for any of the Bestway tubs that do not use the ChemConnect dispenser but have a removable water outlet debris filter as indicated in the picture to the left. The adapter screws on to the intex light and then threads on to the tub in place of the debris filter. You can purchase this adapter by clicking here.

The last adapter for this light, seen to the right, is designed for some of the Mspa branded tubs. This adapter is much like the last adapter for the Bestway tubs in that it replaces the water outlet debris filter. If your Mspa brand tub does not have a removable debris filter, unfortunately this adapter will not work and I have no other recommended options to allow a light to be fitted to this brand of tubs. You can purchase this adapter by clicking here.

The next lighting option will only work for Bestway, Coleman or Lay-Z-Spa brands of tubs. It uses a small remote controlled puck style light with an adapter that will fit the light to the front of the filter housing. The filter housing lock screw is removed and the light is threaded in it's place and acts as to hold the filter together. Because of the way this mounts, this will fit nearly all of the Bestway, Coleman and Lay-Z-Spa brands of tubs giving options to those that don't have a tub with a ChemConnect or a removable debris filter. You can purchase this light set by clicking here.

Next we have the Lay-Z-Spa light manufactured by Bestway, seen to the left. This light is much like the Intex light seen above with the second adapter mentioned in that it replaces the upper debris filter. It is simple to mount, but on some Bestway tubs, the water output debris filter is non-removable, in which case this light will not work. You can purchase this light from Amazon by clicking here.

The last lighting option I will list will not be specific to a certain light, but more a category of lights. I like to call these sinkers and floaters. These are just as the name implies. Lights that sink to the bottom of the tub, and ones that float on top of the water. These types of lights will obviously work in any tub situation regardles of brand and model. I mentioned these last because they are the least attractive type of lighting. Various options for these can be found on Amazon, Ebay and other sites and stores.

The comparisons

Obviously some of the tubs may only have one option that will work, in which case there is not much of a need for a comparison. Some tubs however may have several options that will work, so here we'll do some comparisons on the models showing pros and cons to each to help you make an informed decision when choosing your lighting option for your tub.

Option Pros Cons
Intex Purespa LED light
  1. Long battery life
  2. Mounting adapters for several brands and models
  3. Buttons on the device for control
  4. No remote to loose or damage
  5. 2 hour auto shut off to save batteries
  6. fits more than just the Bestway branded tubs
  1. Does not adapt to all tub models
Puck style filter mount light
  1. Easy to mount
  2. 2 lights can be used (one on each filter)
  3. Compact
  1. Batteries are only rated for 10-12 hours of use
  2. Remote sometimes has trouble when light is under water
  3. Light will not work if remote is lost or damaged
Lay-Z-Spa light
  1. Easy to install
  2. 2 hour auto shut off to save batteries
  1. Only fits certain Bestway, Coleman or Lay-Z-Spa models
  2. Disables the ChemConnect on models that have it
Sinkers and Floaters
  1. Fits any brand or model of tub
  2. No special mounting needed
  3. Some are cheap
  1. Get in the way when in the tub
  2. Some are bulky


I hope this gave you some insight into different styles of lights and which one you should get for your tub. Now go out and put some flare in your new inflatable hot tub. Give it some color and ambiance for your parties.

Repairing yourBestway, Coleman or Lay-Z-Spa water flow sensor.

2.1k{icon} {views}

What is the water flow sensor.

water flow sensorThe water flow sensor is just as it's name says, it is use to tell a system that water is flowing. Seen to the right is the water flow sensor used in many of the Bestway, Coleman and Lay-Z-Spa branded inflatable hot tub models. These sensors are one way flow sensors meaning that they will only sense water flowing in one direction. Failure of this sensor is one of the causes of the dreaded E01 or E02 errors seen on the pump/heater unit of many of the listed brands of inflatable hot tubs.

How does the flow sensor work?

The operation of the water flow sensor is very simple. reed switchThere are three main components to the sensor. The first part is the main sensor housing. The housing has water inlet and outlet ports for the water to flow through. The second part is the magnetic reed switch, or proximity switch. This part is the small black tubular piece with the two wires coming off of it like the one seen to the right. When this piece senses a magnetic field, a small switch inside makes contact completing the circuit in the two wires. original sensor flapThe third part of the sensor, quite obviously, is the magnet. The magnet is housed in a small plastic paddle like the one seen to the left. When water is pushed through the sensor housing, this magnetic paddle will get pushed up near the proximity switch triggering it telling the system that water is in fact moving. This sensor is a one way sensor meaning that it will only sense the flow of water in one direction. Because of this, care must be taken to install this sensor in the correct direction for proper operation.

The main problem with these sensors.

The biggest problem with these sensors is that the magnetic paddles in them fail. The reason for this is because magnets can easily start to rust if exposed to water. rusty sensor flapWhy do magnets rust? Magnets work because they are made of ferrous metals which contain iron. Magnets need iron to attract, and iron rusts when exposed to oxygen and water. Rust reduces the attraction of a magnet. This is why the sensors fail when the magnet gets rusty. The original sensor paddles have the magnet inset into a hole in the center and then a dab of epoxy glue is put on top. Over time, the dab of epoxy can come loose from the paddle exposing the magnet to the water eventually causing it to rust and fail. The plastic around the magnet will start to crack because of the magnet swelling which allows more water in causing it to snowball into failure.

Inspecting your sensor.

pump/heater unitHow do you find out if your sensor has failed or is starting to fail. The first thing is to unplug your pump from the mains socket. Never work water stopperon your unit with the power plugged in. Now place your black rubber water stopper caps, seen on the left, over the water ports inside your tub. This is to prevent water flowing out of the flow sensor when you take the cap off. Next, remove the cover from your pump/heater unit by removing the six screws in the middle of the unit as indicated in the picture to the right. Once those screws are removed, carefully lift the top off being careful of the ribbon cable. inside pump/heaterNow, separate the black connectors on the ribbon cable slightly down from the control panel inside and set the cover to the side. In the picture to the left, the arrow points to the water flow sensor. Start by disconnecting the small plug on the two wires attached to the top of the sensor. Now remove the four screws from the top of the sensor and set them aside. cover with flapCarefully lift the top of the sensor off being careful not to loose the round o-ring seal under the cap. Inspect the plastic paddle under the cap looking for signs of cracks in the plastic, and signs of rust like the one shown to the right. If you see any of these things or other damage to the paddle, it is best to replace it. While you have the top off, you should also inspect the o-ring for any signs of wear. If there is even the slightest bit of wear on the o-ring, it is best to just replace it. Some would have you replace the entire water flow sensor assembly which can cost you between $50 and $75 US dollars just for the part. On top of that you would have to dismantle the unit even further to be able to remove the old one and install the new one. Why replace the whole sensor when you can just repair it.

Testing the sensor

To test the water flow sensor you will need a multimeter set to the continuity setting that will indicate an open or short condition. If your multimeter does not have a continuity setting you can put it on a resistance setting to show either infinite resistance or zero ohms (or near zero). You will also need two small pieces of stiff wire like in the picture to the right. The wires will be used to connect to the sensor to do the tests. Start by wrapping the small wires around the tip of the test probes and inserting them in the two holes in the connector. You will feel a bit of resistance when pushing the wires in, but they should be inserted enough to make a good connection with the connectors inside. Once connected, the water flow sensor should show an open or infinite resistance when the paddle is hanging down and a short or zero ohms when the paddle is in the upward position resting on the cover plate. If you don't read a shorted condition when the paddle is in the up position, you most likely have a problem with the paddle magnet. The sensor that senses the magnetic paddle is the black tube looking part that the wires connect to. It is extremely rare that that part will fail. If you have another small neodimium rare earth magnet (refrigerator magnets may not be strong enough) you can place it near where the paddle will hit the cover and see if the sensor triggers. If it does, then your paddle needs to be replaced. I sell both the replacement paddles as well as kits that include the paddle and the o-ring seal for the top of the sensor housing. Both the paddle and the kit version come with a replacement nylon pin to attach the paddle as many times these get broken. You can get both at my web store by clicking here. On the extremely rare chance that the sensor ( black tube) is bad, you may need to contact Bestway or purcase a new water flow sensor, but as mentioned, it is extremely rare that this part goes bad.

Repairing the sensor.

To repair the flow sensor you should by now know what parts you will need for the repair from the inspection you just did above. Whether you nee just the paddle, or the paddle and o-ring, we have you covered. If all you need is the water flow sensor paddle, this can be purchased from our store as a kit that now includes the retaining pin for $10.49 plus shipping by clicking here. If you also need the o-ring, we sell a kt that contains the paddle, retaining pin and the o-ring. These kits can be purchased from our store for $11.49 plus shipping by clicking here. If you decide that you want to go to someon else to purchase the paddle, there are some things that you need to watch out for. Be weary of the ones like the one on the right. In this style, the magnet is mounted directly on the top, completely exposed to the water. Because of this, the magnet will start to rust and fail significantly quicker than the ones that I sell in which the magnet is completely sealed in plasic. The other thing with paddles like this one is that people make these out of PLA plastic. This type of plastic has a lower melting point and if exposed to too much heat, it will start to deform. Once the plastic deforms, the magnet can pop out of it's hole causing another failure. Our paddles, seen on the left, are made completely from ABS plastic which is more flexible and has a lot higher melting point making it less prone to deforming and failure. Also the magnets on our sensors are completely encapsulated in plastic with little to no chance of the magnet touching water and rusting. Buy our parts with confidence.

Now on to replacing the sensor paddle. These sensors use a small nylon retaining pin to secure the paddle to the sensor cap. This can easily be removed by pushing on the back side of the pin, the side with the slot in it, with something flat. The pin should come out pretty easy. Simply pull the pin out enough to allow you to get the old paddle off. Put the new paddle in place and push the pin back through the hole. Our kits now include the retaining pin. It's that simple. Once you have that done, if needed, remove the old o-ring and drop the new one in it's place. Be sure to inspect and clean the channel that the o-ring sits in prior to installing the new one.


So that's it, you just repaired your water flow sensor for under $16 US dollars rather than spending $50 plus and all the extra time and effort

Anti-Spam by CleanTalk review

54{icon} {views}

Let me start by saying that this is my own personal opinion/review of this product.  I have to say that in the short trial period that I used the Anti-Spam by CleanTalk plugin for my WordPress website I have been very pleased.  I used to have to wade through 30 or more spam comments per day to decide if they were real or not and send them to my spam folder.  In the seven days that I have used it, it blocked 288 submissions from my website.  I did get a small handful (less than 5) in the seven days that I used it, but as I marked them as spam, the plugin added them to their list which as I understand it, increases the power for others.  

I fully recommend this product.  At $8 per year for one website for the service compared to the time that it saves is WELL worth the money.  That is less than a dollar a month.  If you run multiple websites, the price gets cheaper per site the more you have.  For me to give up one diet pepsi per month for this kind of protection, I can handle that.  

Visit for more details.  You can get a 7 day no obligation free trial to see for yourself.  You do not have to enter any credit card information to sign up for the trial, so what are you waiting for.

Temperature-humidity sensor

Temperature & Humidity
154{icon} {views}


This post will outline how I built some temperature-humidity sensors for my home automation setup to use in a couple rooms in my house.  I'll explain some of the options I tried before coming to my final design.  I will also give you links to where you can purchase the parts and to download the 3D printer files for the enclosure.


This originally started from an idea I had for my home automation setup to put a temperature and humidity sensor in my main bathroom.  The main reason for this was to help a small problem with occasional small mold spots on my ceiling.  This was most likely due to humidity in the bathroom.  When someone would take a shower, they would turn on the vent fan before showering, and then off shortly after.  The problem is that when the vent fan is shut off, there still may be excess humidity in the room that could eventually cause the mold.

The idea was that I could have a controller on the vent fan for the bathroom that would turn on when the humidity reached a certain level, and then would also turn off when below another level.  The two levels would factor in some hysteresis to the equation to prevent the fan from continually starting and stopping when the humidity is near a certain level.   By doing this, the humidity in the room would be dropped to a safe level before shutting off, thus preventing the mold problem.

The temperature-humidity sensor design ideas

So I needed to figure out everything I would need for the project.  My primary home automation setup revolves around MySensors nodes.  Those nodes talk to my Vera Plus automation controller.  I decided to make the temperature and humidity sensor a MySensors node.  The exhaust fan control, which I have yet to do, will be controlled by a converted Sonoff module.  For this article i'll focus on the Temperature and humidity sensor. 

Below is a list of the things I needed to create the sensor.  The basic list was simple

  • A circuit board for the project.  
  • A micro-controller to control the sensor.
  • A temperature and humidity sensor.
  • Some kind of power source.
  • An enclosure to mount the sensor to the wall.

On to building the prototype

Easy/Newbie PCBFor the circuit board, I had a number of the MySensors Easy/Newbie circuit boards, so I thought that would be a good choice.  For that board I needed an Arduino Pro Mini, and an nRf24L01+ radio.  

Now I needed to choose a temperature-humidity sensor.  I had both some DHT11 and some DHT22 sensors.  The DHT22 is a higher resolution sensor, so I originally decided to try that one.  Through some testing with the DHT22 sensor I found that the power consumption was too high.  HDC1080 thumbnailI did some looking and found the HDC1080 sensor.  This sensor connects to the I2C bus and uses very low power.  It's low power consumption made it ideal for use on a battery operated node.   By removing the regulator and power LED from the Pro Mini I was able to run this sensor for a week with no significant power drain on a set of 2 - AA batteries.

The last piece of the puzzle was an enclosure.  The enclosure had to be vented since I was measuring temperature and humidity.  It also needed to be able to hold a battery  or set of batteries.  I figured that I should find the battery box first, and then design the sensor enclosure around that and the PCB.  I settled on this one.

The enclosure design

I have dealt with temperature sensor enclosures before, so I had some ideas on what the enclosure should look like.  temperature-humidity wall boxI turned to OpenSCAD and came up with a basic design.  The box was vented, it had mounting tabs for the PCB and a place to hold the battery box.  temperature-humidity wall plateI decided to make it easy to remove from the wall if needed and made the wall plate with two tabs that the cover could lock on to. 

Since the creation of the first prototype wall box, I have done a couple revisions to the design.  This is what the final design looks like.temperature-humidity wall box V3
Version 3 of the wall box is highly configurable and can be adapted to other configurations if needed.  All versions of the wall box can be found on my thingiverse page

Related Images:

RS485 communication techniques

448{icon} {views}


RS485 is a physical layer communication standard typically used in automation systems as a way for sensors and other devices to communicate to a central automation computer.  It is also used in computer system peripherals for data communication between devices.  A couple examples of this are the Small Computer Systems Interface, or SCSI-2 and SCSI-3 interfaces for hard disk drives.  Different systems use different protocols as their defined standards outlining the "language" they will use to communicate to each other.   In this short article I will discuss data communication using an RS485 serial bus and the best practices for an error free signal.

What is RS485?

RS485 has sometimes been referred to as a protocol, which it is not.   It is simply a communications interface wiring standard.  Unlike RS232 serial which is used for point to point serial communications, RS485 is a standard used for multi-point serial communications.  RS485 communication is typically done at half duplex using two wires  handling both transmit and receive.  Full duplex operation can be achieved using 4 wires depending on signal and speed needs.  Below is a diagram of an RS485 serial bus showing the master node and slave nodes.
RS485 Bus Diagram
As can be seen in the diagram, there is the two data lines, or differential pair, where the master and slaves connect, and at the end of the differential pair is a series of termination resistors.  Because the wires are a differential pair, the termination resistors are used to prevent reflections of the signal from back-feeding on to the line and causing collisions.  An RS485 network should only have termination resistors at the beginning and end of the transmission line.

The communication

Data transmitted on an RS485 bus can be heard by all nodes connected to that bus.  Because of this, a protocol is used to determine how that communication is managed.   The protocol must define a system for how data is transmitted, how a node knows that the data is meant for that node and how that node responds to the data it receives.  There have been a number of different protocol standards used in RS485 communication, with one of the most notable standards being the Modbus protocol.

RS485 interface types

RS485 USB Interface

There are many different types of RS485 interfaces on the market.  One is a USB type interface as seen on the left. This type will allow you to use a laptop or desktop PC as a master device, or a slave node on the network.  Another type such as the interfaces shown below are typically used to connect to a micro-controller such as an Arduino or a PICAXE, or small credit card size computers like the Raspberry PI or Beaglebone Black.  Interfaces such as the ones below typically come with the termination resistors integrated on to the board and may need to be removed if being used as slave nodes in the network.Microcontroller RS485 interfaces

RS485 bus setup

In an RS485 topology, the network is designed as one single line with multiple drops, or slave nodes.  As mentioned previously, termination resistors are put in place at both ends of the line to prevent signal reflection.  When termination resistors are not used, signal reflection can distort the signal on the line to the point of causing data loss or corruption.  These reflections are more noticeable on longer runs because the length of the pulse is long enough for the full pulse to make it to the far receiving end.  Once it reaches the end, it is then reflected back causing ghost signals that can differ in phase by the time it has ended.  On shorter cable runs, the the delay of the reflected signal is short enough that the distortion may not affect things because the phase difference will be negligible.
RS485 bus termination
Termination resistors should not be used at the slave nodes as this will cause unwanted signal attenuation.  With too much attenuation the signal may get lost completely.  Therefore, on node adapters where termination resistors are in place by default, such as the ones pictured above, you may need to remove them if they are not acting as the end node.


RS485 can be a good way of connecting automation devices where wired connection between devices is critical in preventing drops in signal.  Following these simple rules for connecting the bus, the signal transmission between devices should be quite reliable.

Related Images:

The setup of my 1-Wire network

543{icon} {views}


DISCLAIMER:  This post was copied from my old web page and is a bit old.  Some information contained within this post may be out of date.
In my home automation setup, I wanted to be able to monitor temperature in various places around my house as well as outdoors.  I wanted a solution that was relatively cheap and easy to use.  My brother some time back had mentioned to me about something called 1-Wire.  He had used it up at his cabin to monitor temperature and electric usage through current sensing.  I did a bit of searching and found that it fit both of my needs, cheap and easy to set up.  So I figured I would document my setup here.

The 1-wire interface

1-wire adapterThe first thing I needed to run this was some type of 1-Wire computer interface.  After looking at options, I came across the DS9097U adapter on Ebay.  Unlike other 1-Wire adapters that had an RJ11 jack for connecting the sensors, this model had 2 - 3.5 mm headphone style jacks on it.  It did come with an adapter to connect the RJ11 style sensors if needed.  It looked like that adapter would fit the bill perfectly.  I ended up purchasing one for around $20.00 US from a china distributor on Ebay.

The sensors

The next thing I was going to need was some of the 1-Wire temperature sensors.  My brother had mentioned that he got all of his equipment from a company called Hobby Boards.  I checked their website and I could buy the bare temperature sensors for about $4.50, but they wanted $10.00 for shipping.  I decided to check Ebay.  I figured that if I could get the adapter cheap, I should be able to get the sensors cheap too.  I ended up finding another chinese distributor that sold the sensors in packs of 5 for around $7.00 shipped.  A pack of 5 of them from Hobby Boards would have been about $40.00 shipped, so I went for the Ebay deal (who wouldn't at that price), so I bought a pack of 5 just to try things out.

The build

Now that I had all the parts, I needed to figure out how to wire things up.  Looking at the data sheet, I saw that there were 2 ways to wire these devices.  The first was using parasite power.  This is basically powering the device from power it grabs from the 1-wire network.

The other way was to use an external 5 volt power source.

So, if I was to use the external power source, how would I accomplish this.  I once again turned to Hobby Boards who had a how to section that outlined a wiring specification that used cat5 wire, and supplied a regulated 5 volts along with an unregulated 12-24 volts on the wire for use down the line for other devices.  The color scheme shown here is using the ISO T568A standard.  Most cat5 cables that you buy these days use the ISO T568B specification which is what I am using.  The only noticeable difference is that the orange and green wire pairs are reversed putting the color order at, white orange, orange, white green, etc... 

I figured using a documented wiring spec would be more reliable, mainly because it has been tested and used by others.  Not to mention if I wanted to add other devices from Hobby Boards, I can do it without having to re-wire things.

Now that I had a wiring specification planned out, I had to figure out the temperature sensor nodes.  Using the information from the DS18B20 data sheet, I devised a simple circuit that allowed me the option of using parasite power or external power.  Using a jumper on a 3 position header I was able to quickly switch between the 2 if needed.  In the schematic shown to the left, placing the header jumper across pins 2 and 3 will run the sensor on parasite power.  Conversely, by placing the jumper on pins 1 and 2, I could run it on the 5 volt external power.

Since the majority of the nodes were going to be in the house on walls, I wanted something that wasn't going to look unsightly on the wall.  I ended up finding someone that was throwing out some old vented covered wall boxes.  I then put together a couple of these circuits on some perfboard.  I even made an etched board that although it turned out good took too much time.  The perfboard versions were much easier to do in the small quantity that I needed, and they worked just as well.  To the right is one of my perfboard sensors mounted on the wall plate ready to be installed.  I connected each one individually and used the software that came with the 1-Wire adapter to get the built in hardware address of each sensor and labeled each one.

The installation

Now that I had a few of these built, it was time to install them around my house.  To start, I installed one in the master bedroom, orne in the spare bedroom and one outside on the outer edge of my deck.  I wired these up with the cat5 wire just stripped and screwed to the terminal block using the blue pair and the solid orange wire.  Though  this works, my issue with it right now is that none of the connections pass the other wire pair signals down the line, like the 12-24 volt power.  For now, this is not an issue, but I do have a plan for fixing it which I still need to implement. The idea is to use an RJ45 splitter adapter similar to the one shown to the left.  By crimping modular plugs to the ends of each cable coming to the temp sensors and plugging them into the 2 jacks on the adapter, this will pass all signal and power lines through. I can then clip the wire that comes off of the adapter and use it to connect to the temp sensor or whatever other sensor I try to install.

The only other hurdle to attack in this project is to get things set up in my automation software.  This was insanely easy.  I installed the 1-Wire plugin for OSA and after plugging the sensors into the adapter, OSA sent a 1-wire search ROM signal which automatically detects any sensors attached to the 1-Wire bus.  OSA then automatically added these as objects to the system.  All I needed to do then is to add them to my floorplan view and make use of them in the system.

I started with the outdoor sensor.  Looking at my RCS thermostat a while back, I noticed that it had an option for displaying the outdoor temperature on the wall display keypad.  Since I wrote the OSA plugin for it, I simply added an option for taking the temperature value from any other OSA object and sending it to the thermostat.  Now if I want to know the temperature outside, I just look at my thermostat.

I wanted to do more than just use these to display the temperature on a wall display.  My next thing to tackle was to use the value from my master bedroom sensor to aid in controlling a booster fan that I have attached to my furnace.  The booster fan was originally set up to come on any time the furnace or central air turned on.  I thought that this was a waste of energy, so I set up a script to say if it is between 9:00 PM and 1:00 AM, and the temperature in the room is below 68° in the room when the furnace kicks in, then turn on the booster fan.  This is so that the room is warmed up a bit when we go to bed.  I will do something similar for the summer months and using the air conditioner.  Now I have some real world energy saving with the system.  Though not much, i'd suspect, it is something.

I have recently installed two of these in my bar/man cave area in my basement.  The room is very long with a fireplace at one end.  My plan is to monitor both temp sensors and when the one closest to the fireplace shows a temp that is 3 or more degrees higher than the one on the other end of the room, it would turn on a fan to circulate the air in the room.  The fan would then stay on until the temperature normalized throughout the basement.

One more thing that I plan on doing which I have not yet set up is to put a system in place for humidity control in my bathroom.  The idea is to install a 1-Wire temperature and humidity sensor in the bathroom.  I will then install a controller on my vent fan that I can turn on when the humidity gets too high.  The fan would then stay on long enough for the humidity to get to a safe level.  The idea behind this is to control mold and mildew buildup in the bathroom.


There are many other uses for 1-Wire in a home automation setup.  Implemented correctly, many of these can save you time money and cleanup costs.  I have not even scratched the surface of things I can do with this, and I plan to do a lot more over time.

Related Images: