4 ms·
Here's a few things that I made with the esp8266: * Connected an accelerometer and hall effect sensor, used to know when the washing machine is in use and
by fullstop 5y ago
Here's a few things that I made with the esp8266:
* Connected an accelerometer and hall effect sensor, used to know when the washing machine is in use and the state of the lid. I taped a magnet to the lid so that it can be sensed with the hall sensor, so no wires are moving / need to be managed. Sends a message if we've left clothes in the wash.
* Fish tank lights with WS2812B strips
* Water softener brine level sensor using an IR transmitter / receiver in the lid of the brine tank, lets me know when to add salt.
* Plant moisture sensor, lets me know when to water.
* 1x4 WS2812B lights that we can all use to mark ourselves as on a call, either through a web page or Telegram, so that we know to be quiet because someone is on some sort of video call.
If you're using esp32 or esp8266 take a look at esphome.io for ideas -- you can do a ton of stuff without writing much code at all. Most of my projects are done with the Nodemcu framework because I have a soft spot for Lua, but I do use esphome.io to interact with some Mijia BLE temperature and humidity sensors.
- barbazoo 5y agoI'm for sure going to copy your first one, thanks for sharing.
- fullstop 5y agoGood luck! I used a SS441R hall sensor. You don't need to use an ADC or anything like that since the output is the same level as what would be needed for GPIO and you can use an edge trigger interrupt to know when the state has changed. The accelerometer is a GY-521 breakout board. It was a little tricker to work with because orientation is important and they are sensitive. Different cycles on my washer result in different vibration patterns, and the "bulky" setting rests for several minutes with no motion. Overall, it's the one project which gets used the most and has saved us from having to re-wash stuff because it was forgotten and got kinda funky. Best of luck!
- blackfawn 5y agoCare to elaborate more on the IR sensor for a water softener? I had thought of doing something similar but with ultrasonic for level. I'm curious what you are doing with IR. I suppose resistance could be used based on dissolved salt but I like the non-contact options, when possible.
- fullstop 5y agoSure, it's purely optical. I don't know if this was the exact sensor since I salvaged it off of something else, but it was something like this one: https://www.amazon.com/dp/B075FPR2VX/ https://www.amazon.com/dp/B075FPR2VX/ It's hooked up to the ADC of the ESP8266, and thankfully the output was between 0 and 3.3V since that's the range that the Wemos D1 boards can accept, as they have a built in voltage divider. It's measuring the distance between the lid and whatever reflects the IR back.
- Abundnce10 5y agoI love these ideas! I've always wanted to do home automation stuff but I worry about sending data to outside parties. Do you happen to know if Home Assistant monitors the things you have installed and/or keep track of the data your devices pass to each other?
- mason55 5y agoThe whole philosophy behind HA is "local only as much as possible". There are a few analytics modules that report back which integrations are in use so that they can help focus dev efforts but those are optional. They also have a cloud service that can be used to help expose your instance externally if you don't want to run a local nginx and expose your home network to the outside world, but even that is not a way for them to monitor the devices you're running. Plenty of people run HA with absolutely no access to the outside internet (like, the host is firewalled from communicating outside the local network). Plus it's all open source so you don't need to trust anyone, you can look at the code if you want.
- fullstop 5y agoAll of my stuff is completely decoupled from the internet. I publish mqtt messages to a broker running on PC in my basement. Any interaction with the internet, such as sending messages to my phone, happens from there and I am 100% in control of where traffic goes.
- otter-in-a-suit 5y agoForgive me if it's an ignorant question, but what's the benefit of an ESP32/ESP8266 over a Pi Zero (W), apart from saving ~$5, assuming all your applications are indoors and don't need to run on battery? I've only recently gotten into the whole topic, and have yet to see the benefit of dealing with micro-controller toolchains, MicroPython etc. if power consumption is not a big factor. Seems like a full Raspbian offers a lot more flexibility. I've used a Pi Zero W that runs regular Python and sends messages to a REST API on my home server (little go thing) + MariaDB + Grafana, for similar use case (although I will now need to build the washer/dryer idea :)).
- fullstop 5y agoYou're missing the cost of the uSD card. esp8266 and esp32 boot almost instantly and don't really have a file system. My issue with Pi setups is that they eventually fail due to SD card corruption.
- tene 5y agoIf you're happy with a Pi Zero for your use-case, then there probably isn't anything you'd appreciate about moving to a microcontroller. One big driver for microcontroller use is power, as you've suggested. A quick look on Google shows that the Pi Zero uses about 100mA at idle, and even its "sleep" mode uses 30 mA. In contrast, the esp32-c3 datasheet lists power consumption at 130 micro-Amps for light sleep and 5 micro-amps for deep sleep. If you want to run something on battery or small solar, you can go a lot farther with a microcontroller using power-efficient sleep. One other thing that might be relevant to some use-cases is deterministic realtime control. When your program is the only thing running on the processor, with no OS involved, you can have much more reliably control over your timing and latency. This isn't an area I know much about.