Close
0%
0%

I2C NavKey

The I2C NavKey is a perfect solution to make a perfect HMI without using precious resources

Similar projects worth following
Starting from
$17.00
Saimon has 1326 orders / 51reviews
Ships from Italy
The I2CNavKey is a small board that includes a 7 functions joypad. The joypad has 4 directional keys plus a central button and a rotary ring. It is controllable with the I2C bus, and it's possible to configure 16 different I2C addresses.

The I2CNavKey has also 3 configurable GPIOs with the same footprint of RGB LED. This 3 GPIOs can be configured independently in 4 different way: input, output, PWM and analog input.

Since the I2CNavKey is a I2C slave, it has a series of 8 bit registers where it's possible to configure different parameters,it's also possible to detect when the buttons are pressed or when the ring is rotated.

It also has an open-drain output pin used as interrupt output. This pin is used to notify to the master when some event happens in the I2CNavKey, the source of interrupt can be customized.

Last but not least, it has also 256 bytes of EEPROM.

This project follow the same philosophy of our previous project I2C Encoder.

This project is based on the TSWB-3N-CB222 LFS from C&K

It is a 7 function joypad with 4 directional keys, central button and a scroll wheel.

The PIC16F18345 from Microchip makes it possible to use this joypad with the I2C bus, in the same way of the I2C Encoder.

Feature:

  • I2C bus works up to 400kHz,
  • Possibility to add the pull-up resistors on the I2C bus.
  • Possibility to customize the I2C address by soldering the 4 SMD jumpers
  • Open-drain Interrupt output pin, so no need to continuously poll the devices
  • There is a 5 pins JST-XH header
  • There are 3 General Purpose pins. (GP pins)
  • 256 byte of internal EEPROM divided into 2 banks of 128 byte
  • Voltage range is 2.5V to 5V
  • Dimension of the device is 42.5x42.5mm or 1.67x1.67in
  • 4 mounting holes with 3mm diameter
  • Open source firmware

The board is 42.5 x 42.5 mm and it has 4 mounting holes. On the top layer, there is no components, this make perfect for mounting on a panel near of a LCD display.

On the bottom side, there are all the components, plus the connector.

The connector is a common 5 pins JST-XH, it is very easy to find some cheap cable already crimped.

The I2C NAvKey is a I2C slave. On the bottom side, there are 4 SMD jumpers where is possible to set the I2C address.

Like other I2C devices, it has a series of 8 bit registers:


With these registers, it is possible to use configure and use the device. Most of the functions are similar to the I2C Encoder especially the encoder part.

In the I2C NavKey, it is also possible to enable or disable the I2C clock stretch and there are also a register with a identifier (IDCODE)  and another with the version. (VERSION).

GP pins

Like the I2C Encoder, also the I2C NavKey has the 3 GP pins. They work at the same way of the I2C Encoder.

Each GP pin can be configured in the following way:

  • Digital output
  • Digital input, with the possibility to enable the interrupts on the edge change
  • Analog input, with a resolution of 8bit
  • PWM output

The PWM mode is completely different from the I2C Encoder.
In the I2C Encoder is just a raw 8bit PWM, in the I2C NavKey is configured in 10bit mode, but the user can set the duty cycle only from 0 to 100 (0% to 100%) plus can configure a 7 types of gamma correction.

The gamma correction is very useful if a LED is used. Because it makes the LED intensity more linear to the human eye. 

  • Obsolete....

    Saimon09/01/2019 at 12:44 0 comments

    As many people pointed out the TSWB3NCB222LFS  from C&K is obsolete.

    It's not available anymore, later i have found in Hong Kong a shop but i have discovered that is a scam shop. At this poit, I was thinking that this project is over, once i have finished my stock i should have click the " Retire " button on my Tindie store.

    Fortunately with some help, i have found the company Zippy that have the same item!
    http://www.zippy.com.tw/ecproductshowdetail.aspx?ps_rfnbr=320

    Currently i'm waiting some sample from them, if the product is with good quality, this project will continue!

  • Small changes in the design

    Saimon07/04/2019 at 09:39 0 comments

    I have run a new PCB batch and i have changed a little bit the design.
    First of all the PCB have the ENIG finishing. 

    Now the space for soldering the pull-up resistors is gone, instead they are already soldered and can be enabled by shorting a 3-way jumper:

    I have also added 2 huge pads for the power supply near the RGB led footprint. In this way is easy to solder some wires for powering something connected to the GP pins.

View all 2 project logs

Enjoy this project?

Share

Discussions

Fred wrote 04/18/2020 at 06:46 point

I received this great device a few months ago, and didn't try it immediatly. Yesterday, I connected it to my Smart Remote Control (https://wiki.logre.eu/index.php/Télécommande_intelligente_2) but I'm unable to communicate with it. Even i2cdetect does not see it (default address 0x20). But my I²C master works fine with many other devices.

How can I debug it? Are there some pins to check to see if the PIC is running? BTW, SCL and SDA are OK, they are not held to ground or something...

Thanks for your help.

  Are you sure? yes | no

Manu wrote 04/16/2019 at 06:33 point

Hi, great project! Beware of the TSWB though. I've used it in my car for about a year before it falls apart...

  Are you sure? yes | no

Saimon wrote 04/16/2019 at 07:24 point

Thank you!
uh also i have used a couple of them to build an instrument, and they still works even after several years of usage. Maybe the car vibration is not good for them....

  Are you sure? yes | no

Manu wrote 04/16/2019 at 07:33 point

The temperature is not very good also...

  Are you sure? yes | no

Saimon wrote 04/10/2019 at 09:42 point

Hello, yes unfortunately is obsolete and they stopped the production. The black version is still available while the white version is not. On DigiKey there are 5k available. 

  Are you sure? yes | no

mbt28 wrote 04/10/2019 at 09:30 point

Hi,

The main component TSWB-3N-CB222 LFS seems obsolate. How do you find enough of them?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates