Magnetic Backpack Pixel Blinker Light

by lufton in Circuits > Gadgets

67 Views, 1 Favorites, 0 Comments

Magnetic Backpack Pixel Blinker Light

IMG_5459.JPG
KingSong S22 Magnetic Backpack Light with Bluetooth remote

This is a magnetic backpack pixel blinker light I use with my EUC to show directions and breaking signal to other road users. Also is has additional features for KingSong EUC: toggle strobe, toggle lock, toggle light and more.

Supplies

Print the Case

Print 3 parts: Grid, Lid and Plate.

Plate and Lid can be any color, for Grid I recommend to print first 3 layers (depends on layer thickness) in milk/transparent or white color and then switch to something dark, e.g. black.

Do Some Soldering

IMG_5456.JPG
IMG_5457.JPG

Desolder original wires and solder new jumper wires between +5V and GND on both ends of the PCB. This should help with power distribution a bit, but not really required. Then solder another set of short wires +5V, DI and GND. Connect them to ESP32:

  1. +5V → +5V
  2. DI → GPIO4
  3. GND → GND

Make sure to use proper wires length so that they are not too short and not too long as this will make assembly process harder. Light design has special channel where you can place your wires, so pay attention to that. Also I recommend to secure wires with some Kapton or other tape.

Assemble the Light

Insert ESP32 module in a slot and secure it with hot glue (I noticed that this modules has USB C port shifted a bit to one side, I don't know if that is only my sample so I made cutout a bit wider, but you still may need some curving to fit it in). Route wires so they are aligned with the channel on the Lid part. Place matrix inside and align with the groove around perimeter. Place Grid part on top (make sure you have properly aligned it with SMD components placed on PCB, there are special cutouts for those).

Secure the Lid using 6 screws around perimeter.

Insert Magnets

Insert magnets inside Lid and Plate part. Make sure you follow some specific pattern while inserting. E.g. all magnets facing one pole towards the Plate or like checkers pattern. But make sure it is symmetrical so that the light can snap in all possible plate orientations including mirrored. Also you can figure out the pattern that will let you snap the light only in 1 position, so that you know that it is secured with all magnets and not shifted 1 row to the side.

You may need some glue here, but in my case holes for magnets were printed to fit magnets tight, so no glue was needed. Do not push magnets to deep inside the Lid as this will increase distance between Lid and Plate magnets and weaken magnet force. You can insert them by hand a bit, flip around and push the Lid towards some flat surface like table to make them flush. Also make sure you have cleaned supports and overhang stringing before inserting magnets as that could prevent magnets to be flush with the Lid.

Print the Ring Clip (optional)

Print ring clip with some TPU plastic. I printed mine with Elastan D100. You can try printing with something harder, but I'm not sure if you will be able to take remote out if you managed to snap it in.

Also you can still use original ring provided with Remote, but it was too flimsy and loose for my fingers.

Downloads

Finding Remote MAC Address

Code_QJiV0v0WIk.png
explorer_XZsXY0V86y.png

First of all you need to find your Remote's MAC address. Make sure your Remote is not connected to any device. For that remove it from all previously paired devices. In this state Remote should blink several times when you press any key. If led is not blinking but stays on for several second and goes off that means that Remote is currently connected to some device.

To find Remote's MAC address you have 3 options:

  1. Flashing ESP32 module and checking console output:
  2. Flash ESP32 with default config provided below.
  3. Press any key on the Remote so it starts to blink and advertise packets.
  4. Check logs and note Remote's MAC address:
[14:37:45][E][ble_adv:023]: New SmartRemote found
[14:37:45][E][ble_adv:024]: Name: SmartRemote
[14:37:45][E][ble_adv:024]: Name: SmartRemote
[14:37:45][E][ble_adv:025]: MAC address: BD:96:47:CB:FB:14
  1. Using tools like nRF Connect or similar on Android device:
  2. Install and launch the app.
  3. Press any key on the Remote so it starts to blink and advertise packets.
  4. Find device with the name SmartRemote and note it's MAC address.
  5. Using Windows PC with Bluetooth module:
  6. Press any key on the Remote so it starts to blink and advertise packets.
  7. Find and pair your SmartRemote device with PC.
  8. Run following code in command line:
shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}
  1. Double click SmartRemote device.
  2. Go to Connected Device tab.
  3. Note Remote's MAC address in Unique identifier line.

Flashing ESP32-C3

Now it's time to flash ESP32 module. If you already know how to flash devices with ESPHome and you have needed tool you can skip first part of this step. In case you don't:

  1. Download and install latest python version to your computer
  2. Run following command in command line:
pip install esphome
  1. Place example.txt file somewhere on your PC and rename it to example.yaml.
  2. Replace mac_address of euc_client inside ble_client section with your Remote's MAC address.
  3. Connect ESP32 to PC using exposed USB C port.
  4. Run following command in command line (make sure to change path to the file):
esphome run c:\light\example.yaml
  1. Wait for firmware to compile (it can take up to 10 minutes).
  2. Select corresponding COM port your ESP32 is connected.
  3. Try pressing Prev/Next/Vol- buttons on Remote (it can take several seconds to pair with ESP32).
  4. Your light should change according to pressed button. If your Remote is blinking when you press any button that means ESP32 is not connected with it. Check MAC address you specified and try again.

You can also change rotation parameter of led_display in display section to 0 if Light is rotated upside down for you and you prefer to mount it only one way.

In this example buttons are mapped like this:

  1. Prev → Left turn signal
  2. Next → Right turn signal
  3. Next (hold) → Restart light
  4. Vol- → Breaking signal
  5. Vol- (hold) → Breaking signal

Downloads

For Those With KingSong EUCs

For KingSong EUC owners I made another example which integrates Remote with both Light and KingSong EUC. The only issue I reached is that ESP32-C3 doesn't want to connect with my wheel directly. I'm using eucWatch project which works as a Bluetooth proxy and then I connect to the watch itself. It's seamed to much at first though, but then I realize I still need something to monitor my wheel with. And as only 1 device can have active connection with the wheel, in order to control it with remote I need this proxy anyway.

The steps of obtaining UEC MAC address and flashing ESP32 are the same as for regular users but instead of example.yaml use example-euc.yaml.

In this example buttons are mapped like this:

  1. Prev → Left turn signal
  2. Prev (hold) → Toggle EUC lock
  3. Next → Right turn signal
  4. Next (hold) → Restart light
  5. Vol- → Breaking signal
  6. Vol- (hold) → Breaking signal
  7. Vol+ → Next EUC light mode (On/Off/Auto)
  8. Play/Pause → Toggle EUC strobe (with beeps)
  9. Play/Pause (hold) → Toggle EUC strobe (with beeps) twice

Downloads

Support My Efforts

If you appreciated my work consider supporting me and my family via PayPal.

Glory to Ukraine!

Слава Україні!