2026-03-07 19:32:24 +01:00
2026-03-07 19:32:24 +01:00
2026-03-07 19:32:24 +01:00
2026-03-07 19:32:24 +01:00
2026-03-04 12:03:39 +01:00
2026-03-02 08:37:44 +01:00
2026-03-01 08:26:07 +01:00
2026-03-05 19:10:03 +01:00
2026-03-07 19:32:24 +01:00
2026-03-04 12:03:39 +01:00

OBP Keypad 6/1
==============

- Power supply via M12 connector through NMEA2000
    - Input range 6-21 V
- Configuration mode via long key press (>3 s) on DST
    - Deep sleep and reset can be activated from configuration mode
- Configuration via web interface
- Firmware update via web interface
- Buzzer for key press feedback
  passive, allowing tones to be programmed via PWM
- I²C temperature/humidity sensor SHT31
- Light sensor, e.g. for automatic LED dimming

Later options
- Brightness sensor, e.g. for automatic LED dimming
  Reassign pins?:
    I²C -> D0, D1 (GPIO 44, 43)

To prevent the LEDs from being distracting, switching is possible between
permanent illumination and only brief flashing on actuation:
day and night mode

Power-up sequence
----------------

  - Status LED briefly lights up red
  - A “lamp test” is performed: all LEDs are cycled once
  - If all tests are successful, a buzzer signal sounds
    This is also a buzzer test

Description
------------

The devices to be connected have to be selected via the web interface.
An NMEA2000 device list page is available.

The destination LEDs light up only if a corresponding
N2K target device has been configured and detected.


Enclosure
---------

Button mounting hole 12mm
Button outer diameter: 17.5mm

Connection cable CPU board

Connections
-----------

  Main PCB
      For power supply +12 V and NMEA2000
        2pin terminal block

      To connect LED PCB
        JST 2.54 XH 7-pin connector -> LEDs + GND

      To connect light sensor to LED PCB
        2 pins for +3.3V and GPIO 

      For I²C modules
        2x 4pin-pin female headers 
        qwiic-connector (JST_SH_BM04B-SRSS-TB_04x1.00mm)

      For CAN transceiver module
        4-pin right-angle connector, female

      For mechanical buttons
        8-pin terminal block, 7 buttons and GND

   LED PCB
      To connect LED pcb
        7-pin JST-XH header (cable can also directly soldered to pcb)

      to connect optional light sensor
        2-pin female connector right angle

Notes
-----

Do not use used pre-wired buttons, the connection wires are extremely
delicate. Easy to break and poor workmanship.
Better to use buttons without cables. Solid wire with 0.25 mm² seems
best suited, both on the button side and for insertion into the terminal
block.

There are various variants with different spring forces.
Final button selection still pending.

MCU Nano pin assignment
-----------------------

Wiki: https://www.waveshare.com/wiki/ESP32-S3-Nano

The Nano has 30 pins.

Power is supplied via VIN. According to the specification, 6 to 21 V
may be applied there. Operation with 5 V is probably also possible.
Do not use the 3.3 V pin. It is intended as an output! 

The mapping from Nano pins to GPIOs still needs to be verified.
The Nano can be operated in two different mapping modes!

The pin assignments are defined in main.h. 

Bill of materials (WIP)
-----------------

  1x ESP32-S3 Nano (Waveshare)
     berrybase.de
     eckstein-shop.de
  6x black or white push buttons (1-6)
  1x colored push button (DST)
  1x M12 Micro-C panel connector pre-wired
  1x RGB LED (common cathode), diffused
  3x green LEDs, diffused
  6x resistors 330 Ω
  1x SN65HVD230 CAN transceiver
  1x buzzer 12V, passive
  1x MOSFET 2N7000
  1x resistor 150 Ω
  1x wiring set for buttons, 0.25 mm²
     7x black (GND), 10cm each
     7x colored (signal), 15cm each
  1x screw terminal block 2pol. 2.54mm
  1x 3D enclosure consisting of front and back
  1x nut tool, 3D-printed
  4x mounting screws M4 countersunk
  4x enclosure screws M2.5, long
  8x PCB screws M2.5, short
  1x silicone sealing cord 2 mm, l=380mm
  1x SHT31 I²C module
  1x female header 2.54 mm
  1x pin header 2.54mm
  2x jumpers
  1x polyfuse 
  1x heat-shrink tubing

Configuration
-------------
WIP
- Instance number; multiple keypads can exist in the system
- Name of the paired devices (up to three); keys are sent to the selected 
  device
- Key codes for buttons 1 to 6
- Key codes for buttons 1 to 6 long pressed
- Key names
- Wifi setup

NMEA2000
--------

No incoming packets are processed except for the mandatory ISO packets.
As future extension there could be a feature to receive NMEA2000 alerts.

A device list is maintained.

From the device list, 3 devices can be assigned to targets A, B, and C.

Key codes are sent to the currently active device.

If a temperature/humidity sensor is present, the measured values
are sent regularly onto the bus.
Description
Languages
JavaScript 44.5%
C++ 41.9%
Python 5.1%
HTML 3%
CSS 3%
Other 2.5%