Changes RSS

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

Link to this comparison view

projects:tempdude [2009/12/31 21:45]
fishy
projects:tempdude [2010/02/03 22:34] (current)
fishy
Line 21: Line 21:
   * based on "reference architecture" components   * based on "reference architecture" components
   * lightweight data storage; RRD or SQLite most probable.   * lightweight data storage; RRD or SQLite most probable.
- 
- 
 ===== System architecture ===== ===== System architecture =====
  
Line 37: Line 35:
  
 The software platform is to be based on the Microchip TCP/IP stack on the device. The first edition of the server-side software will be a simple TCP server written for GNU/Linux. The software platform is to be based on the Microchip TCP/IP stack on the device. The first edition of the server-side software will be a simple TCP server written for GNU/Linux.
 +
 +==== Firmware releases ====
 +
 +The firmware code is heavily limited by the fact that it is limited my Microchip's licensing. This means, you may
 +only "use, modify, copy and distribute" the Microchip code "when embedded on a Microchip microcontroller [...]".
 +My code however, you are free to use under a four-clause BSD license, as long as you filter the Microchip
 +code away :P
 +
 +Firmware version 1.0 is available! 
 +  * Want to hack, or add it to your own PIC-MINI-WEB?: {{:projects:tempdude-firmware-1.0.zip}}
 +  * A known bug exists: the destination port number is fixed at 13579. Config does work for IP but not port.
 +
 ==== System configuration operation ==== ==== System configuration operation ====
  
Line 76: Line 86:
  
 Note that the device times out waiting for config after 30 seconds. Note that the device times out waiting for config after 30 seconds.
 +
 +Download of UDPSet versions:
 +  * {{:projects:tempdude-udpset-0.2.tar.gz}}
 +==== LEMP1 ====
 +
 +Writeup of the LEMP1 protocol is still a todo. BUT, a software-based reference implementation exists
 +as tempsend.c, available here: {{:projects:tempsend.c.txt}}
 +
 +Compile tempsend using e.g.
 +
 +  gcc tempsend.c -o tempsend
 +
 +Command syntax for tempsend is:
 +<code>
 +  -s <ip of LEMP server>
 +  
 +  -p <portnumber of LEMP server>
 +  
 +  -i <node id>
 +      Node ID is five bytes, written as hexadecimal digits.
 +      Software Node ID _should_ start with 01, and the last
 +      byte should be a sensor index. i.e. 01 for a single sensor system.
 +      Example of valid Node ID string: 0100FF0201
 +   
 +  -v <value as float>
 +      The value is parsed from string to double, and should be
 +      within the range 155.0 to -55.0
 +</code> 
 +
 +To give an example command, let's send -14.5 degrees centigrade to a LEMP1 server
 +running at 10.0.3.4 port 13579 (default port) using 0x0102030401 as sensor id:
 +
 +  tempsend -s 10.0.3.4 -p 13579 -i 0102030401 -v -14.5
 +
 +A node about sensor ID's: ID's are typically locally significant to the LEMP server
 +you are reporting to, but the following guideline should be followed:
 +
 +  * The sensor ID is to be built up of
 +    * one byte manufacturer ID, using 0x01 for software agents.
 +    * Three bytes Node ID
 +    * One byte sensor index
 +  * The first byte should always be 0x01 for software sensors.
 +  * The next three bytes should be locally unique for each monitoring station
 +  * The last byte should be a sensor index for sensors attached to the monitoring station.
 +
 +So, having a monitoring station with five sensors, reporting using software agent, the sensor
 +ID's can be something like
 +
 +  0100FF0201
 +  0100FF0202
 +  0100FF0203
 +  0100FF0204
 +  0100FF0205
 +
 +where 00FF02 is the "unique" Node ID.
 ===== Development roadmap ===== ===== Development roadmap =====
  
Line 81: Line 146:
  
   * **done** Get hardware   * **done** Get hardware
-    * PIC-MINI-WEB http://www.sparkfun.com/commerce/product_info.php?products_id=7829 +    * **bought** PIC-MINI-WEB http://www.sparkfun.com/commerce/product_info.php?products_id=7829 
-    * PIC-PG1 http://www.sparkfun.com/commerce/product_info.php?products_id=9+    * **bought** PIC-PG1 http://www.sparkfun.com/commerce/product_info.php?products_id=9 
 +      * Did not need this one..
     * PIC-ICSP http://www.sparkfun.com/commerce/product_info.php?products_id=8108     * PIC-ICSP http://www.sparkfun.com/commerce/product_info.php?products_id=8108
-    * Microlab IDC2 http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010046 +      * Not compatible :( 
-    * DS18B20 tempsensor http://www.sparkfun.com/commerce/product_info.php?products_id=245+    * **borrowed** Microlab IDC2 http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010046 
 +    * **bought** PIC-ICD2 http://olimex.com/dev/pic-icd2.html 
 +    * **boughtx4** DS18B20 tempsensor http://www.sparkfun.com/commerce/product_info.php?products_id=245
  
   * **done** Get development software for the Microchip-side of development   * **done** Get development software for the Microchip-side of development
-    * Microchip MPLAB IDE http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002  +    * **v7.6** Microchip MPLAB IDE http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002  
-    * compilers from Microchip.+    * **MC18** compilers from Microchip.
  
-  * **done** Get fammiliar with hardware and development platform+  * **done** Get familiar with hardware and development platform
   * **done** Reprogram the device with stock program- and flash content   * **done** Reprogram the device with stock program- and flash content
   * **done** Remove unwanted components from program. Test programming of stripped code.   * **done** Remove unwanted components from program. Test programming of stripped code.
Line 100: Line 168:
   * **done** Implement reading of multiple sensors   * **done** Implement reading of multiple sensors
   * **done** Verify that reload of stock software works   * **done** Verify that reload of stock software works
-  * Figure out how to read/write EEPROM, store and retrieve data on EEPROM +  * **done** Figure out how to read/write EEPROM, store and retrieve data on EEPROM 
-  * Verify that reload of stock software works+  * **done** Verify that reload of stock software works
   * Implement LEMP1 server with data storage.   * Implement LEMP1 server with data storage.
- +    * WIP: Has proof of concept running, C-code dumping to file, perl-code dumping file to db 
-===== Progress =====+  * Design interface/connector-board 
 +  * Build and QA interface-board 
 +  * Create encapsulation for the device.