pinball DIY.
my inspiration from the pinball game, l really love this game.
these videos help me to organize my idea: wooded pinball
when the ball crosses the IR sensor, some LEDs play with a pattern with a sound from the buzzer.
And if the ball moves around the microwave sensor, some LEDs will play with another pattern with another sound from the buzzer.
The motor is running all the time.
pinball
helping in simulating the circuit.
Pencil
ruler
cutter
glue gun
Cardboard
Breadboard
resistors (220 Ohm)
LEDs
jumpers (female-male and male-male)
DC motor
crocodile wire
IR sensor
Arduino
Buzzer
microwave sensor
The first part includes:
IR sensor.
3 LEDs.
3 resistors (each one 220 Ohm).
Arduino UNO.
breadboard.
connection:
red LED on pin 2.
yellow LED on pin 3.
green LED on pin 4.
signal pin of IR sensor on pin 5.
buzzer on pin 9.
having one input (IR sensor), and 4 outputs (three LEDs and a buzzer).
those outputs will be on according to the IR sensor.
if the sensor read a high or low (when the ball moves in front of the IR sensor), then the outputs are on with sequence.
else off all of the outputs.
first, declaration of pins and mode of it (inputs or outputs)
make a variable to sort in it the value of the IR sensor.
To know the reading of the sensor, use the serial.
the sensor always read 1 (high).
if anything in front of it will read 0 (low).
the rest of the code.
copy the code from ID Arduino and paste in the code of TinkerCad to test the circuit.
The second part includes:
motor.
on/off switch.
wires.
5v adaptor.
The third part includes:
RCWL-0516 microwave sensor.
2 LEDs
buzzer
connection:
red LED on pin 6.
white LED on pin 7.
signal pin of microwave sensor on pin 8.
buzzer on pin 9.
To know the reading of the sensor, use the serial.
the sensor always read 0 (low / no motion there).
if anything moves around the sensor it will read 1 (high).
first, declaration of pins and mode of it (inputs or outputs)
final code
testing the first part
testing the second part
testing the third part
testing all component together
2 input (IR sensor and microwave sensor) and outputs (LEDs and buzzer)
building pinball machine from cardboard
cut rectangle 25*32 cm
cut 2 sides and front part
part of moving part
fixing with glue gun
cut small piece from strew to moving part, and the other side to shaft of motor.
fix it
the other side
fix switch in side of machine
connection of motor
fix the two sides
connect positive of LED to female-male jumper and negative to resistor.
fix IR and 3 LEDs
fix microwave sensor and 2 LEDs
all parts
tools for hand part
fixing wood .
pinball machine
DC motor not working at 5v, so replace it with 9v
replace hand part with wood clips it is easy and the same effect.
wood clips
pinball machine
in the Midweek session, the part about finding the bugs in code. it is really a very nice part.
Making a smart home system in EO week session.