Search This Blog

Showing posts with label nano. Show all posts
Showing posts with label nano. Show all posts

Thursday, November 19, 2020

Smart Bedframe

Recent gap in posts is due to moving. Now going from a 1 br apt to a house, there are plenty of new things to automate. First project is to make a light controller for the bedroom. 

I want this device to control: 
- RGB led strip under the bed
- White led strip under the bed
- 2 dimmable lights connected to the headboard

I had planned to just use a nodemcu but due to the mosfets and 2 AC dimmers all requiring a PWM signal. I had to go with an Arduino nano paired with an ESP01. Sounds easy enough... but I vastly underestimated how much extra code that added to the project. In retrospect I would probably go with a bigger espressif board. Here is a pic of how I layed out all the boards in fritzing and then physically layed out.


And here it is fully wired up. Code is 95% ready. The ESP can connect to the MQTT server and relay commands to the Arduino Nano.
And now it is installed on the bedframe under the mattress. The 3d printed box pictured is a housing the cover up a screw terminal for the AC and 12v lines.
Biggest hiccup in this project is the AC dimmers library uses internal timer 2, which prevents you from using 2 of the 5 PWM signals. I solved this by just using a digital signal for the RGB mosfets, so I just can't dim the RGB colors anymore. Not a big deal.

Thursday, August 15, 2019

Brewpot water level sensor

Working on a new addition to the homebrewing setup. I want to be able to detect water/beer levels in the pot. This circuit will read multiple probes to detect which ones are in water and report the status back to the raspberry pi over the usb serial connection.

I started with a simple circuit I found online, then added my own twist. Had to relearn eagle cad, then sent the eagle project file to Oshpark to get some PCB's made.

Schematic
Board Layout
Final PCB assembled(mostly)
   
Next step will be to get my 3D printer working so I can print the following enclosure that I drew up in Fusion 360.