You are on page 1of 5

2017-04-15

AVR Bluetooth Robotic Arm

The robotic arm has two operational modes : record mode and playback mode.. User can use Android
app to control 4 servos respectively. The angle of servos can be saved in the EEPROM.
When user select playback mode, the angle of servos saved in EEPROM will be retrieved and
perform particular sequence of motions.

Main menu

Level 2 Profile 0-7

Level 3 Seq : 0-123

profileIdx (0
(0-7) recordCnt (0-123)

Angle

avr_bluetooth_robotic_arm.docx 1/5
A. Circuit

The EEPROM 24C32 is divided into 8 profiles. Each profile contains maximum 123 movements.
Profiles Address
0 0x000 – 0x1FF
1 0x200 – 0x3FF
2 0x400 – 0x5FF
3 0x600 – 0x7FF
4 0x800 – 0x9FF
5 0xA00 – 0xBFF
6 0xC00 – 0xDFF
7 0xE00 – 0xFFF

avr_bluetooth_robotic_arm.docx 2/5
For a profile
Offset Description
0x00 – 0x0F Reserved
0x10 – 0x13 Movement #1 :
angle of base servo, angle of left servo, angle of right servo, angle of claw
servo
0x14- 0x17 Movement #2
:
0x1FC – 0x1FF End of movement : FF FF FF FF

Note : If the value of movement array are 0xFF , it indicates the end of movement

B. Bill of material
Item Qty Desc Part number
1 1 Atmel ATMEGA16
2 4 Tact switch 6x6 Mouser
506-FSM4JAH
3 1 Res 10K 5%
4 3 Res 1 K 5%
5 1 Crystal 7.3728 MHz HC-49/S Mouser
815-ABL-11.0592-B2
6 2 Ceramic cap 22pF 5% NPO
7 2 Ceramic cap 1uF 20%
8 1 Timmer 3296 : 10k Alibaba : item
9 3 LED 3mm LED : TLDR4400 Vishay : item

10 1 LCM1602 module Ebay : item


11 1 ATMEL 24C02 (4kB x 8) Atmel : item
12 1 4 servo robotic arm MeArm or
compatible robotic
arm
13 1 XP6206P33 3.3V Torex : item
14 1 Level shifter 4-channel Bi-directional Adafruit : item

14 1 Bluetooth module hc-05 / -06 Ebay : item

avr_bluetooth_robotic_arm.docx 3/5
C. Video demo
Link : https://www.youtube.com/watch?v=WbgeWu_NROA

D. Configuration

E. Program structure

Main.c Servo.c uart.c

* Handle keys and menu * Generate PWM waveform * for debug purpose

EEPROM.c Robot_arm.c key.c


* EEPROM read & write * record mode * detect key input
* playback mode

At_command.c delay.c
* parse AT command Lcm4b.c * delay time functions
* handle LCM1602

I2c.c Led.c
* low level i2c * turn on / off led

F. EEPROM dump

avr_bluetooth_robotic_arm.docx 4/5
G. Compile the AVS Studio source code
1. Double click the file project file bt_robotic_arm.aps
2. Open the file “Robot_arm.h”
3. Modify the following lines according to your robotic arm, it define angle range of servos respectively
#define SERVO_BASE_ANGLE_LOW 0
#define SERVO_BASE_ANGLE_HIGH 170
#define SERVO_LEFT_ANGLE_LOW 50
#define SERVO_LEFT_ANGLE_HIGH 120
#define SERVO_RIGHT_ANGLE_LOW 30
#define SERVO_RIGHT_ANGLE_HIGH 100
#define SERVO_CLAW_ANGLE_LOW 25
#define SERVO_CLAW_ANGLE_HIGH 60

Note :
1. MeArm Laser cut file : https://github.com/mimeindustries/MeArm

2. The power consumption may over 500mA. DO NOT user USB as the power source. Use extern AC adapter with 5V 1A
output

*** THE END ***

avr_bluetooth_robotic_arm.docx 5/5

You might also like