midon design A 1-Wire Serial Interface 1WSwitch Figure 1 1WSwitch 1WSwitch User Guide Version 1.02 November 18, 2008 1WSwitch User Guide Version 1.
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.......
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...........
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.
• 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.
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.
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.
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...
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.
midon design 6.
midon design Syntax Command Description MEM Display and change specific memory locations MEM ONA Turn ON a DS2406 or DS2407 (channel A only) ONA Where xx is a decimal number corresponding to the DS2406/7 sensor number as shown in the DIS display OFA Turn OFF a DS2406 or DS2407 (channel A only) OFA Where is a decimal number corresponding to the DS2406/7 sensor number as shown in the DIS display RLY Actuate a specific 1WIO relay RLY
midon design Command Description Syntax on to off or from off to on number corresponding to the DS2405 sensor number as shown in the DIS display VER Displays the current version of the software loaded VER ZZZ Performs a soft reset of 1WSwitch ZZZ Notes 1. The parameter in the commands above refers to the sensor number as shown via the DIS command. Leading zeros are required. See the DIS command explanation below. 2.
midon design OnBoard ADC Display Set this to On if you want 1WSwitch to display the output from the onboard Analog to Digital Converter connected to pin 3 of J2 and referenced to ground on pin 4 of J2. Use the DAD command to adjust only this parameter. Debug Set this to On only if requested to by Midon Design in case troubleshooting details are required. Otherwise, your display will be corrupted with outputs that are meaningless. Use the DEB command to adjust only this parameter.
midon design serial number, which is programmed into the sensor at the factory, followed by the CRC check status and presence status. An OK will be displayed following the Sensor ID to indicate that the Cyclic Redundancy Counter (CRC) checksum of the sensor's serial number is good. If the serial number has a bad CRC, an NG will be displayed. The checksum is validated during the output of the sensor display. Following the CRC status, a P or M will be displayed to show the connectivity of the sensor.
midon design FRI 08:10:41 Reading Sensors... Switch #01[C90000005F31C412]=Off Switch #02[4A0000005F3A1512]=On Switch #05[170000002A345005]=Off Switch #06[4F0000002A15C405]=On Switch #07[A60000002A30A405]=Off Switch #08[620000002A1B9C05]=Off Switch #09[410000002A1A3A05]=On Switch #10[CC0000001FBD2605]=Off Switch #11[8F0000001FB60105]=Off Switch #12[E60000001FB82D05]=Off Switch #13[A20000001FB6C705]=On Switch #14[290000005F365412]=On J2 Pin 3 Voltage = 00.42V Voltage #16[3D0000004CC69826]=01.89V 05.
midon design Polling of sensors is done sequentially and very fast (milliseconds per sensor). The more sensors that are equipped, however, the more time it will take for 1WSwitch to recognize a missing or re-added sensor. 6.6. 6.6.1. Options On Board ADC Display (DAD) The DAD (Display A to D) option is to enable or disable the on-chip voltage sensor (Analog to Digital Converter, or ADC). The command DAD on enables the display and DAD off disables the display.
midon design The EIN (Enable INput) option enables or disables a regular poll of one DS2408 connected on the 1-Wire bus, the one with the lowest sensorid. Setting EIN off is generally only required for users of MD2088 LED displays, which uses a DS2408 to drive the LED’s, since the normal poll of a DS2408 will set the high order bits (4 to 7) of the DS2408 and corrupt the LED display for those bits.
midon design 7. J5 Usage J5 is an RJ-12 connector, which is equivalent to a phone connector, except that it has 6 pins instead of just 4 (or 2). J5 is connected to the One Wire bus and can be used for adding connectivity to One Wire busses configured for RJ-11/12 connection. The pin-out of the J5 connector is shown in Figure 4. Figure 4 Connector J5 RJ-12 Pin-out Pin 1 is derived from the power supply feeding 1WSwitch. It is DC rectified, so it will not matter if your power supply is AC only.
midon design Device Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 DC Supply +5VDC DQ GND N/C N/C Simon Atkins’ Hub (shown for reference only.
midon design 8. Software Change History Table 4 1WSwitch Software History Version Date Major Changes from Previous Loads 1.02 11/17/2008 • Minor glitch in INI command • Added “Found…” message to INI output 1.01 10/12/2008 • Final production version of software 8.1. Upgrading 1WSwitch Software Midon Design strives to continue to add value to the 1WSwitch product and, as a result, we release new features to the 1WSwitch software from time to time. Upgrading 1WSwitch is easy.
midon design The following figure shows the location for installing the new processor, U1. Figure 5 1WSwitch Top View 1WSwitch User Guide Version 1.
midon design 9. Trouble-Shooting Problems with 1WSwitch The most common problems associated with using 1WSwitch are listed in the following table. If these instructions do not result in better results with your 1WSwitch, please feel free to contact Midon Design at support@midondesign.com. We would be more than happy to assist you.
midon design 10. Error Messages Table 6 1WSwitch Error Messages Message Description ? Entry error You have made a syntax error in entering a command or a parameter You tried to add more than 60 1-wire devices via the INI command. 1WSwitch has sufficient memory for only 60 unique 1-Wire device ID’s. 1WSwitch could not communicate to the device that you were trying to access. Check your 1-Wire bus wiring, or make sure that you are specifying the correct sensor number.
midon design 11. 1WSwitch Schematic Figure 6 1WSwitch Schematic Figure 6 shows all components as equipped on a 1WSwitch. The PCB also has mounting connections for an optional DS2438 that can be used as a voltage sensor for external voltages (from zero to 5Volts) through the AIN connection on J3. 1WSwitch User Guide Version 1.
midon design 12. 1-Wire Sensors Figure 7 DS2405 Pinout Figure 8 DS2406 & DS2407 Pinout 1WSwitch User Guide Version 1.
midon design Figure 9 DS2408 Pinout Figure 10 DS2438 Pinout Table 8 Midon Design – Available/Compatible Sensors Midon Part Number MD3014 MD3023 MD2083 MD2084 MD2088 MD3020E Description DS2405 Switch Sensor DS2406 Switch Sensor 1WIO 4 Relay Output 1WIO 4 Input 1WIO 8 LED Output Humidity Sensor (humidity will display as voltages only) 1WSwitch User Guide Version 1.
midon design MD3020G MD3020H 1 Relay Output 1 LED output 1WSwitch User Guide Version 1.
midon design 13. Legal Disclaimer YOUR USE OF THIS PRODUCT IS AT YOUR OWN RISK. YOU ASSUME FULL RESPONSIBILITY AND RISK OF LOSS RESULTING FROM THE USE OF THIS PRODUCT. MIDON DESIGN WILL NOT BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL OR PUNITIVE DAMAGES OR ANY OTHER DAMAGES WHATSOEVER, WHETHER IN AN ACTION BASED UPON A STATUTE, CONTRACT, TORT (INCLUDING, WITHOUT LIMITATION NEGLIGENCE) OR OTHERWISE, RELATING TO THE USE OF THIS PRODUCT.