which is a small eye i sculpted using foam clay, and it gets animated using micro servo motor and IR sensor, as I really into making animatronics.
so I went searching for the easiest animatronic and i found a very helping tutorial on youtube.
to build and simulate my circuit before making it IRL
It will be our brain for the curcit.
to wire it all up
It'll be our motion detector
to protect LED lights
I'll use it to simulate the movment
for building temporary circuits
as i used it to sculpt the eye
as i used it to make the armature for the eye
start by listing all of your components
2.Now let's wire all of it together considering the polarity of every component
p.s. I wired all the rails with the 5v pin and the GND pin so that i can use any of 4 rails to wire
So we will click code to get tis window
start by going to control and choose If, Else block
3.Now from Input choose read digital pin, and set the pin number to your IR sensor signal pin , which in my case is pin no. 7
2.Now from math choose comparison function, as we will manipulate ot to set the condition for the micro servo and LEDs
4.Now from math choose High function, so when IR sensor dedicate movement, the function will function
so when IR sensor dedicate movement the servo will rotate which will lead "my clay eye to look up, and the LEDs will be turned on too,
and when there is no motion the servo will be back to 0° which will lead "my clay eye to look down again, and the LEDs will be turned off.
1.Now since everything is functioning smoothly we will start wire our own circuit IRL.
2.Then we will copy this code to upload it to Arduino
3.and to do so hit "Code" then choose "blocks and text"
4.CTRL A then CTRL C to copy
5.and finally CTRL V in arduino uno program to paste
real life simulation with IR sensor and servo motor.
the motion was not very smooth as I wanted so I had to install the servo that way to get the very best output as it needed to be stable to simulate the motion.
as stability is very important to get every component stabilized to get the right motion out of it.