/dustbike19

Not that quick and really dusty

Primary LanguageHTML

Dustbike 2019

Project to put some custom lights on my crappy playa bike.

Key Parts

Part Manufacturer Manufacturer Part Number Qty Link
Controller ST Micro Nucleo-L432KC 1 Digi-Key
Color strips Adafruit "Dotstar" APA102 strip, 60 LEDs/m, 1m 2 Adafruit
Flood lights "Lylla" "Cree U5 LED"... 1 Amazon
Tail light "Partsam" lol "2x4.5 Inch Motorcycle LED"... 1 Amazon
Battery ChromeBattery zb-12-15 (15 Ah) 1 Walmart
Enclosure - Main Box Bud Industries NBF-32016 1 Amazon
Enclosure - Control Panel "Awclub" 6.2"x3.5"x1.8" 1 Amazon
Passthrough connectors (RJ45) "Anmbest" "Shielded RJ45 Waterproof Cat5/Cat5c"... 6 Amazon
Solar charger Renogy 16W 1 Amazon
Hall sensor ZF Electronics MP101301 1 Allied Electronics
5V Regulator Bel Fuse VRAE-10E1A0G 1 Digi-Key
NFETs (Used for Floods, Taillight, Panel voltmeter) ST Micro STP40NF03L 3 Digi-Key
SSRs (Used to tie charger ground to system ground) Toshiba Semiconductor TLP3544(F) 1 Digi-Key
Panel Voltmeter "DROK" hahaha "DC 2.7-30V Voltage Tester Meter 5V 9V 12V 24V" 1 Amazon

Component Prep

Nucleo Board

  • SB9 is populated from the factory with a 0 Ohm jumper, which allows the ST-Link target to control the nRST line on the controller. I cleared this so that the unpowered ST-Link wouldn't be hanging on the nRST line. This may have been unnecessary.

Important Pinouts I Probably Shouldn't Forget

I mostly used T568B color/pin number mapping except for the color strips, where I didn't because I was young and foolish.

Note that the RJ45 passthrough connectors look like they're pinned straight through, but they do actually cross over internally so pin 1 maps to pin 1.

Color Strips

Pin Color Signal
1 Orange 5V
2 Orange/White 5V
3 Green/White 5V
4 Green MOSI
5 Blue/White SCLK
6 Blue GND
7 Brown/White GND
8 Brown GND

Floods

Pin Color Signal
1 Orange 12V
2 Orange/White 12V
3 Green/White 12V
4 Blue 12V
5 Blue/White Return
6 Green Return
7 Brown/White Return
8 Brown Return

Control Panel

Pin Color Signal
1 Orange/White Switch 1 (Charge SSR and Panel Meter enable)
2 Orange Switch 2 (Color mode enable)
3 Green/White Switch 3 (Was wig-wag mode, removed when I found out lights had toggling modes and also burned up one of my NFETs)
4 Blue Switch 4 (Floods enable)
5 Blue/White Switch 5 (Taillight enable)
6 Green Switch 6 (Patrol mode enable)
7 Brown/White Pushbutton Switch 7 (was going to be meter enable, then I just tied that to switch 1 because I wanted to use serial debug and collided on pins)
8 Brown Ground

Speed Sensor

Pin Color Signal
1 Orange/White 5V
2 Orange NC
3 Green/White NC
4 Blue NC
5 Blue/White NC
6 Green Signal (open drain)
7 Brown/White NC
8 Brown Ground

Pinouts inside the box

Controller I/O Terminal Block - Left Side

Pin Signal
1 SCLK
2 SCLK
3 SCLK
4 MOSI
5 MOSI
6 MOSI
7 SW2 Enable (Taillight Enable output)
8 SSR1 Enable (Charge / Panel Meter enable)
9 SW1 Enable (Left Flood enable, til I blew it up and put them together on SW3)
10 SW3 Enable (Right Flood enable, then both)

Controller I/O Terminal Block - Right Side

Pin Signal
1 Speed In
2 CTRL1
3 CTRL2
4 CTRL3
5 CTRL4
6 CTRL5
7 CTRL6
8 CTRL7
9 SW4 Enable (Meter Enable, til I moved it I think)
10 GND

Images

Box internals Box outside Control Panel Schematic

Operating in Color mode with floods on: YouTube

Operating in Patrol mode with taillight on: YouTube

Issues

Description Workaround Fix Done?
Hall sensor doesn't work with the one MSR bike magnet Tip Top bikes in Oakland Stocks Use a couple refrigerator magnets I had. Source a sensor that detects North poles
Motorcycle flood lights have three modes and cycle through them on each power cycle (bright, dim, flash rapidly). It's a feature. Mod the lights or source some others
Light pattern speed does not appear to match vehicle speed very well, if at all. Whatever, it works. Going to need some test fixturing or at least a test rider.
Light pattern speed does not update smoothly, especially at low speed. Whatever, it works. Add more magnets, or an encoder!
5V Supply gets quite hot, even at very low load. Didn't break, doesn't matter. Design a real board and replace reg.
Internal harnessing is a nightmare. Whatever, it works. Design a real board. Harness from inside of sealed passthrough connectors straight to board - no terminal blocks. Yes, see Dustbike Core
Using same connector for 12V floods and 5V APA102 strings, as well as control panel and hall sensor. Swapping cables is more likely to be catastrophic than not. Painted connectors and matching cables matching colors with some of Meb's nail polish. Still did it wrong once and had to replace stuff. Use different connectors (something compatible with APA102 strings out of the box would be even nicer).