Week 10

Input Devices

In the tenth week of Fablab, we got introduced to various sensors to get inputs. We all tried a sensor each to understand the working and look out for applications. I used the doppler Radar sensor and made a motion detector.

Individual Assignment

The individual assignment fro this week was to design and use a sensor, add a sensor to a micro controller board that I have designed and read it
I started off by designing a circuit for the same using Eagle. First, I selected all components from the library and then connected all the components. All major components were available in the fab library, but I had to draw and create the library for the sensor. I checked the number of pads and the details and then created a library with RCWL-0516.

Once the schematic was completed, I arranged and autorouted the circuit. I had to do it a few times and get some adjustments done, to finally get it done.

The schematic and board files can be downloaded.

After exporting the circuit trace, I went ahead and milled the board.

My initial design includes an LED and resistor which was accidentally connected to VCC and 3.3 V which I didnt notice at first. I noticed this issue after I had the board milled and started soldering. To get this corrected, I first shorted the circuit by replacing the LED and resistor using two 0 ohm resistors. Then A copper wire to connect other two unconnected regions of the circuit.

Once all the soldering, troubleshooting and fixing circuit was done, I had to program the board and see if it was working. I did the program in Arduino and first burnt the bootloader and then uploaded the program. The program I used is given below.

int Sensor = 4; //Input Pin
int LED = 3; // Led pin for Indication
int flg = 0; //Change detection flag
void setup() {
pinMode (Sensor, INPUT); //Define Pin as input
pinMode (LED, OUTPUT); //Led as OUTPUT
void loop() {
int val = digitalRead(Sensor); //Read Pin as input
if((val > 0) && (flg==0))
digitalWrite(LED, HIGH);
flg = 1;
if(val == 0)
digitalWrite(LED, LOW);
flg = 0;

The ino file can be downloaded from here

Once it was uploaded, I tested the sensor and it worked!