There are many fun things for makers, but be careful not to overspend…
An Irregular Directory
Pitfalls of 12v Electromagnetic RelayPitfalls of Raspberry Pi GPIOpyfirmata
Once, I bought 20 pots of pothos, and after returning from a business trip, very few were left, but I had always been indifferent, wanting to make an automated watering system for a long time. Recently, I have been reading a book on minimalist living.
After cleaning my living space, I found time to tinker with watering plants. In fact, there are many things I should have done but haven’t, and I’ve procrastinated for a long time. Don’t ask how long; it’s just a long time. I need to find a way to get it done…
Pitfalls of 12v Electromagnetic Relay
At first, I bought a 12v electromagnetic relay, not understanding relays, planning to drive a 12v water pump. In fact, I could just use a 5v relay to drive it with Raspberry Pi or Arduino.
Pitfalls of Raspberry Pi GPIO
The output voltage of the Raspberry Pi GPIO pins is 3.3v, and a 5v relay will not trigger with 3.3v, so it remains in an always-on state.
After tinkering for a whole morning without discovering this issue, I switched to Arduino control, which worked fine. After Googling, I found the problem and considered purchasing a 3.3v trigger relay. There are 3v trigger and 5v/12v compatible 3.3v relays available.
Then I planned to compile the Arduino program in the Raspberry Pi command line, but it was too complicated, so I gave up.
The Double Eleven event at Xiaomiao’s home【Xiaomiao Technology】is counting down to the carnival, and here comes your pre-shopping guide.
pyfirmata
Firmata is just a protocol. With the protocol, any language can control Arduino through this protocol. Note that you need to upload firmware to Arduino before using the protocol.
Previously, I researched Python control of Arduino solutions, so I controlled Arduino Nano with Raspberry Pi, then controlled the electromagnetic relay, and then controlled the water pump. This solution is actually quite complicated. If I used the Gudwei robot kit, it would be much simpler (【Artificial Intelligence Maker (Intermediate)】Lesson 1). The Gudwei robot kit provides a Raspberry Pi expansion board, simplifies circuit design, and offers a graphical programming interface, lowering the programming threshold for Raspberry Pi, allowing everyone to play with Raspberry Pi
. Many schools in the Hangzhou Xiasha area have adopted the Gudwei Raspberry Pi kit, and the provincial training program for information technology teachers in Zhejiang Province also offers Raspberry Pi courses based on the Gudwei kit. Teachers have made instant cameras based on the Gudwei kit.
The core program is as follows
The Raspberry Pi controls Arduino Nano, then Arduino Nano controls the 5v relay, and the 5v relay directly controls the 12V water pump.
Once the 3.3v relay I ordered arrives, I will directly use the Raspberry Pi to control the relay without Arduino. In the future, I should also add soil moisture sensors.I could also write a scheduled script, set it as a system service script for Raspberry Pi, and leave it there without worrying about it.Of course, I could also use ESP8266, which has a sleep mode. After all, the power consumption of Raspberry Pi is too high; things that can be done with a 51 microcontroller or 8266 are indeed overkill with Raspberry Pi.Smart home manufacturers would have gone bankrupt long ago if they operated this way, considering that Xiaomi’s Yeelight smart bulb is only 99 yuan.
Combining Alibaba IOT or the IoT kit developed by Teacher Qiu Jiongtao, remote control can be achieved, integrated into the DingTalk workspace, and set to be visible to oneself, which is quite enjoyable. Teacher Qiu has published many books over the past year, and I bow to the master.
In fact, Teacher Sui Xiaobai used a laser cutter to cut the box and made an automatic watering system using Arduino that can detect and display soil moisture. I was a bit lazy; after all, pothos are water-tolerant, so I just use them as they are.
Automation can be fully automatic, semi-automatic, or manual, hahaha.
Teacher Sui’s pothos looks much better than mine, lush and green, obviously well-watered. Hmm, Teacher Sui and I undoubtedly have the same type of watering pipe.
Teacher Sui made a power bank; that’s impressive. If you’re interested, you can check it out.
If you have many pothos, you can use ground insert spray heads:
I bought many spray heads and various hardware but haven’t done much. I should take care of these pothos, but I haven’t used them, which is a shame.With these ground insert spray heads, I can water multiple pots of flowers at once.As for stop-motion animation, I’ll talk about it once I find a camera stand.………
Leave a Comment
Your email address will not be published. Required fields are marked *