Skip to content
Snippets Groups Projects
Commit c7c76779 authored by Adrián Torres's avatar Adrián Torres
Browse files

update_project2

parent e8b6568f
No related branches found
No related tags found
No related merge requests found
Pipeline #172779 passed
docs/images/project/week18.15.jpg

279 KiB

docs/images/project/week19.04.jpg

276 KiB

docs/images/project/week19.05.jpg

294 KiB

docs/images/project/week19.06.jpg

282 KiB

docs/images/project/week19.07.jpg

285 KiB

docs/images/project/week19.08.jpg

283 KiB

......@@ -231,6 +231,10 @@
<p><iframe src="https://player.vimeo.com/video/431957186" width="100%" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></p>
<p>During the week of <a href="week11.html"> <b>Output Devices</b></a> and <a href="week14.html"> <b>Networking and Communications</b></a> I made the boards that I was going to use in my project. The first is an ATtiny1614 that detects the two phototransistors and activates the servos. The second board is an ATtiny412 to control the level crossing lights.</p>
<span class="image main"><img src="images/project/week18.15.jpg" alt="" /></span>
<p>I take advantage of the composite's curing time to design the box that contains the electronics, to achieve system integration. I print the prototype of the box in 3D printing, I have to adjust a hole to place the connectors.</p>
<span class="image main"><img src="images/project/week18.06.jpg" alt="" /></span>
......@@ -248,11 +252,13 @@
<p><img src="images/project/week18.08.jpg" width="70%"; max-width="700" /></p>
<p>I am advancing homework, for the next steps. To place the track and align it I need a piece of board that can weld the two rails. For this I create a PNG with Rhinoceros in the shape of the rails and the sleepers. I mill it using the Modela, I increase the offset to remove as much copper as I don't need.</p>
<p>I am advancing homework, for the next steps. To place the track and align it I need a piece of board that can soldered the two rails. For this I create a PNG with Rhinoceros in the shape of the rails and the sleepers. I mill it using the Modela, I increase the offset to remove as much copper as I don't need.</p>
<span class="image main"><img src="images/project/week18.09.jpg" alt="" /></span>
<p>With the laser I cut the cork 5 mm thick; the cork serves as a platform for the track and insulator for the noise produced by the passing of the train.</p>
<p>With the laser I cut the <b>cork 5 mm</b> thick (cutting <b>Speed 40% Power 90% 1015 Hz 400 Dpi</b>; offset 3 points from the original focus); the cork serves as a platform for the track and insulator for the noise produced by the passing of the train.</p>
<p>For the road, to smooth it I use polystyrene putty that once dry is very easy to work just by sanding it.</p>
<span class="image main"><img src="images/project/week18.10.jpg" alt="" /></span>
......@@ -263,15 +269,137 @@
<p><img src="images/project/week19.01.jpg" width="70%"; max-width="700" /></p>
<p>To join the modules together I use screws.</p>
<p>Once I have all three modules, one with screws and screws. This system is very useful to assemble and disassemble during exposures since you get a very fast adjustment.</p>
<p><img src="images/project/week19.02.jpg" width="70%"; max-width="700" /></p>
<p>The next step is to raise the rails and the sensors. In this prototype I use the Dupont terminals to solder the photransistor. The sensor will go under the track.</p>
<p><img src="images/project/week19.04.jpg" width="70%"; max-width="700" /></p>
<p>At the ends of the modules, I place the boards I had milled. I glue them with contact glue and I solder them with tin to the rails of the road. Once the glue has dried and the solder has cooled, I secure the board with a nail and cut the rails with the Dremel.</p>
<span class="image main"><img src="images/project/week19.03.jpg" alt="" /></span>
<p>Working progress... </p>
<p><iframe src="https://player.vimeo.com/video/432079613" width="100%" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></p>
<p>Once the railway line has been laid, the next step is to place the level crossing barriers. For this I use the 3D supports that I designed in the week of <a href="week11.html"> <b>Output Devices.</b></a> I also have to make a hole for the barrier movement rod to pass through.</p>
<span class="image main"><img src="images/project/week19.05.jpg" alt="" /></span>
<p>Screwing the servo supports below the track and placing the 3D printed barrier on top. I transmit the movement of the servo and the barrier with a small wire. I take advantage of the channel milled with the Dremel to guide the cables.</p>
<span class="image main"><img src="images/project/week19.06.jpg" alt="" /></span>
<p>When I already have the servos and signals connected, I fix the box where the boards and all the system integration are. I order the cables thanks to the milled channel.</p>
<p><img src="images/project/week19.08.jpg" width="70%"; max-width="700" /></p>
<p>When I have the integrated system in place, I go to the first step of the decoration, the road and the ballast of the track.</p>
<p>For the <b>ballast</b> I use screened <b>river stone.</b> Using various sieves I obtain the desired size. Within modeling you can spend money buying the best materials, but many times you can make a model with natural or nearby products and with them you get great quality.</p>
<p>I place the ballast in the track, then water it with alcohol and then with white glue cut in half with water and a few drops of detergent. The use of alcohol is to break the surface tension, but we cannot get the tail to penetrate between the stones. The detergent drops are in case we need to move the line, simply moistening it with water we can remove the ballast.</p>
<p><iframe src="https://player.vimeo.com/video/432094747" width="100%" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></p>
<p>Using very fine grain <b>sandpaper</b>, I create the road. This technique in modeling is very useful because we get a very real asphalt feeling.</p>
<p><img src="images/project/week19.07.jpg" width="70%"; max-width="700" /></p>
<p>As the ballast dries and the road passes to the programming part. Through Arduino and UPDI through the pyupdi I load the two programs to both ATtiny.</p>
<p>The ATtiny1614 detects the train through the phototransistor, moves the servos and activates an output. When the train goes through the second phototransistor the output is turned off and I move the servos.</p>
<pre><code>//Adrián Torres. Fab Academy 2020
//ATtiny1614
//Fab Lab León
#include SoftwareSerial.h
#include Servo.h
Servo myservo1; // create servo object to control a servo1
Servo myservo2; // create servo object to control a servo2
int sensorPin1 = A0; // analog input pin to hook the sensor to
int sensorPin2 = A1; // analog input pin to hook the sensor to
int sensorValue1 = 0; // variable to store the value coming from the sensor1
int sensorValue2 = 0; // variable to store the value coming from the sensor2
int ledPin1 = 13;//first light
int posinicial = 60; // initial position of the servos
int posfinal = 30;
int pos = posinicial;
int umbral = 100; //minimum value of the sensor to activate the system
void setup() {
Serial.begin(115200);
myservo1.attach(3); // attaches the servo on PA4 to the servo object
myservo2.attach(6); // attaches the servo on PA5 to the servo object
pinMode(ledPin1, OUTPUT);
myservo1.write(posinicial); //initial position of the servo
myservo2.write(posinicial); //initial position of the servo
}
void loop() {
sensorValue1 = analogRead(sensorPin1); // read the value from the sensor
sensorValue1 = map(sensorValue1, 0, 1024, 1024, 0);
sensorValue2 = analogRead(sensorPin2); // read the value from the sensor
sensorValue2 = map(sensorValue2, 0, 1024, 1024, 0);
//values in serial
Serial.print("pos: ");
Serial.print(pos);
Serial.print("Valor 1:");
Serial.print(sensorValue1);
Serial.print(" ");
Serial.print("Valor 2:");
Serial.println(sensorValue2);
//Serial.clear();
if (sensorValue1 <= umbral) { //if the value is less than the threshold
digitalWrite(ledPin1, HIGH); //active the lights of the level crossing
for (pos ; pos >= posfinal; pos -= 2) { //close the barrier
myservo1.write(pos);
myservo2.write(pos);
delay(80);
}
}
if (sensorValue2 <= umbral) { //if the value is less than the threshold
digitalWrite(ledPin1, LOW); //turn off the lights of the level crssing
for (pos; pos <= posinicial; pos += 2) { //open the barrier
myservo1.write(pos);
myservo2.write(pos);
delay(80);
}
}
} </code></pre>
<p>I use an ATtiny412 to control the flickering of the level crossing lights through the activated output of the ATtiny1614.</p>
<pre><code>//Adrián Torres. Fab Academy 2020
//ATtiny412
//Fab Lab León
int ledPin1 = 0; //led1
int ledPin2 =1; //led2
void setup() {
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
}
void loop() {
digitalWrite(ledPin1, HIGH);
digitalWrite(ledPin2, LOW);
delay(750);
digitalWrite(ledPin1, LOW);
digitalWrite(ledPin2, HIGH);
delay(750);
}</code></pre>
<h1>Files</h1>
<p>Find below the files that I made for this final project.</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment