the small robot arm of the makeathon
This week's assignment is to make a project that is controlled wirelessly using the phone or pc.
Inspired by this week's Hackathon, I decided to use servo motor in this assignment, as it would let me get more familiar with it for the final projects.
So I decided to use it with the Buzzer.
Fritzing:
Used to simulate electrical circuits and components, so you can calibrate your circuit calculations and needs before even going to the hardware steps
Arduino IDE software
to compile the code written in the programming sketches and upload it directly to Arduino.
Arduino Bluetooth Control App.
Components:
Arduino Uno Board
Bluetooth module
Buzzer
Servo Motor
Breadboard
jumpers
Software used
Components used
Circuit on fritzing
I wired the circuit on tinker-cad as shown in the picture :
The buzzer -ve connected to the Arduino ground and the +ve side is connected to pin 8.
The servo's +ve connected to the 5v of Arduino on the breadboard, -ve to the ground and the signal connected to pin 9.
The Bluetooth module, has four pins, +ve, -ve and 2 signal pins.
I wired the +ve to the +ve of the breadboard and the -ve to the -ve and the 2 signal pins (Tx, Rx) on 0 and 1 pins respectively.
Also, I connected the 5v from the Arduino to the +ve side of the breadboard and the ground to the ground.
I started wiring the components on the breadboard and the Arduino.
I started with the buzzer: I connected the -ve pin to the -ve on the breadboard and the +ve pin connected it to pin 8 on the Arduino.
For the Servo, I connected the ground to the breadboard's -ve, the VCC to the +ve side of the breadboard and the signal connected to pin 9 (PWM) on Arduino.
For the Bluetooth module, I connected the VCC to the breadboard's +ve, and the ground to the -ve of the breadboard, for the Tx, I connected it to Pin 0 (Rx) and Rx connected to pin 1 (Tx).
In the end, I connected the +ve side of the breadboard to the 5v of the Arduino, and the -ve side of the ground.
After that, I wrote the code as shown in the screenshots, I connected the USB cable of the Arduino and uploaded the code, and then I connected the mobile app's Bluetooth to the Bluetooth module of the circuit, and then it worked as shown in the video.
Basically, the circuit works as follows:
when you press "one" the buzzer rings.
when you press number 2 the buzzer stops and the motor rotates 90 degrees.
when your press 3, the buzzer rings and the motor rotates 120 deg.
when you press 4, the circuit turns off, as the buzzer goes off and the motor returns to 0 degrees, i.e: the initial position.
Video of the assignment
Arduino Code Screenshots
The code failed to upload at first, so I told my younger brother about the problem as he is quite experienced with electronics and programming, he told me to remove the Tx and Rx wires of the Bluetooth module while leaving the Vcc and the ground, then upload the code once again, when I did that, the code got successfully uploaded to the board.
Controlling servo motors using the Bluetooth module and smartphone app during the Makeathon, was the coolest of this week, also playing with the robot arm and making it catch the fish was a nice experience.
Our robot arm.