Hello everyone!
In this topic, you will learn how to create a simple dispensing medium in which it is very useful in some electronic projects that needs a dispensing medium. An example of this is a bottled water dispenser or medicine dispenser. A dispensing medium is very important because now a day we can buy things through a dispensing machine in which it helps our daily life more comfortable.
Let’s start with the materials and software that we will be using in this topic
Materials
♦ Arduino Uno
♦ Relay
♦ Magnetic solenoid
♦ battery
Software
◘ Fritzing
Short description of our materials
Arduino is an open source computer hardware and software company, project, and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control objects in the physical world.
A relay is an electrically operated switch.
A solenoid is a type of electromagnet when the purpose is to generate a controlled magnetic field. If the purpose of the solenoid is instead to impede changes in the electric current, a solenoid can be more specifically classified as an inductor rather than an electromagnet.
How does it works?
So in this tutorial, we need the arduino as our microcontroller in which we need the two digital output that is being programmed to automatically trigger the solenoid. The pins that we will be using are pin number 13 & 12. Then we have a 5V relays that were connected to the two pins. The output of the relays are then fed to the input of the magnetic solenoid. By the time the arduino transmit signal through pin 13 & 12, the two relays will trigger and display an output of 5V that is needed to activate the magnetic solenoid. When the magnetic solenoid triggers, it will act push and pull.
Circuit construction using Fritzing
Selection of circuit components
Construction of the circuit
1. Connect the pin 13 & 12 from the arduino to the two relays
2. Use the NO (Normally open operation of the relay) then connect the output to the input of the magnetic solenoid
3. Connect a supply battery to the arduino or connect it through laptop
4. The final part is the action of the magnetic solenoid in which it performs push & pull to dispense an object
Arduino Codes used to interface the computer port to the Arduino board
int dspnsr1 = 13;
int dspnsr2 = 12;
byte byteRead;
void setup()
{
Serial.begin(9600);
pinMode(dspnsr1, OUTPUT);
pinMode(dspnsr2, OUTPUT);
}
void loop() {
if(Serial.available())
{
byteRead = Serial.read();
if(byteRead == 49){
digitalWrite(dspnsr1, HIGH);
delay(250);
}
if(byteRead == 50)
{
digitalWrite(dspnsr2, HIGH);
delay(250);
}
if(byteRead == 84)
{
Serial.print("TT");
}
{
digitalWrite(dspnsr1, LOW);
digitalWrite(dspnsr2, LOW); }
Conclusion
By knowing the basic electronic components we can create a mechanism that will help us create an electronic project that could help our community. Through this tutorial, we can improve a project or think a better project that could utilize this dispensing mechanism.
I hope this will help in your future electronic projects.
Yours Truly,
@rfece143
Posted on Utopian.io - Rewarding Open Source Contributors
This is a wonderful piece. I will try it
thanks @super20 ..yes you can..i will appreciate it
@originalworks
The @OriginalWorks bot has upvoted and checked this post!
Some similarity seems to be present here:
https://en.wikipedia.org/wiki/Solenoid
This is an early BETA version. If you cited this source, then ignore this message! Reply if you feel this is an error.
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
thanks @manishmike10
Hey @rfece143 I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x