File:  [NetBSD Developer Wiki] / wikisrc / users / mbalmer / sensors.mdwn
Revision 1.5: download - view: text, annotated - select for diffs
Wed Dec 30 10:23:58 2009 UTC (11 years, 11 months ago) by mbalmer
Branches: MAIN
CVS tags: HEAD
links as list.

    1: [[!meta title="Playing With Sensors"]]
    2: 
    3: (Notes from a little Workshop during HAR 2009)
    4: 
    5: 
    6: * <b>GPIO</b>: LEDs, Switches, Multi-position keylocks,
    7: receiving the german DCF77 time signal station (maybe),
    8: using GPIO pins to build a 1-Wire bus
    9: * <b>1-Wire bus</b>: Digital thermometers
   10: 
   11: # Hardware Notes
   12: 
   13: ## Soekris net4801 GPIO pins wrong in manual
   14: 
   15: The GPIO Pins in the Soekris net4801 manual are utterly wrong
   16: (at least there is a manual, unlike for the net5501, although
   17: one with many errors...).
   18: 
   19: <table border="1">
   20: <tr>
   21: <td>JP5 Pin</td><td>PC87366 Pin</td><td>JP5 Pin</td><td>PC87366 Pin</td><td>JP5 Pin</td><td>PC87366 Pin</td><td>JP5 Pin</td><td>C87366 Pin</td></tr>
   22: <tr><td>3</td><td>GPIO16</td><td>4</td><td>GPIO17</td><td>5</td><td>GPIO18</td><td>6</td><td>GPIO19</td></tr>
   23: <tr><td>7</td><td>GPIO20</td><td>8</td><td>GPIO21</td><td>9</td><td>GPIO22</td><td>10</td><td>GPIO23</td></tr>
   24: </table>
   25: 
   26: ## Connecting a LCD module to the 4801 JP5
   27: 
   28: This example assumes a DIP162 module.
   29: 
   30: <pre>
   31: LCD	4801		Function			PC87366 Pin
   32: 
   33: 1	11		GND
   34: 2	2		VCC
   35: 3	nc		VEE (Kontrast)
   36: 4	12		RS, GPIO8			GPIO4
   37: 5	13		RW, GPIO9			GPIO5
   38: 6	15		Enable, GPIO10			GPIO13
   39: 7	3		D0 Display Data LSB, GPIO0	GPIO16
   40: 8	4		D1, GPIO1			GPIO17
   41: 9	5		D2, GPIO2			GPIO18
   42: 10	6		D3, GPIO3			GPIO19
   43: 11	7		D4, GPIO4			GPIO20
   44: 12	8		D5, GPIO5			GPIO21
   45: 13	9		D6, GPIO6			GPIO22
   46: 14	10		D7, GPIO7			GPIO23
   47: 15	nc
   48: 16	nc
   49: 17	nc		LED+
   50: 18	nc		LED-
   51: </pre>
   52: 
   53: ## Connecting a DS18B20 to Soekris 5501 JP5
   54: 
   55: <pre>
   56:                           __________
   57:                          |          |
   58:                          | DS18B20  |
   59:        Vin               -----------
   60:           |              1|  2|   3|
   61:           |               |   |    |
   62:           _               o---|----|
   63:          | |              |   |
   64:       4k7|_|            GND   |
   65:           |                   |
   66:           |                   |
   67: uC -------o--------------------
   68: 
   69: 
   70: 2      = DQ   ----->   Pin X / GPIO x
   71: 1      = GND  ----->   Pin 20
   72: 3      = Vdd           GND when using parasite power
   73: Vin    = 5V   ----->   Pin 2
   74: </pre>
   75: 
   76: # External References
   77: 
   78: ## In english
   79: 
   80: * [1-Wire Communication Through Software](http://www.maxim-ic.com/appnotes.cfm/appnote_number/126)
   81: * [1-Wire File System](http://owfs.org/)
   82: * [1-Wire Bus Wikipedia Entry](http://en.wikipedia.org/wiki/1-Wire)
   83: 
   84: ## In german
   85: 
   86: * [1-Wire Bus System](http://www.ip-symcon.de/wiki/index.php/1Wire-Bus-System)
   87: * [1-Wire Bus Wikipedia Entry](http://de.wikipedia.org/wiki/1-Wire)

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb