Using arduino as timer for 12v7/16/2023 As the lock works with electricity so in case of power failure the lock can’t be opened or closed.you need to interface one relay also If you are not aware of the interfacing of the Relay module with Arduino then check it first. You can found these types of locks on the doors, safes, and cupboards nowadays.The lock is not directly connected with the Arduino instead of it we use a relay module.The solenoid lock is controlled by Arduino, it generates the signals so the lock turns on and off after the delay of a second.The movement of the armature depends on the magnetic field generated by the insulated copper coil.Ī solenoid lock looks like this.When we pass the electric current to the coil it generates a magnetic field near it.There is an armature inside the coil which moves freely.there is a coil of insulated copper wire which is wound in the shape of a hollow cylinder.If you don’t know more bout magnetism you can read it on our website. What is a Solenoid Lockīasically, it is an Electromagnetic lock that works on the principle that a current-carrying coil produces a magnetic field near it. This was cut out of 2.92mm thick correguated cardboard (Amazon boxes) with a laser cutter.So, here we are giving you every possible information which helps you to learn and make your project possible for yourself. This repository contains the svg file for the case I made for my coin acceptor (CoinRelayBox.svg). compile and upload code to arduino (make sure you have selected the port with tools->port menu).adjust seconds per pulse to your desired rate (it is currently set to 60 seconds per pulse).Open CoinAcceptorRelay.ino in the arduino ide.connect your arduino to your computer with a USB cable.download CoinAcceptorRelay.ino from this repository.download and install both arduino libraries required for the display backpack from adafruit ( ).Power and train the coin acceptor with the coins you wish to accept as described by adafruit ( ).Plug your load (christmas tree) into the normally off outlet of the relay controlled outlet. Plug the 12V power supply into the always on outlet of the relay controlled outlet.Connect the 7-segment display to the arduino as described by adafruit ( ).Connect the other end of the resistor to 5V on the arduino. Connect the coin acceptor's white wire to one end of the 10 kohm resistor.Connect the coin acceptor's grey wire to digital pin 2 of Arduino.Connect the coin acceptor's black wire to the ground pin of the Arduino.The Arduino Vin pin is connected to the power supply before the rectifier, so it will output 12V if the arduino is powered with a 12V supply. For simplicity, power the arduino with the 12V power supply to the barrel connector, and connect the red wire of the coin acceptor to the Vin pin on the arduino.I start with a breadboard to make sure I've connected everything properly and that it works, then I soldier everything to a proto-shield for longeviety. I use proto shields for most of my projects. 7-segment display with I2C backpack ( ).For $114 in parts and about 6 hours of time, you too can nickel and dime your family! Hardware Components ($104): I initially used this project to operate our christmas tree lights, but can be used to operate any plug load. Whatever you'd like to control with the coin acceptor can be plugged into the relay outlet. When the timer runs out, the relay turns off the outlet. Inserting coins into the coin acceptor turns on the relay controlled outlet and adds time to the timer.
0 Comments
Leave a Reply. |