Skip to content

14. Networking and communications

During this week I have been fighting a lot with mi output device!

As you can see in week12 my way for this assignment has been tortuous!!!

I just wanted to connect my ultrasonic board, that I have done while input devices week with one stepper i did in output devices week as i have told you some lines before.

Learning about communication

First I need to understand how both sensors needs to connect each other and how!

This page of The makers Workbench help me so much.

So I replicate it in a Arduino board to test and check if everything is correct. Here you can see that it works ok!

Finally the most important thing to learn in this assignment was the ports Tx and RX (transmission and reception) and the idea that the have to be connected changed

Tx input device to Rx output device
Rx input device to Tx output device

Lets communicate both

After testing with a lot of Attiny44 I am fed up of them because i couldn’t work with any boards I did… So y tried with an ATtiny45, the problem with them is that you don´t have as free Pines as you need to make a BUS there.

But the truth is that when you learn what happens inside, In my case between ultrasonic sensor and servo motor, I I fell into the account that I didn’t need 2 pines to make the communications, because there is no answer or any feedback from servo to sensor, Only the sensor transmit useful information to the motor.

So I could use the FTDI port which has TX pinout, that you only use once to program the micro-controller as a official pin to communicate with the other board. So that was what I did!

Here we can see how are little bit modified to connect everything changing the logic of the programing boards.

Logic of program

The ultrasonic sensor send information of distance to the servo motor.
If the distance is up to 10 it sends [1] value; else it send [0] value
Servo motor receives only [0;1] values
If its 0 it will open 45º. If it is 1 it will close 45º

As a remote student from FabLab Leon I have been very lost in those electronics/programming assignments, and my instructor was far from me (I have signed the agreement I know I had to be self-sufficient and look for my resources) and that was what I did. For that reason I want to say thank you to Javier Villarroel former-fab Manager from FabLab ESNE, for teaching me the things I didn´t know to complete the assignment.

Licencia de Creative Commons
Este obra está bajo una licencia de Creative Commons Reconocimiento-NoComercial-CompartirIgual 4.0 Internacional.