WEEK 10: INPUT DEVICES



GROUP ASSIGNMENT
PROBE AN INPUT DEVICE(S)'S SIGNALS AND DOCUMENT YOUR WORK (IN A GROUP OR INDIVIDUALLY)

OSCILLOSCOPE

While working with electronics, for debugging and testing behavior, we need to understand the circuits on signal level, which multimeters fails to do. In this case Oscilloscopes comes into picture. A digital oscilloscope measures the signal, and then converts that measurement into a digital format using an ADC converter, after which the data measured is depicted as a digital waveform representation. From this representation various paramters can be evaluated.

In our lab this oscilloscope is available we can observe the output of digital or Analog signal using it.


SIGNAL WAVE FORM BEHAVIOUR

Electrical stations, computers, motorcycles, and televisions are examples of typical waveform sources.

SPECIFICATION OF GOS-1152A-U

150 MHz Bandwidth.
1 GSa/s Real-Time Sample Rates Maximum, 25GSa/s Equivalent-Time.
2 Mega Point Record Length.
2mV-10V Vertical Scale.
1ns-50s Horizontal Range.
Up to 27 Automatic Measurements.
5.7" TFT LCD Display.


DIGITAL SIGNAL WAVE FORM

We initially evaluated the IR sensor on an Arduino UNO by connecting the probes to the IR output pin, which displays a frequency in the form of waveform on oscilloscope.

Here, we are observing the output of the IR sensor. it generates the square wave.


ANALOG SIGNAL WAVE FORM

In order to observe analog signals, We attached the motor's terminals to the probes on the Digital OSCILLOSCOPE and manually rotated the motor shaft. The motor generates an Output signal on the oscilloscope.

Here, this wave form shows the analog signal.



INDIVIDUAL ASSIGNMENT
MEASURE SOMETHING: ADD A SENSOR TO A MICROCONTROLLER BOARD THAT YOU HAVE DESIGNED AND READ IT.



In this week I want to make a SATSHAKIT and I will use HALL EFFECT SENSOR as an input which generate the voltages.

HALL EFFECT SENSOR

Hall Effect Sensors are devices which are activated by an external magnetic field. We know that a magnetic field has two important characteristics flux density, (B) and polarity (North and South Poles). The output signal from a Hall effect sensor is the function of magnetic field density around the device. When the magnetic flux density around the sensor exceeds a certain pre-set threshold, the sensor detects it and generates an output voltage called the Hall Voltage, VH. Consider the diagram below.

working Principle of Hall Effect sensor.

I am using 44e938 hall sensor as an input. 44e938 pinout is same as 314.

PCB DESIGNING

I took the ATMEGA328P-AU IC for Arduino Board.


Replaced the power headers with 3x1 header for ground and 3x1 header for vcc for using more than 1 module.


Final Schematic Diagram of the board.


BOARD LAYOUT

Here, I also added the text numbers at the pins.

adding required Layers of the Board for making a png file.

GENERATING .PNG FILE

Go to the layers and disable all the layer expect pads, top layer. Then go to file and click on export and click on image. New dialog will open. check on the Monochrome and give dpi 2000 and select the location where you want to save and click Ok.

click on file then go to export and then select image.

create a png file with 2000 dpi and monochrome then browse the desire location.

SEPERATE THE TRACE, OUTLINE AND HOLES IMAGE

Open the image Of trace in paint and make the circle on the headers and fill with black color. For outer draw an rectangle around it and remove everything inside the rectangle box then save file as outline. Similarly, open it again and remove every thing expect holes and save the file as holes.

TRACES

this is the traces image for my board.


DRILL

this is the drill image for my board.

OUTER

this is the outer image for my board.

GENERATING RML FILE

Now open mods and select the SRM 20 and upload the image of traces. Select the tool bit 1/64 and dpi 2000 then click calculate. RML for traces is generated. Similary upload the outline image and holes image one by one. Select the tool bit 1/32 and dpi 2000 and click the calculate. RML for holes and outline will be generated.

for creating rml file same process is repeated using mods.cbs.mit.edu I breifly described in week4

this rml file shows the paths of the drill bit using 1/64 tool.

MILLING

First of all trace rml is given to machine with 1/64 tool bit then having same x,y coordinates change the tool bit to 1/32 and give the holes rml first then outline rml file.

milling completed after that clean the board with brush and take out the board.

COMPONENT LIST

All the components are available for soldering.

SOLDERING

Soldering the SATSHAKIT.


Board is ready for the coding.


BURN BOOTLOADER

This is the connection diagram for Burn bootloader inthe board.


follow these steps to upload Arduino bootloader:
open Arduino IDE
select proper programmer by clicking on Tools->Programmer (for example USBtinyISP)
select Arduino UNO as Tools->Board
click on Tools->Burn Bootloader


First we need to make the satshakit programmer for we burn the bootloader into board.


Here is the connection schema for the FTDI cable fro uploading the code in satshakit, with FTDI we donot need programmer anymore.


CODING

const byte ledPin = 12;
const byte interruptPin = 2;
int val=0;
volatile byte state = LOW;

void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(interruptPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE);
}

void loop() {
val=digitalRead(ledPin);
Serial.println(val);
digitalWrite(ledPin, state);
delay(1);
}

void blink() {
state = !state;
}


EXPLANATION OF CODE

this is the explanation of code which I used for interupt the hall sensor.

Result high digital value at Output.


pin12 of the board is used as an output pin which gates the input from hall sensor through magnet. When the board gates an input from the sensor, the blue light on the board glows and the status of the sensor changes, which is displayed on the serial monitor.

FINAL DEMO



Download all files from here