Voltage fluctuations on the outputs of the RevPi

Topics about the Software of Revolution Pi
Post Reply
Jow W.
Posts: 7
Joined: 11 Jun 2024, 10:09

Voltage fluctuations on the outputs of the RevPi

Post 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
Why do programmers prefer dark mode?

Because the light attracts bugs! :lol:
u.biakoup
KUNBUS
Posts: 208
Joined: 14 Apr 2022, 13:04

Re: Voltage fluctuations on the outputs of the RevPi

Post 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
Jow W.
Posts: 7
Joined: 11 Jun 2024, 10:09

Re: Voltage fluctuations on the outputs of the RevPi

Post 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
Why do programmers prefer dark mode?

Because the light attracts bugs! :lol:
User avatar
dirk
KUNBUS
Posts: 2126
Joined: 15 Dec 2016, 13:19

Re: Voltage fluctuations on the outputs of the RevPi

Post 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.
Post Reply