Download Wireless Pulse Counter 2

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Current source wikipedia , lookup

Alternating current wikipedia , lookup

Voltage optimisation wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Mains electricity wikipedia , lookup

Buck converter wikipedia , lookup

Two-port network wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Chirp compression wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Schmitt trigger wikipedia , lookup

Time-to-digital converter wikipedia , lookup

Radar signal characteristics wikipedia , lookup

Opto-isolator wikipedia , lookup

Transcript
foogadgets Wireless Pulse Counter 2
Manual Wireless Pulse Counter 2
Rev.1 1 foogadgets Overview Changelog Input details Powering the WPC2 The Pulse Input port Blinking LED LED­Pulse detector from m.nu S0 output Reflection detector/Reflex detector Reed switch Temperature/Humidity sensor input Supported sensors Output Advanced 1­WireⓇ device input Supported 1­WireⓇ devices Output Advanced Specification Add­on Appendix Resistor color mapping Firmware reconfiguration Changing WPC2 firmware configuration parameters Wireless Pulse Counter 2
Rev.1 2 foogadgets Overview
The Wireless Pulse Counter 2 (from now on WPC2) is a device that can be used to measure Energy/Gas/Water consumption etc. The WPC2 use the 433MHz frequency band to transmit pulse sensor readings over the air. It is compatible with RFXtrx433(E) transceiver and transmit using the RFXMeter protocol. If more counters are needed, it is possible to add an external counter so that 3 pulse sources in total can be monitored. It is possible to add a Temperature/Humidity sensor module (DHT22) to also measure the Temperature and Humidity. Wireless Pulse Counter 2
Rev.1 3 foogadgets The WPC2 have 3 inputs. ❏ Pulse input: Blink detection, Rotating disk detection etc. Ⓡ​
Ⓡ​
❏ 1­Wire​
bus: The WPC2 support one 1­wire​
dual counter DS2423. ❏ Temperature and Humidity input: The WPC2 supports 1 temperature and humidity sensor (DHT22 or similar) Changelog
Rev.1 ● First WPC2 revision. Wireless Pulse Counter 2
Rev.1 4 foogadgets Input details
Powering the WPC2
The WPC2 can be powered in several ways. The most convenient way is through the micro USB port. An alternative way is to solder cables to the soldering points to the right of the screw terminals. A third option is to use any of the screw terminal points. See the chapter ​
Specification​
for details regarding voltage levels. Wireless Pulse Counter 2
Rev.1 5 foogadgets The Pulse Input port
This is a general event input (marked IN on the PCB) that can be used with a sensor that is capable of outputting some kind of on/off signal (0V to 5V), or capable of acting as a on/off switch1. The amount of detected pulses is transmitted to the RFXtrx433(E). The WPC2 counts +1 on every signal that goes from 0 to 5V (positive transition). Here follows some examples of how to connect the WPC2 to measure different pulse sources. The resistor names, values and color coding can be found in the ​
Appendix​
. Blinking LED
If you have an Electricity meter with a blinking LED, you connect the blink sensor between (+) and (IN) and resistor (R3 or R4) between (IN) and (­). Blink sensor and Resistor is included. Use the (R4) 220k resistor for high sensitivity. This is the default resistor. Use the (R3) 100k resistor to make it less sensitive. The Blink sensor need correct orientation to function and should be connected as in the picture below, with the leg close to the flat side of the detector connected to (+). 1
​
Care have to be taken with mechanical switches since they bounce for a very short while (1­5ms) after state change. This will be seen as multiple pulse detections when expecting only one. Wireless Pulse Counter 2
Rev.1 6 foogadgets LED-Pulse detector from m.nu
If you have a ​
LED­Pulse detector from m.nu​
, you can connect it to the WPC2. See the connection guide ​
here​
. Note! No resistor is needed. Wireless Pulse Counter 2
Rev.1 7 foogadgets S0 output
If you have an Electricity meter where the S0 output is accessible, it is the prefered connection over the blinking LED since the reading is electrical and not light based. The resistor R1 is included (330Ohm). It limits the current to about 15mA. Wireless Pulse Counter 2
Rev.1 8 foogadgets Reflection detector/Reflex detector
In some old Electricity meters or Gas meters there is a rotating disk with a small black marker on the circumference. This can be detected with a reflection detector that can be bought very cheap at ebay.com. I recommend the ​
TCRT5000​
based module. Connect according to the table below. Note! No resistor is needed. TCRT5000 WPC2 DO ⇔ (IN) GND ⇔ (­) Vcc ⇔ (+) Reed switch
Some Water meters or Gas meters have a rotating magnet placed on a spinning disk. Disk rotation can be detected with a reed switch. Reed switches tend to be very ​
bouncy​
, and care need to be taken so that one supposed pulse is not detected as several pulses. It is recommended to use an debouncing circuit to make sure to avoid bounces. Wireless Pulse Counter 2
Rev.1 9 foogadgets Temperature/Humidity sensor input
It is optional to add a temperature and humidity sensor to the WPC2. The WPC2 supports the DHT22 sensor. The DHT22 sensor comes in different packages and have different names. AM2302 is a wired version of the DHT22. ​
RHT03​
is another name of the DHT22. This sensor can according to the specification, be connected with a cable up to 100m. Supported sensors
❏ DHT22 ❏ AM2302 ❏ RHT03 Output
Detected as a Fineoffset temperature/humidity sensor. The Hideki­protocol need to be activated on the RFXtrx433(E) transceiver. Advanced
The Sensor Identification code can be altered by changing EEPROM address 0x04. Wireless Pulse Counter 2
Rev.1 10 foogadgets 1-WireⓇ​
​device input
Ⓡ​
The WPC2 supports the 1­Wire​
Dual Channel Counter (DS2423) from maxim integrated​
. By TM​
Ⓡ​
connecting an external Counter to the 1­wire​ input you add another 2 counters to the WPC2. NOTE!​
Parasite mode is not supported. Ⓡ​
Supported 1-Wire​
devices
❏ DS2423 Ⓡ​
If you find a sensor module that is based on the above 1­wire​
device, it is compatible with the WPC2. Output
The WPC2 will send the counter data as an RFXMeter sensor from RFXCOM.com. The default RFXMeterID is 2 for channel A and 3 for Channel B. Advanced
The RFXMeterID (Channel A) can be altered by changing EEPROM address 0x03. Wireless Pulse Counter 2
Rev.1 11 foogadgets There will be 2 consecutive RFXMeterID:s generated to present each Channel output. Wireless Pulse Counter 2
Rev.1 12 foogadgets Specification
Voltage:
Min 2.3V ­ Max 5.5V (Sensor dependent. See Table 1) To make it simple: ​
5V will always work. i.e. USB standard. Input connectors:
Micro USB, Screw terminals, soldering pads for (DHT22) Frequency:
433 MHz, OOK Protocols:
Improved ​
Fineoffset​
including CRC­protected data and ​
RFXCOM Supported transceivers: RFXtrx433(E) RF power:
13 [email protected], 15 dBmW@3V, 20 dBmW@5V 20 dBmW is equal to 100 mW Sensor Min Voltage Max Voltage DHT22 / AM2302 / RHT03 3.3V 5.5V DS2423 2.8V 5.5V Table 1 Example1. WPC2 + DS2423 Minimum voltage for WPC2 is 2.3, but minimum voltage for the DS2423 is 2.8V. Thus the Voltage need to be at least 2.8Volts. The maximum Voltage is limited to 5.5V for both WPC2 and the DS2423. Example2. WPC2 + DHT22 + S0 input. Minimum voltage is decided by the DHT22 since it has the highest minimum voltage 3.3V. The Maximum Voltage is limited to 5.5V for both WPC2 and DHT22. Add-on
Box from ​
Hammond manufacturing​
(Part.no.1551GBK) is a perfect fit for the WPC2. TM​
Wireless Pulse Counter 2
Rev.1 13 foogadgets Appendix
Resistor color mapping
There are three resistors included. There are different resistor values depending on what type of pulses that will be counted. R1 is for S0 connection R2 is for mechanical switch connection R3,R4 is for blinking LED detector Wireless Pulse Counter 2
Rev.1 14 foogadgets Firmware reconfiguration
In this chapter it is described how the firmware configuration in the WPC2 can be updated to better fit the existing home automation system. Prerequisites ❏ PC​
with ​
Windows​
and a free ​
USB­port ❏ Pickit3​
with ​
Pickit3 Programmer Software​
from Microchip ❏ Basic knowledge in handling electronics Ⓡ​
NOTE!​
Disconnect any sensor connected to the IN­input and/or the 1­Wire​
input while accessing the WPC2 Firmware configuration parameters. Make sure you can connect the Pickit3 to the WPC2 in an electrically robust way. The WPC2 programming interface U1, is compatible with the pinout of the Pickit3. The dot on the WPC2 marks pin number 1. U1 is located on the opposite edge of the micro USB port. Wireless Pulse Counter 2
Rev.1 15 foogadgets Changing WPC2 firmware configuration parameters
The following parameters can be changed EEPROM Address Parameter Default value 0x0 Reserved (DO NOT CHANGE) Do not change 0x1 Version (DO NOT CHANGE) Do not change 0x2 Variant (DO NOT CHANGE) Do not change 0x3 sensor ID 0 (0x00) On board sensor ID = ID * 3 + 1 DS2423 Ch.A = ID * 3 + 2 DS2423 Ch.B = ID * 3 + 3 0x4 DHT sensor ID 16 (0x10) 0x5 Packet re­sends 1 (0x01) Do not change Time between transmissions 30 (0x1E) The amount of 2s periods to sleep between transmissions 30x2s=60s. Min. allowed 2 => 4s Max. allowed 255 (0xff) => 255*2s = 637s 0x6 Table 2 To update any of the parameters above you need to connect the Pickit3 to the WPC2. Wireless Pulse Counter 2
Rev.1 16 foogadgets The picture show Pickit2 software, but the Pickit3 SW is identical. 1. Write the new value in HEX in the correct address. First position to the left, is address 0x00. 2. Make sure the ​
EEPROM Data​
Enabled checkbox is ticked 3. Make sure the ​
Program Memory​
Enabled checkbox is NOT ticked 4. Press the ​
Write​
button The Progress/Status window will change to a green background if the update was successful. Wireless Pulse Counter 2
Rev.1 17