Navigation

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

    Topics created by Olaf Jacobs

    • Olaf Jacobs

      Pressure sensor and input trough optocoupler
      Domoticz • arduino • • Olaf Jacobs  

      4
      0
      Votes
      4
      Posts
      31
      Views

      zboblamont

      @Olaf-Jacobs It's a straight analogue read on a single ADC pin relative to Vcc and ground of the Arduino Node. In my case it's a pro-mini, the ADC pin in this example earlier defined as "Pressure", the result radioed in only if the ADC reading has changed. Three other binary inputs for contactors are polled every second on separate digital pins (one of which is pin 3), which uses all 4 pins available on this pro-mini due to the radio etc. if ((!hidro&&!Hidro&&(counter2>=132))||initialise){ int incoming=analogRead(Pressure); if (prevolume!=incoming){ prevolume=incoming; sleep(50); float tankvolume=(((incoming-102.3)*6.704199635)+0.5);//5psi sensor send(msg8.set(tankvolume,0));//This is actual volume sleep(100); }} I'm not clear on the rest of what you're trying to incorporate or what pin 3 (digital interrupt) has to do with it, the pressure sensor signal goes to an analogue pin to enable the voltage to be read.
    • Olaf Jacobs

      Temperature serial sketch
      Troubleshooting • • Olaf Jacobs  

      13
      1
      Votes
      13
      Posts
      126
      Views

      Olaf Jacobs

      @skywatch I do have the resistor in place now, like mentioned it works and still works.