2.4 Secondary Microcontroller/ Remote Sensor:
The secondary unit which reads the temperature and humidity outside of the building needs a low power microcontroller since it will be powered by a portable power source. This power source could be either a battery or a solar power supply. This PIC will interface with the sensors and 802.15 XBee wireless chip. We have chosen to stick with the microcontroller chosen by the previous group PIC24F04KA201. This chip has 20 general purpose 16 bit flash microcontroller manufactured.
The series 1 secondary controller used a PIC24F04KA201 chip to control the outdoor temperature sensor. It connected to the main controller through an XBee chip along 802.15 IEEE protocol and powered itself using 2 AA batteries. The original printed circuit board contained several shorts. The original board will either be completely fixed and the new parts added or a new solution is to be found.
The secondary microcontroller/remote sensor is to be placed outside and send the outside temperature and humidity data to the main control unit to decide the most economical way to cool/heat the house depending on the desired temperature inside in relation to the outside temperature and humidity. The original device was planned to use a zigbee chip, which was soon phased out in favor of the more economical Xbee chip and it's protocol. Power was supplied to the system using batteries. The device was supposed to have a long sleep cycle in order to save battery life. The new device should be able to easily do all the above, and proved an option for wired connectivity (preferably through a twisted pair wire set) that could also provide power over ethernet. Solar power should also be at least considered for this outside unit.
The information for this microcontroller will be displayed in the following paragraphs of this section which includes the operation range, central processing unit, I/O, Analog to Digital Converter and other general characteristics.
2.4.1.1 Operating Range
The operation range of this microcontroller is to industry standard. Since this microcontroller requires a supply voltage, it has to be low powered. The microcontroller is going to be attached with the XBee devices and with the temperature and humidity sensor. These components themselves have to be low powered. The whole secondary unit will be battery powered and having the low power supply voltage is essential to our design specifications and to keep with the temperatures of -40°C and 85°C. The PIC24F04KA201 features new nanoWatt XLP (extreme Low Power) technology for the low power consumption that we desire.
-
Supply voltage 1.8 V – 3.6 V
-
nanoWatt XLP
-
-40°C - 85°C
The microcontroller contains power saving technology such as On-the-Fly Clock switching, Doze mode and Instruction-based power saving modes. The PIC24F devices have two special power saving modes, entered through the execution of a special PWRSAV instruction. The sleep mode halts all code execution; idle mode halts the CPU and code execution, but allows the peripheral modules to continue operation, such as the XBee and temperature/humidity sensor. The deep sleep mode stops clock operation, code execution and peripherals. It also freezes the I/O states and removes power to the SRAM Flash memory. A combination of all these methods will allow us to be effective in our power consumption.
2.4.1.2 CPU Characteristics
-
Up to 16 MIPS
-
C compiler optimized instruction set
-
Modified Harvard architecture
-
16-bit wide data path
-
4 Kbytes Flash Program Memory for storing and executing application code
-
512 Bytes RAM data memory
The microcontroller is capable of up to 16 MIPS (Millions of Instructions Per Second), which is the industry standard for a microcontroller of that size and power. We will be able to program the microcontroller in C which is ideal for our group since we are all acquainted with the C language. It will be responsible for taking in and distributing the data taken from the SHT21 sensor. The 16-bit wide data path will be sufficient for the processing of the temperature and humidity readings keeping enough accuracy. The processed information will then be passed along to the pic on the main control unit via the 802.15 XBee chip.
The internal flash program memory for any device is used to store and execute application code written by the designer. The 4 Kbytes of Flash memory will hold the programming code and allow the program to be modified by future teams. The memory is readable, writeable and erasable when operating at a threshold VDD of 1.8 V. 512 Bytes of RAM will allow us to run the low data RF module quickly and effectively without much delay.
This microcontroller also has 18 I/O pins that can be programmed to work with all the other devices that we are going to be using such as the sensors and XBee RF transceiver. Although this many input/output ports far surpasses our need, it is necessary as there will be future updates made to the system which would require more ports to connect more devices. It also has ADC modules to transfer input analog voltages into a digital number proportional to the input voltage and current.
2.4.1.3 I/O Characteristics
-
18 Input/Output (I/O) pins
-
Analog-to-Digital Converters
-
10-bit A/D Converter
-
9 Analog-to-Digital (ADC) input channels
The SPI module protocol will be used to interface the PIC with the Xbee wireless chip. We will use the I2C module protocol to interface the temperature and relative humidity with the microcontroller. This I2C module supports both master and slave modes of operation, useful for the sensor connection.
2.4.1.4 Three Serial Communication Peripheral
-
1 – SPI module
-
1 – I2C module
-
1 – UART module
2.4.1.5 Cost of the original unit
While the cost of the unit is not the basis of the entire judgment call of what to do, it should be significantly noted. The cost of the first secondary unit should be similar to the cost of us building on. We will be adding one additional connection if it is kept and changing the powering of the system. The individual parts and cost that were used to manufacture the original secondary control unit were compiles and listed as well as totaled in Table 4.
Product
|
Part Number
|
Manufacturer
|
Quantity
|
Unit Price
|
Subtotal
|
5VDCtoDC
2xAA Battery
|
vpack5aa2
|
bodhilabs.com
|
1
|
$10.95
|
$10.95
|
JST Vertical Connector
|
PRT-08613
|
SparkFun
|
1
|
$.95
|
$0.95
|
JST to Female Connector
|
PRT-08599
|
SparkFun
|
1
|
$1.50
|
$1.50
|
Voltage Regulator – 3.3V
|
COM-00526
|
SparkFun
|
1
|
$1.95
|
$1.95
|
XBee 1mW Chip Antenna
|
WRL-08664
|
SparkFun
|
1
|
$22.95
|
$45.90
|
2mm 10 pin XBee Socket
|
PRT-08272
|
SparkFun
|
2
|
$1.00
|
$2.00
|
RJ11 6Pin Conn.
|
PRT-00132
|
SparkFun
|
1
|
$1.25
|
$1.25
|
Break Away Headers-Straight
|
PRT-00116
|
SparkFun
|
1
|
$2.50
|
$2.50
|
Break Away Female Headers
|
PRT-00115
|
SparkFun
|
1
|
$1.50
|
$1.50
|
Jumper - 2 Pin
|
PRT-09044
|
SparkFun
|
1
|
$0.35
|
$0.35
|
Chip Resistor (10K Ω)
|
CRT0603-
|
Digikey
|
2
|
$0.16
|
$0.31
|
Ceramic Chip Capactior (10μF)
|
587-2562-1-ND
|
Digikey
|
1
|
$0.54
|
$0.54
|
Ceramic Chip Capacitors (.1μF)
|
490-1575-1-ND
|
Digikey
|
3
|
$0.02
|
$0.05
|
Pulse Proof, High Power Chip Resistors (470Ω)
|
541-47OSADKR-ND
|
Digikey
|
1
|
$0.88
|
$0.88
|
PIC24F04KA201 (surface mount)
|
PIC24F04KA201
|
Microchip Direct
|
1
|
$1.84
|
$1.84
|
Small PCB fab
|
(Eagle CAD Files)
|
4PCB.com
|
1
|
$33.00
|
$33.00
|
SHT-21 Humidty and Temperature
|
Liquidware.com
|
Liquidware.com
|
1
|
$39.93
|
$39.93
|
TOTAL
|
|
|
|
|
$145.40
|
Table Secondary Unit Cost
Texas Instruments makes EZ430-RF2500-SEH which is a wireless board with temperature reading capabilities and a solar panel. This device contains 18 analog and communication input/output pins to install a humidity sensor. The cost of this unit is $149.00, if the cost of a made remote PCB with solar panel exceeds this, a decision should be made.
There is a lot of confusion as in to the difference in Zigbee and Xbee. They are essentially the same thing, low power RF communications. Zigbee is a name brand that uses the Xbee style of RF transmission and adds a lot of end user functionality such as power monitoring. For the system we're using, it is accepted that Zigbee is extremely overkill for our system and the Xbee standard will suffice for our remote communication needs.
2.4.3 Wired Connection
While the main source of connectivity between the remote sensor unit and the main unit is via wireless, an option needs to be included for a possible wired connection. This needs to be done so that buildings with extremely thick walls can still have remote access, as well as the possible ability of power over ethernet.
An RJ-45 8 pin connector is available from Sparkfun for $1.50. This could either be added to the existing remote unit via the I/O lines or the TI Solar unit via its remaining I/O lines. Information can travel across the ethernet’s twisted pair lines and into the main unit via an installed connection there. The twisted pair CAT 5 over an Ethernet RJ45 connection is the most common us for data transmission in today’s computers. The twisted pair reduces or electromagnetic interference. Two inverted signals will be transmitted across two pairs of wires. Two sets of twisted pair cable will be devoted to data transmission. Each set will have one line dedicated to the actual data, and the other will have the inverted signal which will help eliminate unwanted noise, and allow the fast, reliable, and long distance data transfer. Data transmission can be as fast as 100Mbps with great accuracy of large distances. Figure 14 below is an inside image of a CAT – 5 twisted pair cable.
Figure CAT-5 UTP
(Image used under Creative Common licensing)
The use of the RJ-45 was also chosen over the existing RJ-11, another twisted pair technology, because IEEE 802.3at-2009 allows a power of ethernet up to 25 Watts. This technology could be used to power either system remotely, further making the need of batteries, and the sleeping code, less necessary.
If going with the main MicroChip PIC units, SparkFun makes PRT-08556 $23.95 to add power over ethernet and the DEV-08557 $69.95 That can decipher the signal from the power, power a pic processor, and allow internet connectivity. TI also offers a wide variety of power over ethernet options, some of which are much cheaper.
Share with your friends: |