Using the Relay: circuitry and duty cylce questions

Any hardware type questions or problems for all other Phidget devices.
Post Reply
shebalovely
Fresh meat
Posts: 3
Joined: Thu Oct 10, 2019 2:11 pm
Contact:

Using the Relay: circuitry and duty cylce questions

Post by shebalovely »

I am trying to use the 4x Isolated Solid State Relay Phidget to control a device. But I have a few questions about the relay

1) I can use the relay to control the connection between the ground and the device. However, controlling the connection between the device and vcc does not seem to work.

Hooking up the relay as follows does not seem to work.


[+]---[relay]---[device]---[-]


But this does work:

[+]---[device]---[relay]---[-]

Why is this? Is there something in the relay that prevents it from switching the connection to the positive terminal?

2) I am trying to use the setDutyCycle() function. However, calling this function does not seem to result in the desired effect. If I hook up my oscilloscope's terminals as follows, I expect to see a block wave. But I don't see any variation in the signal when calling setDutyCycle(). I can toggle the relay using the SetState() function, though.

[+]---[terminal1] [terminal2]---[relay]---[-]

Any ideas about what I am doing wrong? Or does anybody have some python code showing how to use the setDutyCycle() function
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Using the Relay: circuitry and duty cylce questions

Post by mparadis »

The reason this Phidget works on the low side of your circuit but not the high side is because it isn't the same as a basic relay where switching it on connects the two terminals. The channels on this Phidget are switch-to-ground relays, so when you activate one of them, they are shorted to ground. If you do this on the high side of your circuit, you're shorting the Phidget's ground to whatever your circuit voltage is, which could damage the board.

This device does support PWM, so you should be able to set duty cycle. I'm not sure if I understand your oscilloscope circuit, it looks like you're putting both probes in series? Are you measuring voltage or current?
shebalovely
Fresh meat
Posts: 3
Joined: Thu Oct 10, 2019 2:11 pm
Contact:

Re: Using the Relay: circuitry and duty cylce questions

Post by shebalovely »

The channels on this Phidget are switch-to-ground relays
Ok. That helps.



This device does support PWM, so you should be able to set duty cycle. I'm not sure if I understand your oscilloscope circuit, it looks like you're putting both probes in series? Are you measuring voltage or current?
I am trying to measure voltage. Closing the relay in the circuit, I should see a voltage on my oscilloscope. This works using the SetState() function. If I call SetState(1), I see a voltage (of the source). I was expecting to see the voltage oscillate using the SetDutyCylce() function. But I don't see anything. Can I check the duty cycle or state of the relay on the software side?

[+]-------------[probe2]

[-]---[relay]---[probe1]
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Using the Relay: circuitry and duty cylce questions

Post by mparadis »

Do you get the same behaviour when you use the Phidget Control Panel to try and change the duty cycle? Is the duty cycle value you're trying to set between 0.0 and 1.0?
shebalovely
Fresh meat
Posts: 3
Joined: Thu Oct 10, 2019 2:11 pm
Contact:

Re: Using the Relay: circuitry and duty cylce questions

Post by shebalovely »

I haven't tried the phidgets control panel as I am on linux. I can try it over the next few days on another machine.

Yes, I used a value between 0 and 1.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest