17. Machine Design

Sorting Color M&M

Serial communication protocol

We have 3 function,

Servo moves to transfer the m&m from the source to the sensor.

The sensor ‘reading colors’, phototransistor with RGB LED.

Then the previous servo moves again to transfer the m&m from the sensor place to the next step

The second servo moves to the right direction based on the sensor reading to put the m&m in the right place.

So based on this process we choose the asynchronous as a serial communication protocol, lamia has a previous experience with the sorting color in her input device assignment, and she has the board that connecting with FTDI pin header with RX only.

Also we need a board contains of two servos, that connecting with RX or TX or the both. So we decided to make the servo board as a master ‘ that transmit the data TX’, and the sensor board as a node ‘that receive the data RX’.

So we will redesign only one board ‘servo board’.

I will design the board and fabricated it, lamia will prepare the compound and weld the board and program it.

The Servo PCB board

We have a previous experience with the servo board that we made in output devices week, So the difference here that we will use this board as a master board … So we will add TX and RX pin headers…

  • The schematic Board

  • The Board


Fabrication The Servos Boards

Then Lamia weld the board.


Programming

Kamel has explained the different codes for servo with Neil’s code ‘C’ and Arduino IDE. Then Lamia made a lot of tests with servo reading and the phototransistor… She made a small Maket from foam material to test the servo with the phototransistor.

Feel Free to Download Files