Help Building a power cycle for my Hot Tub

I built a hillbilly hot tub heater for my hot tub hammock. The heater has a problem though. The flame goes out every so often. To reset the flame all I have to do is cycle the 12V power to the water pump.

My first attempt at addressing this problem works ok. I have power bit attached to a light sensor bit to a buzzer bit. I have the light sensor detect when the flame goes out (no light) and that turns the buzzer on. Then I reach over and turn the power off then back on.

I’d like a bit to cycle the power for me, rather than just beep at me. Any ideas? The water pump is 12V, and I did all the wiring myself. Seems like I would need somebit that simply disconnects power (or ground) across a connection and then reconnects after a few seconds. I’d be happy building a new bit using the hardware development kit if necessary. But I’d be at a loss for what to put on it. :wink:

Thanks,
Joseph Elwell.

1 Like

Maybe wire some sort of relay into a protobit?

1 Like

You could use a timeout bit with a very short timeout.

Connect the timeout bit to your buzzer. When the buzzer turns out, the timeout bit gets triggered. You can set the timeout bit to turn off then turn on when it is triggered. You can connect the timeout to a proto-bit so you can wire it up to a relay that controls the power of your hot tub.

1 Like

Hi Joseph @jelwell,
You could take a look here for a relay bit, made with the proto bit.
The contacts of this relay are fully separated from the Littebits 5 Volt circuit and can switch your 12 Volt circuit, no problem.

Awesome. The current max draw on the water pump is 7amps. Is that a problem for the relay, it states 1amp max? Or is that 1amp the maximum that the relay itself uses?
Thanks,
Joseph Elwell.

Ho Joseph @jelwell,
I am sorry, my relay cannot switch 7 amps at 12 Volt…
I suggest you try to find an intermediate relay that can swich 7 amps… :fearful:

Hi @jelwell. Perhaps the Smart Home Kit contains a solution for you. What would happen if you used a light sensor + ir transmitter to trigger the water pump plugged into an AC switch?

Oh, and please share pics of your setup. You’ve got us curious. :smile:

Hi Jude @JackANDJude,
The AC switch turns off after 90 minutes (safety feature)…
Will this be OK for the hot tub water pump?
See this post:

I watched the videos on the timeout bit. Yes! I think that will provide the reset of the power when set to ON-OFF mode.

It only takes about 30 minutes to warm up the hot tub. But the heater is 12V not AC. I do have an AC to 12V adaptor that I can test with, I also gave a wifi enabled AC power switch (not littlebits). I will try using the cloudbit to tell my wifi power switch to turn on and off. I’ll need something portable for when I don’t have AC, eventually.

Does anyone have experience with the cloudbit? Mine isn’t very responsive. It seems like I can use my phone to change the output 3 times and then it no longer allows me to set the output for a very long time. I haven’t tried using it to send data to the web, but I’d need it to send repeated ON and OFF cycles, probably a maximum of 10 transmissions in a period of 1 hour.

I will take a picture of my setup, for those curious.
Thanks,
Joseph Elwell.

The hot water heater setup is behind the hammock. I’ll try to get a better picture later.
Joseph Elwell.

1 Like

Hello Joseph,

I built a 110VAC outlet that is triggered by a littleBits input, by using a simple relay that’s readily available. I’m sure you could adapt this same wiring method to turn your 12VDC power on/off. See my project posting:

Regarding max current rating, the relay I used is max output of 30VDC and 10A DC.

Good Luck,
Tom

2 Likes

I think I know everything I need. Now the hard part seems to be sourcing little bits! A timeout bit plus a proto bit is nearly 40$ shipped. I’d pay more for shipping than either bit alone. I checked my local Fry’s electronics website and they had some bits on clearance, that I snapped up, but neither the timeout nor the proto. I think I’ll wait for the Deluxe kit to come back (the only kit I could find that has a timeout bit) and buy that and try to make a proto bit by cutting the wiring off an wire bit.
Joseph Elwell.

I bought some 3 pin JST SH connectors with bare wire on one side. Hopefully I can use that to turn a split or wire bit into, essentially a proto bit. I’ll have to wait until the deluxe kit is available so that I will have a timeout bit. And eventually the hardware kit might be nice to own, also sold out.

1 Like

My JST connectors came in. They fit perfectly. Can someone verify the wire colors for me?
White = Ground
Orange = Signal
Red = VCC (power)
Does that look right?

These are the connectors I bought:

Hi @jelwell,
I checked my wire bits and found the following order of the wire colors:
White = VCC (power)
Orange = Signal
Red = Ground
:grinning:

1 Like

I got it working!
I did not end up buying a timeout bit. Still waiting on the Deluxe kit to come back. I ended up using a Arduino bit. Which might have been better anyways?

Here is my working design:
p1 power -> wire bit -> light sensor -> threshold -> number bit -> arduino bit -> w9 proto bit -> 5V relay module

The threshold appeared to be necessary because the ambient light needed to trigger the light sensor on or off varies quite a bit, and trying to adjust the light sensor screw is excruciatingly time consuming. Using the threshold and the number bit, I can adjust the whether the arduino is signaled until I find the sweet spot when the flame dies the number bit reads 0 and when the flame is lit the number bit reads 97.

Here is the code in the Arduino:

int button = A0;
int output = 5;
int digitalOutput = 1;

void setup(){
  Serial.begin(9600);
  pinMode(button, INPUT);
  digitalWrite(digitalOutput, LOW);
  analogWrite(output, 0);
}

void loop(){
  int input = analogRead(button);
  if (input <600) {
    Serial.println(input);
    Serial.println("Resetting power");
    analogWrite(output, 1023);
    digitalWrite(digitalOutput, HIGH);

    delay(5000);
    analogWrite(output, 0);
    digitalWrite(digitalOutput, LOW);
    delay(7000);
  }
}

I’m actually only using the “5” output, I was playing with both the d1 and the d5. I have d5 set to analog.

The code does a couple of things. First it sets the output signal to the relay to 0. Then during the loop if the input is strong enough, it sets the output to 1023, waits 5 seconds, then sets the output to 0, then waits 7 more seconds.

At first I had it just wait 5 seconds then turn the output to LOW and continue the loop immediately. Well… It turns out that when I set the output to LOW, indeed the power comes back on, but the water heater actually takes a few seconds to light. So what would happen is power goes off, power goes on, heater doesn’t light fast enough, cycle forever… So I added a wait AFTER the power comes back on to make sure the heater pilot light has enough time to finish firing up before the loop starts checking again to see if the flame is on.

The 5V relay controls the 12V power to the water pump. I have the relay set to Normally Closed.

1 Like

Here are some pictures. The light sensor is underneath all that tape. There is a window into the pilot light at that location. I’ll probably end up building a lego housing and seeing if I can permanently affix the sensor to that location. For now, tape.

I’m currently using a timer to control the 12V power (as well as the relay). Now that I have a working light sensor, I’ll convert to an off/off switch (with the relay).

Joseph Elwell.

2 Likes

Wow. Thanks for keeping us posted on your progress, Joseph. Congrats on getting things working! When you’re satisfied, please upload the project to http://littlebits.cc/invent :thumbsup: