midon design 1WSwitch User Manual

midon design
A 1-Wire Serial Interface
1WSwitch
Figure 1 1WSwitch
1WSwitch User Guide Version 1.02
1WSwitch User Guide Version 1.02 Page 1 of 28
midon design
1. Table of Contents
1. Table of Contents ..........................................................................................2
1.1. List of Tables ..........................................................................................3
1.2. List of Figures .........................................................................................3
2. Introduction....................................................................................................4
3. Installation......................................................................................................6
4. Using 1WSwitch.............................................................................................7
5. Using 1-Wire Switch Sensors ........................................................................9
6. 1WSwitch Commands .................................................................................10
6.1. Using the SET Command ..................................................................... 12
6.2. The DIS Display Output ........................................................................ 13
6.2.1. DIS output explanations ................................................................13
6.3. Using the EEP and MEM Commands...................................................14
6.4. TMP Output Display .............................................................................14
6.5. Missing Sensor Display ........................................................................15
6.6. Options .................................................................................................16
6.6.1. On Board ADC Display (DAD).......................................................16
6.6.2. Once Per Minute Time Display (DTI)............................................. 16
6.6.3. Enable DS2408 Input Poll (EIN) ....................................................16
6.7. DS2408 Based Relay and LED Usage .................................................17
7. J5 Usage .....................................................................................................18
8. Software Change History.............................................................................20
8.1. Upgrading 1WSwitch Software .............................................................20
8.2. Upgrade Instructions ............................................................................20
9. Trouble-Shooting Problems with 1WSwitch ................................................. 22
10. Error Messages........................................................................................23
11. 1WSwitch Schematic ...............................................................................24
12. 1-Wire Sensors ........................................................................................25
13. Legal Disclaimer.......................................................................................28
1WSwitch User Guide Version 1.02 Page 2 of 28
midon design
1.1. List of Tables
Table 1 1WSwitch Command List .......................................................................10
Table 2 EIN Settings Recommended..................................................................17
Table 3 RJ-12 Pin-outs in use............................................................................. 18
Table 4 1WSwitch Software History....................................................................20
Table 5 Common 1WSwitch Problems and Resolutions.....................................22
Table 6 1WSwitch Error Messages.....................................................................23
Table 7 Reset Type Messages ...........................................................................23
Table 8 Midon Design – Available/Compatible Sensors .....................................26
1.2. List of Figures
Figure 1 1WSwitch................................................................................................1
Figure 2 Location of Connectors...........................................................................6
Figure 3 DS2405 or DS2406 Applications ............................................................9
Figure 4 Connector J5 RJ-12 Pin-out..................................................................18
Figure 5 1WSwitch Top View..............................................................................21
Figure 6 1WSwitch Schematic ............................................................................24
Figure 7 DS2405 Pinout......................................................................................25
Figure 8 DS2406 & DS2407 Pinout ....................................................................25
Figure 9 DS2408 Pinout......................................................................................26
Figure 10 DS2438 Pinout....................................................................................26
1WSwitch User Guide Version 1.02 Page 3 of 28
midon design
2. Introduction
Thank you for your purchase of the 1WSwitch 1-Wire Serial Interface. The following instructions will assist you in configuring and operating the product.
1WSwitch is a stand-alone 1-Wire interface providing standard serial commands to control the Dallas/Maxim 1-Wire bus and some specific devices used on it. Sensors can be polled on a regular basis (from 1 to 99 minutes), or manually interrogated.
In a typical application, 1WSwitch is connected to a serial port on a PC. Serial interface software is then used to gather the data received from 1WSwitch and process it. Users have interfaced 1WSwitch into the HomeSeer product, which can be used to automate lights, HVAC, sprinklers, and other devices, based on the sensor readings from 1WSwitch.
The 1WSwitch provides a serial interface for the following 1-Wire devices:
Multiple DS2438-based Voltage Sensors
Multiple DS2405 input/output sensors
Multiple DS2406 (or DS2407) input/output sensors
Up to 20 1WIO relay interface modules (or equivalent DS2408 based relay module)
available from Midon Design
Up to 10 1WIO LED modules (available from Midon Design)
One 1WIO Input module (available from Midon Design)
1WSwitch has the following features:
Real-time display of state changes for DS2405, DS2406 or DS2407 sensors
On-board voltage sensor.
Jumper-less provisioning - all configuration settings are stored in non-volatile memory
Up to 60 1-Wire are sensors supported
Simple instruction set with a Help prompt for recalling command names
Easy to delete sensors, if they are no longer required, using the DEL command
1-Wire bus errors are flagged when they occur
Continuous poll for ALL sensors - 1WSwitch will notify you when any switch sensor has
changed state or is connected or disconnected, providing that they have been previously registered by 1WSwitch via the INI command. Very useful for locating intermittent 1-Wire bus problems or for real-time polling of contact sensors.
1WSwitch User Guide Version 1.02 Page 4 of 28
midon design
Manual Poll of sensor readings. While 1WSwitch is normally used for continuous (from 1 to 99 minute intervals) polling of sensor readings, it can also be used manually to take sensor readings on command from the serial interface.
1WSwitch User Guide Version 1.02 Page 5 of 28
midon design
3. Installation
To complete this project, you will need to connect a 12 to 16 Volt (AC or DC) transformer to the terminal J1 (see Figure 2 for the location of J1). If you intend to power 1WIO relay units from the 12V output of 1WSwitch, the transformer needs to supply at least 350mA (250mA for 1WIO and 100mA for 1WSwitch) per 1WIO relay unit, up to a maximum of 800mA, or 2 1WIO relay units. Beyond that, supplemental powering will need to be provided for the off-board units. Otherwise, any 12 to 16 Volt adapter capable of at least 100mA will do.
If you are using a sensor network of 1-Wire devices, connect them now to either connector J3 or J5.
Figure 2 Location of Connectors
1WSwitch User Guide Version 1.02 Page 6 of 28
midon design
4. Using 1WSwitch
Connect up a straight-through serial cable between 1WSwitch's J4 connector and your PC. Open up HyperTerminal (or equivalent terminal emulator program) on your PC. Configure it to 9600 BPS, No parity, 8 bits, 1 start bit and NO hardware handshaking (very important!). Power up the 1WSwitch and configure the unit for the devices that you have connected.
The start-up sequence will look like this:
1WSwitch v1.01 2008-10-12 MidonDesign.com 2245 Reset type: C2
Poll interval = 255 minutes Serial # Display = On Time Display = On OnBoard ADC Display = On Enable INP = On Debug = On SUN 00:00:00 >
We recommend that you next use the ERA command for first time use, to erase the EEPROM. This will remove any previous information that may have been stored in the EEPROM. Next use the INI command to register any 1-Wire devices connected to the 1-Wire bus. If you get any error messages, it is most likely a result of a bad connection to the devices. Verify them. Typically, a "OW bus error" message indicates that a sensor has been installed in reverse, or that there is a short on the bus.
Note: an ERA command is not issued. It should only be required for first time use.
If you believe that 1WSwitch has not found all 1-Wire devices, re-issue the INI command.
Now program the configuration by using the SET command. Just type SET and the program will prompt you for the required settings; polling interval, display settings, and finally the real time clock setting.
>set Poll interval = 01 Serial # Display = on Time Display = off OnBoard ADC Display = on
required every time that an INI command is
1WSwitch User Guide Version 1.02 Page 7 of 28
midon design
Enable INP = off Debug = off Set Clock (d,h,m,s): 01,14,30,00
The options are further defined later in this manual. All are independently adjustable without using the SET command.
To verify that your setup is working properly, you could next use the TMP command to perform an immediate sensor reading. The output of the TMP command should look like the sample below (the exact output will depend on what type of sensors and how many you have installed).
SUN 14:30:44 Reading Sensors... Switch #01[C90000005F31C412]=On Switch #02[4A0000005F3A1512]=On Switch #05[170000002A345005]=On Switch #06[4F0000002A15C405]=On Switch #07[A60000002A30A405]=On Switch #08[620000002A1B9C05]=Off Switch #09[410000002A1A3A05]=On Switch #10[CC0000001FBD2605]=Off Switch #11[8F0000001FB60105]=Off Switch #12[E60000001FB82D05]=Off Switch #13[A20000001FB6C705]=Off Switch #14[290000005F365412]=Off J2 Pin 3 Voltage = 00.40V >
It is highly recommended that you next turn off (or on) all the connected switches. This will reset the saved state in the EEPROM, which may not match the physical configuration – the state of all switch sensors is normally preserved through a power cycle. Use the ONA or OFA command for all DS2406’s (or DS2407) and the TOG command for DS2405’s.
If there are no apparent errors, you are ready to use 1WSwitch. Enjoy!
1WSwitch User Guide Version 1.02 Page 8 of 28
midon design
5. Using 1-Wire Switch Sensors
Figure 3 DS2405 or DS2406 Applications
Figure 3 shows some of the ways in which DS2405 or DS2406 1-Wire sensors can be connected to external devices. The PIO pin on the 1-Wire device can be used as either an input or as an output. When used as an input, make sure that you set the 1-Wire sensor to the off state, otherwise the PIO input changes will not be visible to the device.
When properly connected as a switch input, 1WSwitch will show state changes whenever they occur, for example:
FRI 08:11:10 Switch #01[C90000005F31C412]=On > FRI 08:11:12 Switch #01[C90000005F31C412]=Off > FRI 08:11:17 Switch #01[C90000005F31C412]=On
Note that “On” means that the DS2405/6/7 PIO output is at ground voltage level. Thus, in the applications shown in Figure 3, “On” would mean that switch SW1 is closed, or LED DS1 is lit, or relay RLY1 is activated.
1WSwitch User Guide Version 1.02 Page 9 of 28
Loading...
+ 19 hidden pages