Machsupport Forum
Third party software and hardware support forums. => PoKeys => Topic started by: Hasher on May 22, 2013, 08:52:48 AM
-
Hi Guys ,
New to pokeys so go easy ;D
I have got a pokeys attached to a relay module with pins 1 thru to 4 and with the VB.net example Example2_BasicPinFunctions tried changing the state of the relay.
Setting the Pins data type the relay latchs with this code :
device.SetPinData(0, pinFunctionsEnum.pinFunctionDigitalOutput)
Console.WriteLine("Pin 1 was set as digital input")
But I cannot unlatch it with this code :
device.SetOutput(0, False)
Console.WriteLine("Pin 1 set to 0")
Am I doing something completely wrong here ?
This is diagram of my Relay module :
Thanks in Advance ))
(http://image4.pushauction.com/0/0/0f6ea2d4-5f7b-4ff6-868c-c82694f11513/65d22e0a-8356-473d-b517-962d8881f038.jpg)
-
This relay board uses PNP transistors that are activated by the LOW signal. In order to turn them off, you must supply the VCC to them. However, this may be a problem if VCC is greater than 3.3V (that is the maximum voltage of the PoKeys pin).
One option for 5V relays (if VCC = 5V) is that you change the pin function back to digital input and provide an additional external pull-up resistor from pin to 5V.
-
Thank you NeoTO that worked great :D