Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. igo
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    igo

    @igo

    1
    Reputation
    4
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    igo Follow

    Best posts made by igo

    • Raspberry Pi 5: invalid GPIO 9

      Hi,
      after migrating to RPi5 from RPi4 I cannot run mysgw:

      pi@pi:~/projects/MySensors $ ./configure --my-transport=rf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mysgw1
      pi@pi:~/projects/MySensors $ make
      pi@pi:~/projects/MySensors $ sudo ./bin/mysgw 
      Aug 27 15:16:32 INFO  Starting gateway...
      Aug 27 15:16:32 INFO  Protocol version - 2.4.0-alpha
      Aug 27 15:16:32 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=1,VER=2.4.0-alpha
      Aug 27 15:16:32 DEBUG TSF:LRT:OK
      Aug 27 15:16:32 DEBUG TSM:INIT
      Aug 27 15:16:32 DEBUG TSF:WUR:MS=0
      Aug 27 15:16:43 ERROR Could not open /sys/class/gpio/gpio9/direction
      

      Any idea what is happening or how can I debug it? I found this which says "raspi-gpio is deprecated and doesn't support Pi 5".

      posted in Troubleshooting
      igo
      igo

    Latest posts made by igo

    • RE: No merge into master in the last 5 years, should we use development?

      @skywatch said in No merge into master in the last 5 years, should we use development?:

      https://www.hackster.io/TMRh20/iot-home-automation-w-nrf24l01-raspberry-pi-9ee904

      from my point of view, community is moving towards zigbee, lora and meshtastic

      posted in General Discussion
      igo
      igo
    • Raspberry Pi 5: invalid GPIO 9

      Hi,
      after migrating to RPi5 from RPi4 I cannot run mysgw:

      pi@pi:~/projects/MySensors $ ./configure --my-transport=rf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mysgw1
      pi@pi:~/projects/MySensors $ make
      pi@pi:~/projects/MySensors $ sudo ./bin/mysgw 
      Aug 27 15:16:32 INFO  Starting gateway...
      Aug 27 15:16:32 INFO  Protocol version - 2.4.0-alpha
      Aug 27 15:16:32 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=1,VER=2.4.0-alpha
      Aug 27 15:16:32 DEBUG TSF:LRT:OK
      Aug 27 15:16:32 DEBUG TSM:INIT
      Aug 27 15:16:32 DEBUG TSF:WUR:MS=0
      Aug 27 15:16:43 ERROR Could not open /sys/class/gpio/gpio9/direction
      

      Any idea what is happening or how can I debug it? I found this which says "raspi-gpio is deprecated and doesn't support Pi 5".

      posted in Troubleshooting
      igo
      igo
    • RE: My HW gives me wrong battery voltage

      @ejlane @eiten problem is that before any calculations sensorValue from analogRead is 127. So if I use 127 in any formula it's doesn't make and reasonable value.

      1000000/(1000000+470000)*127 = 86,3945578231

      I took the formula from https://www.mysensors.org/build/battery#external-measurement. R1 and R2 names (not values) are swapped in my schematic 😕

      Btw, board was meant to be power by 1,2,3 or 4 AA batteries. It's powered by TPS61025DRCR. But I am not sure I did the power management correctly.

      posted in Hardware
      igo
      igo
    • My HW gives me wrong battery voltage

      Hi,
      I've built my very first PCB with atmega328p-au. Everything works fine (MCU, sensor, radio) except battery measurement. It always give me 0.4V regardless of what battery is connected (1,5V 1xAA or 3V 2xAA).

      const float VOLTAGE_DIVIDER_R1 = 1e6;
      const float VOLTAGE_DIVIDER_R2 = 470e3;
      uint8_t BATTERY_SENSE_PIN = A1;
      
      void setup() {
        // use the 1.1 V internal reference
      #if defined(__AVR_ATmega2560__)
        analogReference(INTERNAL1V1);
      #else
        analogReference(INTERNAL);
      #endif
      }
      ...
      // gives me 127
      int sensorValue = analogRead(BATTERY_SENSE_PIN);
      
      
      // 3.440426e+00
      const float voltageDivider = ((VOLTAGE_DIVIDER_R1+VOLTAGE_DIVIDER_R2)/VOLTAGE_DIVIDER_R2)*1.1;
      
      // 3.363075e-03
      const float voltsPerBit = voltageDivider/1023;
      
      // 0.43 V
      float batteryV = sensorValue * voltsPerBit; // calculated
      

      R1 = 470K
      R2 = 1M
      C3 = 100nF
      C3 is connected to A1

      Any idea what could be wrong?

      Screenshot 2023-04-04 at 21.53.34.png

      2a0ed1b0-de33-4d5d-b2fa-a13c830f2ce0-image.png

      posted in Hardware
      igo
      igo