Page 1 of 1

Reasonable priced Grayhill 12 and 20 button keypads availabe from DigiKey.

Posted: Tue Sep 05, 2023 7:51 am
by opelpanfan
DigiKey has super cheap Grayhill 12 and 20-button keypads with CANOpen protocol.

12 button part code 3K012-4RN3AG CANOpen protocol
https://www.digikey.co.uk/en/products/detail/grayhill-inc/3K012-4RN3AG/9809016

20 button part code 3K020-4RN3AG
https://www.digikey.co.uk/en/products/detail/grayhill-inc/3K020-4RN3AG/9809020

It would be super nice to have support added to FW

Re: Reasonable priced Grayhill 12 and 20 button keypads availabe from DigiKey.

Posted: Tue Sep 05, 2023 1:16 pm
by AndreyB
Just ordered one each without researching what kind of a connector it needs. Do we know part number for harness side connector?

Re: Reasonable priced Grayhill 12 and 20 button keypads availabe from DigiKey.

Posted: Wed Sep 06, 2023 6:06 pm
by opelpanfan
image.png
image.png (24.33 KiB) Viewed 7882 times
4 pin Deutsch DT connector
DT06-4S

Also very nice stickers are available from Haltech for these keypads:

https://www.haltech.com/product/ht-011500-can-keypad-label-set/

Re: Reasonable priced Grayhill 12 and 20 button keypads availabe from DigiKey.

Posted: Thu Sep 07, 2023 2:27 pm
by opelpanfan
Small info about how to use the keypad.

Programming manual:
3K012-4RN3AG.pdf
(437.24 KiB) Downloaded 146 times
Default NodeId is 0x18A hex

Wake up Keypad need to send
ID = 000h, LEN = 8, Data = {01h 00h 00h 00h 00h 00h 00h}
Enough send once after power up and Init message received
ID = 70Ch, LEN = 1, Data = {00h}

Keypad clicks return with
ID = 18Ah, LEN = 3, Data = {xxh xxh xxh}
image.png
image.png (4.91 KiB) Viewed 7795 times

Multiple button clicks at once sum up data:
Button 1 + Button 2 will get you Data = {03h 00h 00h}

Set indicator LED's:
In total 3 LED's per button so {Number of Buttons} x 3 = 36 (in case of 12 buttons)
ID = 20Ah, LEN = 8, Data = {00h 11h 22h 33h 44h 55h 66h 77h}

00 - Control 1-8 LED's addressing in 8 bit binary (00000000) to hex (00-FF)
11 - Control 9-16 LED's addressing in 8 bit binary (00000000) to hex(00-FF)
22 - Control 17-24 LED's addressing in 8 bit binary (00000000) to hex(00-FF)
33 - Control 25-32 LED's addressing in 8 bit binary (00000000) to hex(00-FF)
44 - Control 33-40 LED's addressing in 8 bit binary (00000000) to hex(00-FF)
55 - Control 41-48 LED's addressing in 8 bit binary (00000000) to hex(00-FF)
66 - Control 49-56 LED's addressing in 8 bit binary (00000000) to hex(00-FF)
77 - Control 57-64 LED's addressing in 8 bit binary (00000000) to hex(00-FF)

Set Brightness:
ID = 30Ah, LEN = 8, Data = {xxh 00h yyh 00h 00h 00h 00h}
xx - 0-255 in hex (00 - FF) indicator brightness
yy - 0-255 in hex (00 - FF) backlight brightness

Re: Reasonable priced Grayhill 12 and 20 button keypads availabe from DigiKey.

Posted: Thu Sep 07, 2023 4:02 pm
by opelpanfan
Small Lua script

Code: Select all

function onKeyClick(bus, id, dlc, data)
	if data[1] == 0x80 then
		txCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x40 then
		txCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x20 then
		txCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x10 then
		txCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x08 then
		txCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x06 then
		txCan(1, 0x20A, 0, { 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x05 then
		txCan(1, 0x20A, 0, { 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x04 then
		txCan(1, 0x20A, 0, { 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x03 then
		txCan(1, 0x20A, 0, { 0x9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x02 then
		txCan(1, 0x20A, 0, { 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x01 then
		txCan(1, 0x20A, 0, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	elseif data[1] == 0x00 then
		txCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
	end
end



function onTick()
end

txCan(1, 0x000, 0, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
txCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
txCan(1, 0x30A, 0, { 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 })

canRxAdd(0x18A, onKeyClick)

Re: Reasonable priced Grayhill 12 and 20 button keypads availabe from DigiKey.

Posted: Thu Sep 07, 2023 6:36 pm
by AndreyB
Appreciate all the additional info!