Week 13

About Me Assignments Final Project Fab Lab 2017
About Me Assignments Final Project Fab lab 2017
×

INPUT DEVICES

This week Neil gave the lecture on the Input Devices, well after working on OutPut devices, it was bound to be much easier

individual assignment

I already had basic idea what I wanted to do, I wanted an input device to work on light intensity. If it can detect high light it should rotate the motor and if it didn't it should stop it.

Basically I wanted to use IR LED + Photodiode to read the output from IR LED. But as the part of assignment, I used Phototransistor instead of Photodiode.

PhotoDiode

Photodiode is a device which reads the signals sent from the Infrared Sensor, it reads only these.

PhotoTransistor

Phototransistor is a sensor which reads the signals from both Infrared and non infrared light.

Making the Circuit

As I wanted to make my circuit based on IR LED and PhotoTransistor along with the motor driving circuitory, I took one of the example circuits provided of the motor driving in Output Devices and updated it according to my requirements.

MC Pin Structure

Traces of the IR Circuit

MC Pin Structure

Outline

Next one was to make the RML files using the FabModules, well it wasn't much difficult, as it went quite smoothly

MC Pin Structure

Fab Modules for Traces

Milling

As we had already done milling mulitple times this phase also went smoothly. The only challenge was the availability of the machines, as the machines were quite busy doing the task of Milling the wax for previous week's task as well as this week.

MC Pin Structure

Milling

MC Pin Structure

Milling

All the related files are attached here :

Soldering

After the milling was done, now it was the time for soldering and I started soldering the compoponents on the board

MC Pin Structure

Bill Of Materials

MC Pin Structure

After soldering

After soldering completed, the last thing in the soldering process was to check if all the components are connected perfectly, so I used Multimeter to check and confirm if everything is connected and working.

Programming

Well everything gone well till the soldering, when it came to the programming that was certainly a challenge as the code avaialble with the example of PhotoTransistor didn't worked as the it quite complicated.

So to resolve this issue I tried to create code for my own self which can be easily understood and work according to my own needs

#include <SoftwareSerial.h>

int irPin = 0;
int sensorValue = 0;

SoftwareSerial mySerial(10,5);

void setup()
{
pinMode(1, OUTPUT); //output pin 1
pinMode(2, OUTPUT); //output pin 2
pinMode(irPin, INPUT); //input pin, the pin which is attached to the phototransistor
mySerial.begin(9600); //started the serial with 9600 baudrate
while (! mySerial); //till serial is not available stop here
mySerial.println("Speed 0 to 255");
}

void loop()
{
sensorValue = analogRead(irPin); //reading pin
mySerial.println(sensorValue, DEC); //printing the value using serial
delay(100);
}

After this, it was all about reading the output

Once the connections were ready I used the built-in Serial Monitor in the Arduino to read the output.

MC Pin Structure

Using Serial Monitor to read the output

MC Pin Structure

Using Serial Monitor to read the output

This is all for this week

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.