This week my assignment idea is to design a smart circuit with input and sensor action.
I do this idea because it's a small part of my final project.
I used Tinker cad to design and simulate my electronic circuit,
Then i used Arduino program for coding.
Tools:
Arduino Uno
Ultrasonic Sensor
DC Motor
Jumper Wires
Breadboard
Thinker Cad
Arduino Uno
Ultrasonic Sensor
DC Motor
Jumper Wires
Breadboard
L298N Motor Drive
Tinker Cad Circuit
I started by using Thinker Cad to simulate my circuit and make sure that everything will be OK
I used ultrasonic sensor to run DC motor by adding L293D motor driver
Then i used coding by code blocks on thinker cad with if condition to read ultrasonic sensor with distance < 30 cm, DC motor rotate 180 degree & then wait 1 sec then rotate again
Finally i test the simulation of the circuit as shown in the video
Tinker Cad simulation video
I used the same components that i used on thinker cad
I used ultrasonic sensor to run DC motor by using L298N motor drive for controlling speed & rounds
I put all wires on breadboard & Arduino
Code
I copied the code text to Arduino program & connected with the circuit
When i was near to ultrasonic sensor with distance < 30 cm, DC motor rotate 180 degree & then wait 1 sec then rotate again
Michael helps us in the lecture to understand pull up pins and why should we add pull up for the push button.
I asked my instructor Amany about the coding and she helped me because i had something wrong on thinker cad until i fix it.
i forgot to add (read ultrasonic slot) in the code blocks & she told me about it.
My Cardboard Final Project
My assignment project like my final project but i will replace Ultrasonic sensor with RFID control
I enjoyed our session exercise, we made Smart Waving Hand with Arduino bu using to different inputs:
Manual Mode with potentiometer
Automatic Mode with ultrasonic sensor
Smart Waving Hand