Page 1 of 1

Voltage fluctuations on the outputs of the RevPi

Posted: 12 Aug 2024, 08:36
by Jow W.
Hi everyone,

I'm having trouble with a Python script I'm using to control a vertical farming system on a Raspberry Pi. The script is designed to water the plants daily at 8 AM.

Everything seems to work as expected initially, but during the watering process (opening valves, starting the pump), the voltage is fluctuating rapidly - dropping and rising about once per second. This intermittent voltage drop is disrupting the script's operation.

I've isolated the issue to this script and there are no other programs running that could be interfering.

I've attached the relevant part of the code below for reference:

Code: Select all

def main():
    while True:
        rpi = init_rpi()
        if None == rpi:
            return 0
        try:
            while True:
                while True:
                    t = time.localtime()
                    if (t.tm_min == 59):
                        break
                    if (t.tm_hour == 7):
                        time.sleep(1)
                    else:
                        time.sleep(1)
                print("run layer3")
                floodLayer3(rpi)
                time.sleep(900)
                drainLayer3(rpi)
                time.sleep(72000)
        except KeyboardInterrupt:
            print("Program interrupted by user")
            return 0
        
main()

Any ideas on what might be causing these voltage fluctuations and how to resolve them would be greatly appreciated!

Thanks in advance

Joe

Re: Voltage fluctuations on the outputs of the RevPi

Posted: 12 Aug 2024, 10:58
by u.biakoup
Hi joe,

please could you give detailled informations about your systems?

What are the modules used?
- RevPi Based modules( Revpi connect S, SE, Core... etc)
-IO/Moduls( DIO,AIO..)

could you also post here an SOS-report?

Best Regards

Ulrich Kouatang Biakoup | field application engineer

Re: Voltage fluctuations on the outputs of the RevPi

Posted: 12 Aug 2024, 15:26
by Jow W.
Hi Ulrich,
thank you for the quick response. I'm using a Revolution Pi Connect 4, with a DIO module and a DO module.

Joe

Re: Voltage fluctuations on the outputs of the RevPi

Posted: 02 Sep 2024, 12:17
by dirk
Hi Joe,
If the voltage drops, it is an indication of hardware, e.g. switching of loads that exceed the power of the RevPi hardware.
Examine the line and create an oscilloscope trace to narrow down the cause - How high is the current consumption? Are there any peaks?
Control the pumps with a RevPi RO Module.