Output Week | Week 13

Controlling Servo Motor as Output

Servo Motor is precise and can be used for many other linear and radial movements of robots. In this week I am going to use 360 degree continuous rotation.


TowerPro MG955 Metal 360 Continuous Servo


I have designed a board using ATTiny 44 same board I am planning to use in Networking week.
In this week I have to connect ultrasonic sensor with Servo Motor and try to check movements of wheel in both direction I also added pins for bluetooth which help me to control wheel moments through wireless communication.

Pin out of Atty Tiny 44 Board.




Details of eagle schematic and BRD is given below.

In this I see there are enough number of pins to manage three devices I have given two pins to ultrasonic 1 p.w.m to Servo and RX TX pin to Bluetooth.
As this IC is simple and small I can easily design small size of body which can add few automation to my project.
my idea for developing this board was to utilise for kids in few regular Kinetic structures with different outputs and inputs.
I can even code this with one input of potentiometer or any other sensor which will give women to Kinetic structure by Servo controller.




Eagle Board View


Components
  • 3x2 Header pins for Servo connection with VCC and GND to connect servo easily in same pattern.
  • RX / TX with VCC GND for BLuetooth Control if required or for Networking and Communication. 4 pin headers
  • TRIG & ECHO with VCC and GND at end as layout of Ultrasonic Sensor.
  • One Capacitor and Resistor respectively for power regulations and for Reset




int p = 8;
void setup() {
   pinMode(p, OUTPUT);
}

void fw(int t){
  for (int i = 0; i < t; ++i) {
      digitalWrite(p, HIGH);
      delayMicroseconds(2000); 
      digitalWrite(p, LOW);
      delayMicroseconds(18000);
    }
}

void bw(int t){
   for (int i = 0; i < t; ++i) {
      digitalWrite(p, HIGH);
      delayMicroseconds(1000); 
      digitalWrite(p, LOW);
      delayMicroseconds(18500);
    }
 }
void loop()
{
    fw(100);    
    delay(500);
    bw(100);
    delay(500);
    
}

								 



^ Top