User Tools

Site Tools


lab9

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lab9 [2018/01/25 18:57]
narcisa_ana.vasile [Host PC: collect-view]
lab9 [2018/01/25 19:00] (current)
narcisa_ana.vasile [Voltage]
Line 172: Line 172:
 ==== Button ==== ==== Button ====
  
-Contiki designates one button to be the 'button sensor', and hooks it up into the sensor framework. It just tells us whether the button is being pressed. The avr-zigduino platform expects a button connected to ground on Pin 7. This will show up as the 'button sensor'. The rpl-collect example for avr-zigduino puts the button sensor data on the 'battery indicator' page of the Collect View app.+Contiki designates one button to be the 'button sensor', and hooks it up into the sensor framework. It just tells us whether the button is being pressed. The rpl-collect example for sparrow puts the button sensor data on the 'battery indicator' page of the Collect View app.
  
 {{ ::687474703a2f2f6661726d372e7374617469632e666c69636b722e636f6d2f363133392f363033353538363838325f333266643331653865312e6a7067.jpg |}} {{ ::687474703a2f2f6661726d372e7374617469632e666c69636b722e636f6d2f363133392f363033353538363838325f333266643331653865312e6a7067.jpg |}}
 ==== Temperature ==== ==== Temperature ====
  
-The Atmega128RFA1 has an internal temperature sensor, so the avr-zigduino platform exposes a temperature sensor to read it, and collect-view will pick it up accordingly.+The Atmega128RFA1 has an internal temperature sensor, so the sparrow platform exposes a temperature sensor to read it, and collect-view will pick it up accordingly.
  
 {{ ::687474703a2f2f6661726d372e7374617469632e666c69636b722e636f6d2f363132352f363033373135333030315f303438666535336465342e6a7067.jpg |}} {{ ::687474703a2f2f6661726d372e7374617469632e666c69636b722e636f6d2f363132352f363033373135333030315f303438666535336465342e6a7067.jpg |}}
Line 183: Line 183:
 ==== Voltage ==== ==== Voltage ====
  
-It's interesting to know how the battery is doing. While there is a "battery monitor" feature of the chip, it's not useful in the Zigduino case, because it only monitors the power coming into the chip. The Zigduino has a regulator, so there is always a steady 3.3V coming in.+It's interesting to know how the battery is doing. While there is a "battery monitor" feature of the chip, it's not useful in the Sparrow case, because it only monitors the power coming into the chip. The Sparrow has a regulator, so there is always a steady 3.3V coming in.
  
 What we do instead is hook up the battery voltage to analog pin A1, and read that. The chip uses an internal reference voltage of 1.6, so we first have to divide down the battery voltage into a measurable range. I am using a voltage divider circuit with a 1M and 470k resistors, so when the ADC pin reads 1.6V, there is actually 5.0V coming in through the battery. Here is a simple schematic to explain: What we do instead is hook up the battery voltage to analog pin A1, and read that. The chip uses an internal reference voltage of 1.6, so we first have to divide down the battery voltage into a measurable range. I am using a voltage divider circuit with a 1M and 470k resistors, so when the ADC pin reads 1.6V, there is actually 5.0V coming in through the battery. Here is a simple schematic to explain:
lab9.1516899459.txt.gz · Last modified: 2018/01/25 18:57 by narcisa_ana.vasile