Ingredients


Eagle

Arduino

Input Devices

 

This week's goal is considered a kick start in my final project. Briefly about my final project I need to control a number of servos (probably more than 6) with the same variable input About the variable input: I'm planning to use a potentiometer to be able to control the mechanism manually, this would help me develop the mechanism connections and joints more. Later on while developing the project I'm thinking of replacing it with a proximity sensor to make it more automated.

First Trial with Inputs and outputs

Mainly potentiometer act as manual controlled resistor that helps controlling the current flowing through the circuit. The potentiometer works with three pins, VCC, GND and the analog PIN. I used PIN 1 (analog input in the ATTINY44). This is the schematic of how the potentiometer internally works. I modified the HELLO.SEVO.44 by adding the TRIMMER 10K OHM 0.05W SMD from the inventory also my final project will have three servos per unit so I decided to attach a third servo at PIN8 (PWM) I couldn't find the surface mount 22UF capacitor so I replaced it with this one.
Interior.png file
traces.png file

Download The Design Files
Code.de

Interior.PNG
Traces.PNG
Schematic.SCH & Board.BRD

Programing:

I wrote the code in arduino it should basically read from the potentiometer on pin A1 and send the pulse to servos at pins 6, 10 and 11 The code was not compiling with the board at the beginning as its not compatible with the attiny44, I tried to simplify the code as much as possible but the problem was not the memory of the micro-controller but was the library itself. Servo.h LIBRARY IS NOT COMPATIBLE WITH THE ATTINY44 ! Ohad sent us this tutorial (http://projectsfromtech.blogspot.co.il/2013/03/attiny85-servo-softwareservo-library.htmltutorial) which helped a lot in modifying the library. As the tutorial said we had to change the first lines in .txt file inside the library
Library
Code.de

CONTINUE ON THE OUTPUTS WEEK