• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Image 1
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Image 2
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Image 3
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Image 4
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Image 5
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Thumbnail 1
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Thumbnail 2
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Thumbnail 3
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Thumbnail 4
G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space 3D Printer File Thumbnail 5

G4 RF1 Gaszähler Gas Meter Readout Adapter with Electronics Space

secret3dprintingnovice avatarsecret3dprintingnovice

April 2, 2023

printables-icon
DescriptionCommentsTags

Description

This is a model that allows clipping an SS49E/49E/OH49 hall sensor onto the Pipersberg G4 RF1. It has a lot of blank space inside to put e.g. a Wemos D1 Mini, and a hole for a USB power cable.

I used this sensor.

Props to the author of the model this is based on, who found good positions for the hall sensor. If you want to edit this model, check the tinkercad source.

Putting that sensor into the appropriate slot (pipersberg made variants where each impulse is 0.1 m3, and another variant where each impulse is 0.01 m3) allows you to get a voltage curve similar to the following one. Note that the voltage curve needs to be multiplied by 3.3 to get the actual voltage, since the Wemos D1 Mini used for measuring has a voltage divider.

 

With something like the following ESPHome script, you can import the data. Note that you need two input_number helpers in HA: spannungsschwelle_gas_sensor and spannungsschwelle_gas_sensor_reset. 

 

esphome:
  name: gashallsensor

# d1 mini pro but only with 4MB -> d1_mini
esp8266:
  board: d1_mini

# Enable Home Assistant API
api:

wifi:
  ap: {}
  networks:
  - ssid: "secret"
    password: "secret"

captive_portal:

logger:
  level: INFO

globals:
  - id: total_pulses
    type: int
    restore_value: false
    initial_value: '0'  # hier kann der Gaszählerstand initialisiert werden

sensor:
  - platform: homeassistant
    name: spannungsschwelle_gas_sensor
    entity_id: input_number.spannungsschwelle_gas_sensor
    id: spannungsschwelle_gas_sensor
  - platform: homeassistant
    name: spannungsschwelle_gas_sensor_reset
    entity_id: input_number.spannungsschwelle_gas_sensor_reset
    id: spannungsschwelle_gas_sensor_reset
  - platform: adc
    internal: false
    name: "Hall readout"
    pin: A0  
    id: analog_hall_read
    update_interval: 0.1s
    accuracy_decimals: 5
    filters:
      - median:
          window_size: 13
          send_every: 13
          send_first_at: 13

  - platform: template
    internal: false
    update_interval: 0.1s
    id: digital_hall_read
    name: "Currently detecting measurement valley"
    lambda: |-
      static int has_counted_up = 0;
      int mV = id(analog_hall_read).state * 1000;
      bool pulse_threshold_condition = mV < id(spannungsschwelle_gas_sensor).state;
      bool reset_threshold_condition = mV > id(spannungsschwelle_gas_sensor_reset).state;
      
      if (pulse_threshold_condition && has_counted_up == 0) {
        id(total_pulses) += 1;
        ESP_LOGI("gas", "just counted up! %d", id(total_pulses));
        has_counted_up = 1;
      } 
      
      if (reset_threshold_condition == 1 && has_counted_up == 1) {
        ESP_LOGI("gas", "reset countup");
        has_counted_up = 0;
      }
      
      return has_counted_up == 1;

  - platform: template
    name: "Gasverbrauch"
    device_class: gas
    unit_of_measurement: "m³"
    state_class: "total_increasing"
    icon: "mdi:fire"
    accuracy_decimals: 3
    lambda: |-
      return id(total_pulses) * 0.01;

 

To understand what these values do, look at the following screenshot: The orange line is the measured value. Each time a gas impulse comes by, the voltage drops a little. A gas impulse is counted when the orange line goes below the blue spannungsschwelle_gas_sensor line. The next impulse can only be counted when the orange line went above the red spannungsschwelle_gas_sensor_reset  line.

License:

Creative Commons — Attribution — Share Alike

Related Models

Cable Corners... keep cables in corners! preview image

Cable Corners... keep cables in corners!

muzz64 profile image

muzz64

30,980

Headset Hanger 2.0 preview image

Headset Hanger 2.0

RMTB profile image

RMTB

16,759

PetsTags preview image

PetsTags

Dominik profile image

Dominik

1,139

Universal Filament Filter and Lubricator preview image

Universal Filament Filter and Lubricator

CreativeTools profile image

CreativeTools

26,109

3D4U by Miele Coffee Clip preview image

3D4U by Miele Coffee Clip

3D4U powered by Miele profile image

3D4U powered by Miele

8,641

Simple Customizable Key tags  preview image

Simple Customizable Key tags

constantinost profile image

constantinost

160

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite! preview image

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite!

muzz64 profile image

muzz64

24,675

Mechanical wall clock preview image

Mechanical wall clock

Harald Andersson profile image

Harald Andersson

6,971