SWE4 Software

The SWE4 module is intended to work with OWFS but may well also work with other software that supports the DS2413. Please let us know if you find other software it works with and we'll update this page.

If you only intend to use your SWE4 for inputs or active low outputs then it will work in parasitic power mode. If you are using the active high outputs then you will need to ensure the module has a 5V feed. If you are using one our RPI2 or RPI3 host adapters this will provide the power required, if not you could consider using one of our SWE5 power injector modules to provide it.

The pins A1 and B1 are directly connected to the DS2413 and can be used either as a switched input or active low output (20mA max). The pins A2 and B2 are fed from this output via a PNP transistor to provide a 5V active high output which can supply up to about 500mA if there is sufficient power available on your 1-Wire network.

To use an SWE4 channel as an input you need to use the GND terminal and terminal 1 of the channel you are using (i.e. A1 or B1). You can read the status of the input in OWFS as follows:
Input pin not connected to anything: pi@raspberry:~$ owread 3A.8F8306000000/sensed.A
1
pi@raspberry:~$
Input pin connected to GND: pi@raspberry:~$ owread 3A.8F8306000000/sensed.A
0
pi@raspberry:~$
If you want to use the inputs to sense voltage you will need to use a relay or opto-isolator of some kind to connect your external device to your SWE4.

To use an SWE4 channel as an active low output use the A1 or B1 connection and the following commands:
pi@raspberry:~$ owwrite 3A.8F8306000000/PIO.A 1
pi@raspberry:~$
Terminal A1 is pulled down to GND.
pi@raspberry:~$ owwrite 3A.8F8306000000/PIO.A 0
pi@raspberry:~$
Terminal A1 is pulled up to around 5V by R1
Please note that this should only be used for a maximum load of 20mA or you will damage the DS2413 on your SWE4.

To use an SWE4 channel as a 5V output connect your 5V device between pin A2 (or B2) and GND and use the following commands:
pi@raspberry:~$ owwrite 3A.8F8306000000/PIO.A 1
pi@raspberry:~$
Terminal A2 is pulled up to 5V by Q1.
pi@raspberry:~$ owwrite 3A.8F8306000000/PIO.A 0
pi@raspberry:~$
Terminal A2 is left floating (Q1 turned off).
The transistors used on the SWE4 can handle 500mA and so as long as the 5V supply to your SWE4 is capable of enough power you can switch up to this level with these outputs. If you wish to increase the amount of power available then you can use one of our SWE5 power injector modules. The A2 and B2 outputs are diode protected and so you can direcly connect a 5V relay if you wish without needing an external protection diode.

If you're wishing to use the SWE4 with the Relay Module we sell then we recommend you connect the "GND" and "IN" pins on the relay module to the GND pin on your SWE4 and the "VCC" pin on the relay module to the A2 or B2 pin on your SWE4. This will then turn the relay on when you write "1" to either PIO.A or PIO.B as above. See this image. for a photo of two relay modules connected to an SWE4.

Back to SWE4 Shop Page
Quick Find
 
Use keywords to find the product you are looking for.
Advanced Search
0 items