Subscribe For More!
Demonstrated here is an easy way to control a 12 Volt Solenoid and a 5V Relay using a GPIO Pin on a Raspberry Pi.
Article with Code - [ Ссылка ]
Related Information
Control Your Raspberry Pi Remotely Using Your Phone (RaspController Guide) - [ Ссылка ]
Controlling a 5V Solenoid with an Arduino - [ Ссылка ]
Control One or Two Servo Control With Raspberry Pi - [ Ссылка ]
Control 16 Servo via Adafruit HAT for Raspberry Pi - [ Ссылка ]
Dual Monitors with Raspberry Pi (Excellent Beginner Guide to Connecting Everything Up) - [ Ссылка ]
Facial Recognition with a Raspberry Pi and OpenCV - [ Ссылка ]
Solenoids are immensely useful way to turn electrical energy into a linear motion. Solenoids come in a variety of different specs with 5 Volt and 12 Volt being very common for makers. So today we will activate the stronger 12 Volt solenoid using the Raspberry Pi GPIO (General Purpose Input and Output) Pin with a Relay module in between the two. A relay is an electrically operated switch and we need one for this because the 12 Volts that the Solenoid requires to operate would fry the Raspberry Pi if directly connected to that voltage as the maximum voltage it can take is 5 Volts. It can also deal with voltage spikes. Here you can find schematics, how to wire it up correctly and how to write code to activate and deactivate any 12V solenoid. I even show how you can control it directly from your mobile phone. Shown here is a latch solenoid but there are more traditional plunger type solenoid and even liquid solenoids.
If you have any questions about this content or want to share a project you're working on head over to our maker forum, we are full time makers and here to help - [ Ссылка ]
Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:
Latch Solenoid 12V (used here): [ Ссылка ]
5V Single Channel Relay Module 10A (used here): [ Ссылка ]
Raspberry Pi HAT 3X Relay: [ Ссылка ]
Plastic Water Solenoid 12V: [ Ссылка ]
Brass Liquid Solenoid 12V: [ Ссылка ]
Raspberry Pi 4 Model B 2GB: [ Ссылка ]
12V DC 2A Fixed 2.1mm Plugpack: [ Ссылка ]
0:00 Intro and Schematic
0:10 Overview of Video
0:29 What You Will Need
1:47 Schematic and Build
3:13 Coding the Raspberry Pi
3:50 Its Working!
4:00 Quickly Explaining the Code
5:20 Control It With Your Phone
5:33 Other Relay Types and Methods to Control
6:00 Outro
How To Control A Solenoid With A Raspberry Pi Using a Relay
Теги
How to control 12V Solenoid with 5V Raspberry PiRaspberry pi solenoid controlsolenoid control with a piSimple way to control a solenoidmicroproccesor controlling relay controling solenoidcontrolling a relay with a raspberry pi to work a 12V solenoidHow to Connect 12v Solenoids to a Raspberry Pi using a 5v Relayraspberry pi 4latch solenoidliquid solenoidplunger solenoidcode to control solenoidschematics to control solenoidGPIO Control