Difference between revisions of "Omnindoor"

327 bytes added ,  Yesterday at 13:05
no edit summary
 
Line 3: Line 3:
|+ Caption text
|+ Caption text
|-
|-
| Pin || thing || Mode in Tasmota Configure Unit menu
| Pin || thing || Mode in Tasmota Configure Unit menu || connection
|-
|-
| 4 || lock || Relay 1
| 4 || lock || Relay 1 || controls the motor lock-direction relay
|-
|-
| 32 || unlock || Relay 2
| 32 || unlock || Relay 2 || controls the motor unlock-direction relay
|-
|-
| 33 || current || ADC Current 1
| 33 || current || ADC Current 1 || measures the voltage of motor shunt resistor
|-
|-
| 36 || battery voltage || ADC Current 2
| 36 || battery voltage || ADC Current 2 || battery voltage minus 3x6.2v zeners, 10KΩ to 5.1KΩ resistor divider
|}
|}


Line 26: Line 26:
  (100 is too low, limit sometimes trips before motor starts moving, 200 is a lot)
  (100 is too low, limit sometimes trips before motor starts moving, 200 is a lot)


set the adc range https://tasmota.github.io/docs/ADC/ (note: mode 6 is ADC Range, but 33 is what the software returns for some reason, so we just set 33)
set the adc range https://tasmota.github.io/docs/ADC/ (note1: mode 6 is ADC Range, but 33 is what the software returns for some reason, so we just set 33.  note2: these numbers are not calibrate to any actual current or voltage scales, just random numbers)
  AdcParam1 33, 0, 4095, 0, 100
  AdcParam1 33, 0, 4095, 0, 100
  AdcParam2 36, 0, 4095, 0, 3.3
  AdcParam2 36, 0, 4095, 0, 3.3
Line 36: Line 36:
  CMD: rule3
  CMD: rule3
  RSL: RESULT = {"Rule3":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":40,"Free":471,"Rules":"ON ANALOG#Voltage1>80 DO Power1 0 ENDON"}}
  RSL: RESULT = {"Rule3":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":40,"Free":471,"Rules":"ON ANALOG#Voltage1>80 DO Power1 0 ENDON"}}
  CMD: adcparam
  CMD: adcparam1
  RSL: RESULT = {"AdcParam1":[33,0,4095,0,100]}
  RSL: RESULT = {"AdcParam1":[33,0,4095,0,100]}


"The ESP32 board has four ADC GPIO pins available (gpio34, gpio35, gpio36, gpio39) which can be used for analog inputs. These can be used to read voltage at the ADC pin or to read the module supply voltage (VCC). All analog input pins support 3.3V."
"The ESP32 board has four ADC GPIO pins available (gpio34, gpio35, gpio36, gpio39) which can be used for analog inputs. These can be used to read voltage at the ADC pin or to read the module supply voltage (VCC). All analog input pins support 3.3V."