Arduino UNO |
Sunday, 24 February 2013
Arduino UNO
XBEE Shield
Board, Arduino, XBEE Shield, w/o module |
XBEE Module
XB24-BWIT-004 module, ZIGBEE XBEE ZNET 2.5 |
Friday, 15 February 2013
15th Feb 2013
New Software Used:
- X-CTU Software (www.digi.com/support/productdetail?pid=3352)
First up, we would like to connect the Xbee module to the PC. mount the Xbee module onto the Xbee Shield and the Xbee Shield to the Aduino UNO. Take precaution that you will need to remove the ATmega328 from the Arduino UNO. Best advice is to use a screwdriver and slowly pry it off the device. Next, make sure the 2-pin caps on the Xbee Shield are capping the USB side of the 2 out of the 3 pins. Now comes the part where one module receives while the other transmits.
On the X-CTU, under the 'PC settings' tab, set the Baud, Flow Control, Data Bits, Parity and Stop Bits similar to the settings on COM5 (The COM which your Arduino is connected to). Click the 'Test/Query' to see if the componens can communicate and are linked. Sometimes, the outcome would fail. So make sure to check the ATmega328 is out, the caps are capping the right pins, all connections are connected properly and for safe measure, press the 'reset' button on the Arduino UNO. Once successful, click the 'Modem Configuration' tab and under the 'Modem Parameter & Firmware', click 'read'. This will all the XCTU to read what modem is being used currently. Ours would be XB24-B.
Set the 'Function Set' to Coordinator for one of the module and Router/End Device for the other. Here, we are free to change the network settings to however we see fit.
Saturday, 9 February 2013
Codes
prototype number 1 |
[ADC stands for Analog to Digital Converter]
Therefore we have to use a formula. Since we know the total Voltage,(Vt), (ADC total) = 1024, and (ADC calculated) which is the reading provided in analog A0. We can find the numerical calculated voltage reading.
As the temperature sensor has a breakdown voltage directly proportional to absolute temperature at +10mV/K, with the voltage reading, we can find out the temperature in Kelvin.
Converting from Kelvin to Celsius, we need to minus 273.15
Hence the code we uploaded into the Arduino software to calculate this reading is as shown below;
float tempK=0, tempC=0, tempF=0;
void setup(){
Serial.begin(9600); //Setup serial to 9600 bps
}
void loop(){
float reading = analogRead(A0) * 5.0; //Where 5V and the Analog (ADC) input
reading /= 1024.0; // is used to determine the voltage reading
tempK = reading * 100; //Read temperature in Kelvins first
tempC = tempK - 273.15; //Convert from Kelvin to Celsius
tempF = ((tempK) * 9 / 5) - 459.67; //Convert from Kelvin to Fahrenheit
//Print all the values to Serial
Serial.print("Voltage: "); //Print the reading of the voltage
Serial.println(reading); //on Serial Monitor
Serial.println();
Serial.print("Kelvin: "); //Print the reading of the temperature
Serial.println(tempK); //in Kelvin on Serial Monitor
Serial.print("Celsius: "); //Print the reading of the temperature
Serial.println(tempC); //in Celsius on Serial Monitor
Serial.print("Fahrenheit: "); //Print the reading of the temperature
Serial.println(tempF); //in Fahrenheit on Serial Monitor
Serial.println(); //Print Blank Line
delay(3000); //Delay 1.5 second
}
Friday, 8 February 2013
8th Feb 2013
Actual Component List;
- LM335AZ: IC, Temp Sensor, Precision, T092
- 2x A000021: Board, Arduino, XBEE Shield, w/o module
- 2x XB24-BWIT-004 module, ZIGBEE XBEE ZNET 2.5
- 2x Arduino UNO
- 2x 1k ohm
- Personal Laptop
- A-B USB Cable
- Arduino Software (www.arduino.cc/en/Main/Software)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
Searching the web for solutions to the problem, it turns out all we had to do was disconnect and connect back the cable.
Next, we added the LM335AZ to the circuit. Followed the Basic Temperature sensor diagram on the LM335AZ datasheet. On the Arduino software, what needed to be shown was the temperature taken from the LM335AZ which could be in Celsius, Kelvin or Fahrenheit. Future updates soon.
Friday, 1 February 2013
1st Feb 2013
The components arrived today, which was
- 2x LM335AZ (A Board Mount Temperature Sensors with precision, 1 Deg Cel)
- 2x XBee Module
- 2x XBee Shield
- 2x Arduino UNO
The plan would be to set up this blog and as well as to carry on with the project.
For today, we tested the connection between the Arduino UNO with the PC. We somehow needed an A - B USB Cable to connect the component to the lab PC. Downloaded the Arduino Software to the computer and proceeded to connect the component to the PC. Not a while later we seem to have hit a wall. The PC could not read the device which was the Arduino UNO, therefore we searched online to find a solution to bypass this problem. While searching we read up more on our temperature sensor and on how to connect/ mount the component on the device.
Turns out, using the lab PC was not an option. Due to being limited the full access of the computer, we could not continue on our search to at least allow any communication between the PC and the Arduino UNO. It was later decided that we brought out laptop along next week to try out once again. As for today, we mainly figured out how to connect the temperature sensor to the Arduino and what codes to use that could be written on the Arduino Software.
Till next time.
Subscribe to:
Posts (Atom)