Hi, we are a group of students and this is our first project in instructables and we hope you like it!
This project was for 'Creative Electronics', a Beng Electronics Engineering 4th year module at the University of Málaga, School of Telecommunications.
It´s a Plotclock (based on an Arduino UNO R3) representing the time and temperature. For the development, we have relied on a project already completed: http://www.thingiverse.com/thing:248009.
We have enjoyed making this project (although with some difficulties involved) and we hope it will not be our last instructable.
Then, we will show the steps we have taken, indicating the changes made with respect to the project by Joo.
Step 1: List of Materials and Components.
For this project we need:
- 2 Micro Servo 9g TowerPro
- 1 Servo TowerPro MG90S
- Laser cutter or 3D printer (or someone you print parts J)
- 1 Arduino UNO R3
- 1 whiteboard marker (dry erasable)
- 1 dry wipe pen
- 1 breadboard and wires
- 1 Real time clock DS1307
- 1 humedity and temperatura sensor DHT11
- Bolts, nuts and washers.
Step 2: Laser Printing
To begin the project, a 3D printer for the pieces to
assemble the structure is needed. In the link below, there are the files to print: http://www.thingiverse.com/thing:250204
We have painted the pieces to give strength and we have increased the size of the four screw holes located on arms.
Step 3: Assembling the Structure
When painted parts have dried, it will proceed to assemble the structure:
1. Attaching piece 1 with piece 2 by joining.
2. Attaching the bottom of piece 1 with piece 3 by a screw.
3. Attaching piece 4 with piece 3 by joining.
4. Attaching piece 5 with piece 4 by joining.
5. Puting servos (6 and 7) with screws to piece 4 and 5. The left servo will be slightly below another to be moved correctly.
6. Puting pieces 8 and 9 with servos with screws. The black part is placed below that is an element which brings the servo.
7. Attaching piece 10 and 11 with pieces 8 and 9 with screws. Piece 11 will be on the left servo.
8. Attaching piece 12 to piece 3 and central servo with screws. (piece 13).
9. Attaching piece 14 with piece 2 by joining.
10. Attaching piece 15 with piece 1 and 2 by joining.
Step 4: Connecting Servos
Servos have a connection to GND, a connection to VCC (5V) and a connection to one of the digital ports. In our case, we have put it into port 2, 3 and 4. Port 0 and 1 are the only ones that can not be used.
Step 5: Connection RTC
The RTC1307 module will connect to the Arduino with 4 connections.
The SDA pin is connected to the analog port A4 and the SCL pin is connected to port A5.
The VCC pin clock module is connected to pin VCC of 5V Arduino and the same with GND.
The other clock module pins are not used.
Step 6: Connection DHT11
The DHT11 module will connect to the Arduino with 4 connections.
The VCC pin module temperature to pin VCC of 5V Arduino and the same with GND. In the left center pin a 10K resistor is placed and connected on one side to VCC and another with digital port 7.
Step 7: Software
First, before you try anything, it is necessary to download some libraries may not be installed on your computer to simulate the Arduino code. The libraries used are: Time library (needed to clock module RTClib.h with the library) and DHT library (required to module temperature). The library servo should be already installed in the program.
Now, we will explain the process of how to install a library in Arduino. The libraries can be found at:
TIME library: https://github.com/PaulStoffregen/Time
RTCLIB library: https://github.com/adafruit/RTClib (it is necessary to change the name of .ZIP which is downloaded from RTClib-master.zip a RTClib.zip).
DHT library: https://github.com/adafruit/DHT-sensor-library
To download them from these links, you must download them in .zip format by clicking where you see in the image.
Once downloaded libraries, we will add to our Arduino program. To do this, it will be pressed in the area shown on the image:
We look for the .zip file that we have downloaded and add it.
Once installed all the libraries, we will proceed to analyze the code of our design in 2 steps. In the first step,we will adjust calibration for its correct movement and ,in the second step, we will load the code to the plotclock Works properly.
Step 8: Calibration
In this first step, calibration will be adjusted. The mainly achievement of this step is the Plotclock move within range of the design. For this, code line which is seen in the image will be uncommented.
Before loading the code, make sure that pieces 8 and 9 (the red part) are NOT bolted to the servo, just fitted. Once the code is loaded, it can be seen that the servos (left and right) move 90 degrees. Then, adjust the parts 8 and 9 so that it looks like shown in the image.
As the movement is 90 degrees from the point of image, screw the pieces to servos.
Step 9: Code
In this step we will show the main changes we have made in the code for our design. It has also attached the file .ino to run it in the Arduino development environment.
Step 10: Result
In this last step, it can be seen the proper functioning of the design when all the previous steps are finished. The Plotclock paint the current time and temperature. Here we add the images of final structure and a video about the Project in operation.
Step 11: Problems May Appear
During the development of this design can appear many problems but you do not worry because they have solutions. In our case:
1. Parts depend on the quality of the 3D printer. Our pieces did not have too much quality and they did not fit properly.
2. When we were screwing, we had to enlarge the holes of pieces.
3. Get proper calibration requires several failed attempts.
4. When the plotclock was running, screws are loosened and we had to adjust them from time to time.
5. We had to make a handmade support because our plotclock was lame due to different heights.
6. Because of a strong screwing, tremors gave rise to incorrect drawings.
7. Program is not compatible with Arduino Leonardo.