Skip to content

Commit

Permalink
v115
Browse files Browse the repository at this point in the history
# change log 
## v115:
* esphome changes in 2024.6.1 release : 
* Add ADC multisampling
* Change ADC trigger value according to https://github.com/nliaudat/floor-heating-controller/wiki/BEMF-trigger-calculation
* Add safe mode (boot)
* Change OTA
  • Loading branch information
nliaudat authored Jun 20, 2024
1 parent 2885258 commit 0a55b58
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 26 deletions.
3 changes: 3 additions & 0 deletions board.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ logger:


ota:
- platform: esphome

safe_mode:


# SN74HC595 I/O Expander (shift register) to control L9110s chips
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# change log
## v115:
* esphome changes in 2024.6.1 release :
* Add ADC multisampling
* Change ADC trigger value according to https://github.com/nliaudat/floor-heating-controller/wiki/BEMF-trigger-calculation
* Add safe mode (boot)
* Change OTA
## v114:
* change two points target to one point only : climate target_temperature_low to target_temperature
* CLIMATE_MODE_OFF now set valve position to 0 instead of stay in last position (for linear and tanh modes)
Expand Down
18 changes: 9 additions & 9 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
substitutions:
name: floor-heating-controller
friendly_name: "Floor heating"
revision: "1.113"
revision: "1.115"

#board and compilation
board: nodemcu-32s
Expand Down Expand Up @@ -185,7 +185,7 @@ packages:
visual_max_temperature: "30 °C"
visual_temperature_step: "0.1 °C"
check_interval: "15min"
bemf_trigger_initial_value: "0.105"
bemf_trigger_initial_value: "0.33" # 0.105" for esphome < 2024.6
tanh_steepness: "0.70" ### new parameter for heating_channel_tanh.yaml only
# do not change :
bemf_sensor_adc: BEMF_1_2_sensor_ADC
Expand Down Expand Up @@ -219,7 +219,7 @@ packages:
visual_max_temperature: "30 °C"
visual_temperature_step: "0.1 °C"
check_interval: "16min"
bemf_trigger_initial_value: "0.105"
bemf_trigger_initial_value: "0.33"
tanh_steepness: "0.70"
## do not change :
bemf_sensor_adc: BEMF_1_2_sensor_ADC
Expand Down Expand Up @@ -253,7 +253,7 @@ packages:
visual_max_temperature: "30 °C"
visual_temperature_step: "0.1 °C"
check_interval: "17min"
bemf_trigger_initial_value: "0.105"
bemf_trigger_initial_value: "0.33"
tanh_steepness: "0.70"
## do not change :
bemf_sensor_adc: BEMF_3_4_sensor_ADC
Expand Down Expand Up @@ -286,7 +286,7 @@ packages:
visual_max_temperature: "30 °C"
visual_temperature_step: "0.1 °C"
check_interval: "18min"
bemf_trigger_initial_value: "0.105"
bemf_trigger_initial_value: "0.33"
tanh_steepness: "0.70"
## do not change :
bemf_sensor_adc: BEMF_3_4_sensor_ADC
Expand Down Expand Up @@ -326,7 +326,7 @@ packages:
visual_max_temperature: "30 °C"
visual_temperature_step: "0.1 °C"
check_interval: "15min"
bemf_trigger_initial_value: "0.105"
bemf_trigger_initial_value: "0.33"
tanh_steepness: "0.70"
## do not change :
bemf_sensor_adc: BEMF_5_6_sensor_ADC
Expand Down Expand Up @@ -360,7 +360,7 @@ packages:
visual_max_temperature: "30 °C"
visual_temperature_step: "0.1 °C"
check_interval: "16min"
bemf_trigger_initial_value: "0.090"
bemf_trigger_initial_value: "0.33"
tanh_steepness: "0.70"
## do not change :
bemf_sensor_adc: BEMF_5_6_sensor_ADC
Expand Down Expand Up @@ -393,7 +393,7 @@ packages:
visual_max_temperature: "30 °C"
visual_temperature_step: "0.1 °C"
check_interval: "17min"
bemf_trigger_initial_value: "0.105"
bemf_trigger_initial_value: "0.33"
tanh_steepness: "0.70"
## do not change :
bemf_sensor_adc: BEMF_7_8_sensor_ADC
Expand Down Expand Up @@ -426,7 +426,7 @@ packages:
visual_max_temperature: "30 °C"
visual_temperature_step: "0.1 °C"
check_interval: "18min"
bemf_trigger_initial_value: "0.105"
bemf_trigger_initial_value: "0.33"
tanh_steepness: "0.70"
## do not change :
bemf_sensor_adc: BEMF_7_8_sensor_ADC
Expand Down
59 changes: 42 additions & 17 deletions sensor_adc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,45 @@ sensor:
- platform: adc
pin: GPIO36
name: "BEMF 1" #CH1 + CH2
update_interval: 100ms
update_interval: 50ms # the start of motor need a lot of current (>480 mv), it must be averaged to not trigger the endstop. If 10ms, it always stop. The BEMF trigger must be approx 0.32mv
attenuation : 0db
accuracy_decimals: 3
samples: 20
filters:
- offset: -0.075
- sliding_window_moving_average:
window_size: 9
send_every: 9
- offset: -0.075 # stall voltage : https://github.com/nliaudat/floor-heating-controller/wiki/BEMF-trigger-calculation
id : BEMF_1_2_sensor_ADC

