I needed something to controll my DMD2 tablet on my bike but the regular rally controllers out there cost a fortune.
This would fit a 22mm handlebar and its about 22.5mm wide!
you will need:
- 3x PBS 33B M12 buttons
- 1x mts-123 2 way rocker
- 4x m3 x 6mm screws
- 2x m4 x 15mm screws
- 2x m4 nuts
- ~50cm 6 core cable (as thin as possible)
- 1 small ziptie
- esp32 controller with bluetooth (BLE) support
Assembly:
- put the m4 nuts into the backplate. they are pressfit. if they are to loose, secure them with some glue.
- Add the buttons and use the included nuts to secure them. start with the top one, then add the 2 way rocker. Follow with the rest. make sure the terminals face the outer walls so sodlering is easier.
- use locktight or superglue to secure the nuts
- get a piece of wire, strip it and solder up ground to one of each button terminal. basicly providing a GND backbone. this way you wont have to solder that much
- pull through the cable and solder up the rest.
- secure the end of the cable with a ziptie inside the case (just around the 6 core cable ). so it cant be easily pulled through.
- put on backplate
- use the M3x6 screws and secure the backplate
- get a waterproof case and put your microntroller in there, i used an outdoor junction box and sotred that somewhere inside my bike,
Software:
- you'll find the barebone sourcecode here https://github.com/achmed20/rally-controller
- if you have a regular esp32 dev board, solder the wires according to the pin layout (all pins must support interal pullups)
or
change use or own layout and change the pins accordingly - compile and flash the firmware (platformIO works best for me)
- Pair the controller to your device, if it doesnt work, you may need to reboot the controller after flashing
- it will appear as “Rally Controller” and will simulate a gamepad.
- the top button will support multi press and offer more button mapping.
- 1x = x
- 2x = y
- 3x = lb
- long press = rb
Note:
- mounting the Buttons is a bit of a pain. You cant turn the Nut so you have to turn the button itself. once its fastened, you probably should glue it own so it doesnt rattle loose