https://github.com/dmartingarcia/smartwatervalve
https://github.com/dmartingarcia/smartwatervalve
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dmartingarcia/smartwatervalve
- Owner: dmartingarcia
- License: mit
- Created: 2023-05-03T22:26:56.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T13:48:40.000Z (about 1 year ago)
- Last Synced: 2024-04-25T01:47:05.544Z (about 1 year ago)
- Language: C++
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esp-watervalve
Hacking the Jardibric PNR16 to add wifi to it.# State of the project
It adds a esp8266 (Wemos d1 mini) in order to control the water valve, removing the IC and hardwiring to the esp8266## First look
After dissasembling it we had different 3 parts:
### Top layer
Here we can see that there's a IC, two rotary selectors and the connection to the rain sensor at the bottom right.
Both rotary selectors are divided into two equal semicircles, where the connections are mirrored between each side, also mirrored between both, except for the central contact path.
### Bottom layer
In this side, we have the valve position sensing part, plus the motor connector and battery contacts
### Wiring
You will need 3 GPIO pins from the esp8266.
- **Led pin:** I use the same pin that is being used for the lonboard led.
- D4 // GPIO2
- **Valve position:** I choose to pull up this pin, because half of the contacts are not grounded or connected, and it will allow us to detect when we're grounded on the contact pads.
- D2 // GPIO4
- **Motor pin:** It enables the motor, I choose to pull down this pin.
- D1 // GPIO5
I also avoided all pins that had some kind of special function for the booting process.Here's the detail picture of the contacts and where it goes on the IC.
And this is how I ended wiring everything. I use contact glue to hold the cables and avoid rip any pad or traces.
#### I want to controll it using the rotary selectors
Okay, that's a bit difficult on this esp8266, because of the lack of GPIO pins, I tried to use a analog multiplexer to be able to manage the outer contacts using just 3 pins, but it ended being a nightmare because I started to use TX and RX pins and it make a bit harsh to develop and upload the code.
But it's still doable, but it will also not fit inside of the original case, and that's also a reason to just skip using the rotary encoders.
![]()