Difference between revisions of "Pulse logic input"

From Let's Control It
Jump to navigation Jump to search
(Created page with "= Introduction = Just as the ESP may be used with specific pulse counters it may also be used with any generic pulse based unit as long as the pulses are not giving to high vo...")
 
Line 10: Line 10:
  
 
== Pulse wheel ==
 
== Pulse wheel ==
A pulse wheel (generally 100 pulses per rotation), good pulse wheels will give the direction of the rotation on different output ports. That means that you will have to use 2 GPIO if you you plan to use that feature. Some pulse wheels have 4 outputs, both directions and (for example) 100 pulses per rotation and 25 pulses per rotation. A pulse wheel may be good to use in conjunction with a stepper motor.<br/>
+
A pulse wheel (generally 100 pulses per rotation) could also work as a input for pulses, good pulse wheels will give the direction of the rotation on different output ports. That means that you will have to use 2 GPIO if you you plan to use that feature. Some pulse wheels have 4 outputs, both directions and (for example) 100 pulses per rotation and 25 pulses per rotation. A pulse wheel may be good to use in conjunction with a stepper motor.<br/>
 
[[File:Pulse_wheel.jpg|350px]]
 
[[File:Pulse_wheel.jpg|350px]]
  

Revision as of 19:51, 13 May 2017

Introduction

Just as the ESP may be used with specific pulse counters it may also be used with any generic pulse based unit as long as the pulses are not giving to high voltages. Two examples in this example is a generic water flow sensor and a pulse wheel.

Hardware

Anything that gives a pulse within reasonable voltage levels may be used as input.

Flow sensor

A generic flow sensor that gives a pulse each complete revolution. You may have to measure what each revolution/pulse means in volume.
Flow sensor pulse.jpg

Pulse wheel

A pulse wheel (generally 100 pulses per rotation) could also work as a input for pulses, good pulse wheels will give the direction of the rotation on different output ports. That means that you will have to use 2 GPIO if you you plan to use that feature. Some pulse wheels have 4 outputs, both directions and (for example) 100 pulses per rotation and 25 pulses per rotation. A pulse wheel may be good to use in conjunction with a stepper motor.
Pulse wheel.jpg

Software

Within the ESPeasy devices you will have to set up the device using the Pulse Counter type. In the example that follows we use a flow sensor to measure the amount of water that flows out of a system. The delay is set to "5" which equals to five seconds. The GPIO is connected to the pulse output signal cable (in the flow sensor example this cable is yellow). And we have to use the "Debounce Time" in order to filter out some false signals. In this case the debounce is set to 100mSec, please observe that lower debounce time may completely flood your ESP so start from at least 500mSec and work your way down to a good level. Pulse logic input Setup.PNG

In this example we converted the pulses to mL after measuring 1.5L and divided that volume with the numbers of pulses to reach that volume. This left us with a value of 0.65mL per pulse. Thus the formula for the value was set to "%value%*0.65".

If you use a pulse wheel with 2 or 4 outputs you need to add 1 device for each GPIO.