Page 1 of 1

Phidget Isolated Relay

Posted: Fri Oct 06, 2023 12:51 pm
by Santiago
I am trying to run a solenoid pump using VINT Hub and Rel1100 Isolated relay. The pump needs operating voltage of 24 volts, and i am controlling that using the relay. The key is the pump max freq is 50hz, and on time is just 10ms.

Because the phidget min freq is 100 hz, i am directly controlling on time and off time. For on time and off time i am using time.sleep with on time and off time of 10ms. However, when i am using a scope, I am getting on time of 28ms and off time something similar too. What gives?

Thanks for the help

Re: Phidget Isolated Relay

Posted: Fri Oct 06, 2023 1:09 pm
by mparadis
Have you tried controlling the on/off time with setDutyCycle and setFrequency? You should be able to get more accurate control using these library properties.

Re: Phidget Isolated Relay

Posted: Fri Oct 06, 2023 2:57 pm
by Santiago
Setfreq u cannot do 50hz, the data sheet says phidget can be operated with a min freq of 100 hz

Re: Phidget Isolated Relay

Posted: Fri Oct 06, 2023 3:08 pm
by mparadis
Ah, my mistake- I misread the original post.

Probably the reason you're seeing 28ms instead of 20ms period is because there is some overhead when switching the relay on and off. The API call has to create a packet that is sent down via USB and then a VINT packet is sent from the HUB to the relay Phidget. The amount of time this takes can also vary depending on your computer specs and CPU load. The specification of 100ns turn-on/turn-off time is the specification for the solid state relays themselves, so it doesn't include this upstream latency.

So you can try reducing the sleep to 6ms, but it may not be consistent enough for this purpose.

Re: Phidget Isolated Relay

Posted: Fri Oct 06, 2023 6:29 pm
by Santiago
Thanks for the reply, i want to run at 10ms on time, and I tried tweaking time.sleep by order of magnitude and still could not hit the on time. I guess there are limitation for the phidget hardware