Sebastiaan FabAcademy

Week 11 Imput Devices

website version1.0

This weeks assignment was to connect an ouput devices on to the FabKit. I have used this week to connect 4 distance sensors to the fabkit and the result will be used for my final final project, the leafbot. The leafBot will get a sensor on all 4 sides. This will be used to prevent that the LeafBot will bang to an object. The sonar sensor below is used. I only had one sensor with me to test with, but that wasn't a problem.



I started to think about the connection of the 4 sonar sensors to the fabkit. The idea was to make a board where the 4 sensors could be connected to. This board is the interface to the fabkit.



During drive home in the train, I thought about several board layouts



On sunday I first played with the arduino board, a breadboard and 1 sonar sensor. This was my first attempt and first experience with Arduino IDE. From the FabLabEnschede I took the Arduino stuff to home and worked with it in my weekend. I have absolute no experience what so ever with this. It didn't took long before I faced problems.



A example of a Ping Sketch was found in the internet, with I tried to install. I used the manual from Arduino



But Something wasn't installed ok.



It seemed that the library was missing. I had to copy it in a different folder



After a long surge and a little online help from a college, the mistake that the library wasn't save on the right positioning, was solved



I connected the wires and Sonar sensor to the breadboard. Compiled the sketch and loaded it. Again something wasn't ok. The baut rate wasn't the same as in sketch.



I changed the baut rate to the sketch to "115200" and it worked :-). See the youtube result






Next thing was to design the board to connect the 4 sonar sensors in Eagle. I soon found that I already had forgotten alot of things about Eagle, so I had to follow first the online tutorials.

Tuturial 1

Tuturial 2

Tuturial 3


It took me monday almost all day to follow the tutorials and then design the PCB board parallel to the tutorial viewing.



I imported the headers in the schematic of Eagle. I connected the pins. All The GND and VCC where connected on two seperate lines. The Trigger pin and Echo pins where separte connected to the 8 pin Header that connects towards the fabkit. I couldn't find a 8 pin header in Eagle. So I my idea was to take 2 6-pins headers and lays them on top of each other, to end up with 8 pins in total. It looked it did work ok. But the lines showed blue. This wasn't ok.



So I labeled the connections



I routed the lines again. Now they showed red. Then I created the red dashed polygon around the board, for the ground pour.It changed in dashed when the loop is closed. Change the name to GND, so this is then linked to GND.



So the ground area would cover the complete board, with is better. It dissipates heat. It is easier to connect all the components to, and it is good for RF emisions.



Next was to shorten the connection lines to get less resistance



Next during the DRC check there was an overlay of connections. I had to replace the 6-pin headers with 8 seperate PADs. My college give me an tip to use the PADS. I imported the PADS, labeled them and connected them to the trigger en Echo connections of the Sonar Sensors pins. I dicovered that I have a leak of knowlegde of the components names and therefor I was't able to find components in the Eagle library



Here in this picture below the DRC Check, warnings still to be seen in the menu at the right side. I deleted the 2 6-pin headers and routed the board again. The board was saved as a Gerber file.



Next a 3D test has been done in the website of www.mayheylabs.com. The result shows the board in 3D view. I discovered that the text was partly placed out side of the board.



Same test has been done in www.gerber-viewer.com. Also here it is vissible that the text is placed partly outside the PCB board.



I changed the Text size, but also decided to replace the 4 pin header, with I used in the first placed. But I only needing 2 pins of it, and so I replaced it with two separte pads to connect the GRD and VCC.



I changed the Schematic first



And routed the board again. Also making nice curved routes. Did the DRC check again and found an overlape at the revision text. So I had to resize the text.



Perfect



To generate a Gerber file I downloaded a Gerber board layout file and used the tutorial from learn.sparkfun.com



I imported the Gerber board layout in Eagle CAM Processor



The file ready to be milled



From Paul I got a connection layout to connect the ISPtiny to the fabkit to boot it



On the milling machine at my work the Gerber file was impoted and the top layer was prepared to be milled.



The milling started first with an 0,2 mm mill. The toplayer was then removed with an 1 mm. And the outline wss milled with an 2 mm mill.



Result after milling. Looked ok for me. I cutted it free and washed it.



I tinned the paths. But I shouldn't have tinned them all. later I had some problems to solder the pins straight onto the board. So I won't do this again. I will only tin 1 path of the header to connect the header to the board. And then solder the rest of the pins. At this moment my stress level was already sky high, because it was 4 pm on tuesday. Not much time left.



In the rush to make the board I soldered the first two headers wrong on the board. So I had to remove them and solder them again. I use a hot gun blower but I melted on header. So I couldn't solder 4 headers on the board, because I had only 4 of them a my place in Enschede.



On the right side of the picture the melted 4-pin header.



Next I had to make a wire connecting the Sonar Sensor pins to the header of the board.



The fabkit had to be boot loaded via Arduino. The fabkit was already made in the week Week8



Checking the connections of the fabkit. I looked okay.



Testing the fabkit with the bling Sketch in Arduino.



Yes it works :-)



Now load the Ping Sketch I tried sunday with the Arduino Board. It worked now also with the fabkit and my now connection board. It was almost closing time of my FabLab in Enschede. But I did finally get some joy and hope in a good result of this weeks assignment.



I tried to hold my hand to different distances of the sensor and it reponded to it.



First the test was done with a direct connection to the fabkit.



Next the test was done with my new board. It worked also



The Sketch had now to be extended with the other 3 sensors. The number of pins was increased. Every sensor pin seleted to a different pin of the fabkit. 3 Newping where added and numbered. Next was the add the 4 diffenend void loops so have 4 results on 1 line.



Second test was to test the other 2 soldered headers. It also worked.



Files of week 11

Eagle file



Gerber files



CAM file



Arduino 1 Sonar Sensor Sketch



Arduino 4 Sonar Sensor sketch