Home automation

I get to rebuild my IOT server again. Fun times.

Around Christmas the hard drive that was attached to my IOT pi died. The nice part is the server gets better every time I rebuild it.

To be updated as I rebuild.

Old Spec:
Pi 2 – Works good enough
Razberry – Z-wave is stupid.
Node-red – Amazing


Personal Wiki update

Quick update on the wiki front, I was having some issues with using tiddlywiki on my phone. I have since started playing around with dokuwiki on a raspberry pi. Which works great because I access it from any device and easily back it up.

I’ll add more details about how I set it up when I finish rewiring my DMZ network. Fun times.

Personal Wiki

I’ve been playing around with tiddlywiki  and I’ve really liked the idea of a personal wiki. The only problem with tiddlywiki is trying to keep my phone in sync with my laptop. I finally decided to use my domain that I bought for something useful. I installed dokuwiki on a raspberry pi and setup it up in a dmz. It’s been working better than I would have thought. I still need to setup replication but I think it’s reasonably secure for home use. 
I’ll try to add some links to the guides I followed later. 

Table saw 

I found an 1956 Delta Rockwell 8 1/4 homecraft saw this weekend for $20. It has everything but the side wings and needs a good cleaning and polishing.

New Saw
1956 Delta Rockwell 8 1/4 homecraft saw.

Update: June 25, 2017

There looks to be minor chemical spills on the top. Time to see what she looks like when shes had a good scrub.


Update: June 25, 2017 (Part 2)

She’s looking better after a little scrubbing with some WD-40 and a Scotch-Brite pad.

Update: June 25, 2017 (Part 3)

After about an hour of scrubbing, most of the rust is gone. The table is a little pitted from something spilled on it though.


Update: June 25, 2017 (Part 4)

Time to clean out the old crusty saw dust.

Update: June 25, 2017 (Part 5)

I tried to do a test cut just to find the neutral wire fell off the motor, the insulation on the hot wire was cracking off, and the ground wire was not hooked up. Time to go to bed before I kill my self.

Update: June 26, 2017

I bought some sand paper today to polish the top with. It looks like it might polish up nicely.

Update: June 26, 2017 (Part 2)

After a few hours of hand and power sanding the top. She feels as smooth as glass.

Update: June 27, 2017

The final product. Not bad for a few hours of work.

The Brewing Project Idea

I’ve been working on a beer brewing controller for a little over a year now and I’ve decided to start putting my ideas down online. This post is a summary of my ideas and issues to date. I’ll have more details in future posts.

My Back Story:

I have a degree as an electronic technician and work in the industrial automation field as a technician so I’m very comfortable working with electricity, PLCs, computers, and stuff. Naturally, when I wanted to upgrade my brewing setup I wanted to switch to electric. was a big inspiration for how I wanted my system to work.

The Original Idea:

As luck would have it, I happened to be in the local supply store one day and they had their yearly scratch and dent sale going on. After finding two slightly used 10 gallon Tall Boy pots for almost half off I decided it was a sign to start the upgrade.

WARNING: electricity can kill you and/or burn your house down so find someone who knows what they are doing if you don’t.

I started my upgrade by installing a 220V spa sub-panel in my garage. For whatever reason, I can buy a whole sub-panel with GFI breaker cheaper than I can buy a standalone GFI breaker where I live. I also bought a Tri-clamp enclosures and 5500W element for one of my “new” dented pots. NOTE they do make a few different styles of tri-clamp enclosures now so you might want to shop around.

Problem 1:

Once I had my wiring done, I decided to test the element with a 2 pole 30A switch. My hope was that I could just use the switch until I could hookup a temp controller. First, I hooked up 110V to the element. 110V is not enough power (1375W) to bring or maintain a boil with my pot/element. It would work great for mashing though. Then I hooked up 220V, after a few minutes the pot almost had a boil over with just plain water. To make matters worse, as soon as I turned off the switch the water stopped boiling. Something faster and smarter was needed.

Solution 1:

I started looking on amazon and found this and it worked great. I could maintain a nice boil with it. If you’re looking for a manual controller I recommend it.

Problem 2:

I wanted to be able to mash with it too, so I needed some sort of temp feedback. I had an arduino lying around so I figured I’d rig it up with the basic PID sample code. I may have let some magic smoke out of the SCR and arduino after trying to replace the digital screen.

Solution 2:

Another quick trip to Amazon and I had a 40A SSR, 220V 60A contactor, a few temp probes on the way.

Problem 3:

The PID code with SSR wouldn’t give me a nice steady boil like I have with gas or the SCR controller. I could watch as the water would boil like crazy then stop as the PID was controlling it.

Solution 3:

I can go into a long explanation about how to fix this but the short answer is I needed to add a zero cross detector. This tells the controller when the AC wave is almost zero so you control each half wave. Yet another quick order and I had an isolated 110/220V to 5/10V transformer and some opto isolators on the way. Note: I know I didn’t need the transformer but I was hoping I could power my final circuit with it too.

Problem 4:

I built a basic Zero-cross detector and started to play with the arduino ACPWM code. I hooked everything up to 110V again and used a lamp to debug the code. Unfortunately, I made a strobe light instead of a dimmer. Luckily I have an old oscilloscope so I was able to figure out what was happening. The SSR I had bought off amazon that said it was an instant on was in fact a zero cross relay. This means that instead of chopping part the AC wave, I could only turn on the relay for a full half cycle.

Solution 4:

I decided to try to work around this “feature” of the cheap SSR. I spend a few hours making a fancy duty cycle table in excel and then implementing it in the arduino code. The light was still a little strobe like but I figured the heating would be fine. I then converted the circuit back to 220V and hooked up my pot.

Problem 5:

I flipped the circuit breaker on and pushed out full power to the pot. Once I had a boil, I put the set point to a 1:1 duty cycle and the boil started to slow down. Unfortunately, it was still boiling a little too rapid for me. What can I say, I don’t like boil overs. When I tried to lower the duty cycle more, the boil started to oscillate again.

Solution 5:

I finally broke and bought a nice SSR from digikey that worked the way I wanted. This allows me to turn on the relay for a part of each half wave. Then I started to strip away all the excess code from ACPWM and now I have the interrupt routines down to 6 lines of code. The whole runtime for the SSR and contactor is around 40 lines as of writing this.

Problem 6:

Now that I have working hardware I wanted to find some software for temp control. I started looking existing projects that I could modify to work with my AC chopping idea. I started with BrewPi, at the time they had the brewing code in demo. It would have been a massive rewrite to get it to work correctly. Then I found Open ArdBir. The code was easy to figure out and tweak to get the PWM code working. Unfortunately, the 3 interrupts that are called 120 time a second messed up the arduino millis function, LCD, and button code. After a 60 minute mash turned into 2 hours I decided I should figure something else out.

Solution 6:

After the mashing issues, I decided I should break the UI and ACPWM code up. I originally modified the osPID code for my temp sensors and my ACPWM code. This worked great with a computer running the osPID front-end.

Problem 7:

I was having a hard time tweaking the osPID front end the way I wanted. I’m not very good at writing code and I was having a hard time tweaking the osPID front end the way I wanted while adding more features to the osPID firmware.

Solution 7:

After spending way too much time on trying to repurpose someone else’s project, I realized the very expensive software I use for work is able to talk modbus. This let me whip up a HMI quickly (with the work laptop) and focus on making a working controller. The nice part about modbus is the amount of free software that supports it.

Problem 8:

Now I have a mostly functional brewing controller, I can work on getting rid of using my work laptop for the HMI. As of writing, this is where I’m at. I’m currently looking at maybe using something like AdvancedHMI or similar software package.