- platform: adc
pin: GPIO39
name: "BEMF 2" #CH3 + CH4
update_interval: 100ms
update_interval: 50ms
attenuation : 0db
accuracy_decimals: 3
samples: 20
filters:
- offset: -0.075
- sliding_window_moving_average:
window_size: 9
send_every: 9
id : BEMF_3_4_sensor_ADC

- platform: adc
pin: GPIO34
name: "BEMF 3" #CH5 + CH6
update_interval: 100ms
update_interval: 50ms
attenuation : 0db
accuracy_decimals: 3
samples: 20
filters:
- offset: -0.075
- sliding_window_moving_average:
window_size: 9
send_every: 9
id : BEMF_5_6_sensor_ADC

- platform: adc
pin: GPIO35
name: "BEMF 4" #CH7 + CH8
update_interval: 100ms
update_interval: 50ms
attenuation : 0db
accuracy_decimals: 3
samples: 20
filters:
- offset: -0.075
- sliding_window_moving_average:
window_size: 9
send_every: 9
id : BEMF_7_8_sensor_ADC


Expand Down Expand Up @@ -89,3 +81,36 @@ sensor:
# attenuation : 2.5db # 100-1250mv
# id : BEMF_7_8_sensor_ADC

##### testing pulse counter

# - platform: pulse_counter
# pin: GPIO36
# name: "pcnt BEMF 1" #CH1 + CH2
# use_pcnt: true
# internal_filter: 10us
# update_interval: 100ms
# id : pcnt_1_2_sensor_ADC

# - platform: pulse_counter
# pin: GPIO39
# name: "pcnt BEMF 2" #CH3 + CH4
# use_pcnt: true
# internal_filter: 10us
# update_interval: 100ms
# id : pcnt_3_4_sensor_ADC

# - platform: pulse_counter
# pin: GPIO34
# name: "pcnt BEMF 3" #CH5 + CH6
# use_pcnt: true
# internal_filter: 10us
# update_interval: 100ms
# id : pcnt_5_6_sensor_ADC

# - platform: pulse_counter
# pin: GPIO35
# name: "pcnt BEMF 4" #CH7 + CH8
# use_pcnt: true
# internal_filter: 10us
# update_interval: 100ms
# id : pcnt_7_8_sensor_ADC

0 comments on commit 0a55b58

Please sign in to comment.