PbHub + 2-Relay Units - only 1 relay channel working?
-
Hi - I have a PbHub with a 2-relay unit connected to (if it matters) CH5. The 2-relay unit works fine when connected directly to the Core 2 device/Port C, but when connected to the PbHub, only 1 or the two relays will switch.
I'm using micropython and:
pbhub_0.digitalWrite(5, 0, 0)
pbhub_0.digitalWrite(5, 0, 1)-- works (off/on)
pbhub_0.digitalWrite(5, 1, 0)
pbhub_0.digitalWrite(5, 1, 1)-- doesn't do anything
the 2-relay unit (confusingly) has labeled channels of 1 and 2 on the device, A and B on the schematic - and takes 1 and 2 as relay identifiers if you're controlling it directly (via Port A) the UI flow code/micropython is:
relay2_0.set_value(1, 0)
relay2_0.set_value(1,1)
relay2_0.set_value(2,0)
relay2_0.set_value(2,1)I'm considering addressing the PbHub directly or trying arduino code, but just wondering if there's some obvious reason I'm missing.
-Thanks!
-
Hello @emsea22
which version PbHub are you using? v1.0 U041 or v1.1 U041-B?
I think only version v1.1 can both pins have set to outputs on all channels. The original PbHub has its IN pins for CH4 and CH5 connected to ADC inputs of the Mega328 which I guess means they can only be inputs.
Have you tried a different channel, e.g. CH0?
Thanks
Felix -
@felmue SOLVED - thanks for that - CH2 works as expected!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login