A Vibrator Helped Me Debug a Motorcycle Brake Light System
Posted3 months agoActive3 months ago
bikesafe.meTechstoryHigh profile
supportivepositive
Debate
20/100
DebuggingSignal ProcessingMotorcycle Safety
Key topics
Debugging
Signal Processing
Motorcycle Safety
The author used a vibrator to debug a motorcycle brake light system by simulating high-frequency engine vibrations, sparking a discussion on creative problem-solving and signal processing techniques.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
3m
Peak period
32
84-96h
Avg / period
10.8
Comment distribution54 data points
Loading chart...
Based on 54 loaded comments
Key moments
- 01Story posted
Sep 20, 2025 at 7:33 AM EDT
3 months ago
Step 01 - 02First comment
Sep 20, 2025 at 7:36 AM EDT
3m after posting
Step 02 - 03Peak activity
32 comments in 84-96h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 28, 2025 at 7:39 AM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45312403Type: storyLast synced: 11/20/2025, 2:40:40 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
https://news.ycombinator.com/showhn.html
> Show HN is for something you've made that other people can play with. HN users can try it out, give you feedback, and ask questions in the thread.
One of my vehicles uses a hydraulic clutch. By design, air bubbles can be trapped in the master cylinder due to factory bends in the lines and the orientation of the master cylinder when it is properly installed. If this happens it will be impossible to shift the gears (manual transmission) until the air is bled from the lines.
I tried multiple air burping procedures without success. Part of the procedure involves tapping on the hydraulic lines to help dislodge air bubbles so they can flow up and out of the lines into the fluid reservoir. The area is tight and in order to do this efficiently you must remove the master cylinder from the vehicle.
I decided to avoid that removal step and employ a Sharper Image back massager as a tool to dislodge air bubbles with the system in place in the vehicle. Since that massager is huge it would not fit into tight places under the hood so I used a length of PVC pipe held tight to the lines to transfer the vibration to the lines. This allowed me to get large air bubbles out of the lines. In the end I was not able to remove enough air using this hack because an O-ring near the bottom of the system is missing or bad and that allows air to enter and flow up so i could vibrate that thing all day and never get anywhere. It was a shot in the dark anyway. If that O-ring were not missing or bad I know it would work.
pipes just lead to trouble
I'm an old pipeliner. I can vouch for that.
Bench bleeding involves straightening the lines and orienting the components along the lines, the master cylinder especially, so that air bubbles can flow up thru the lines by gravity and then using a tool to tap the lines and dislodge any bubbles so that they flow up to the fluid reservoir. I decided to hack the process using that back massager to speed up the gravity flow of any trapped air instead of using a screwdriver to tap the lines as they do in the official maintenance procedures. I also left all the parts in the vehicle making access to some curves or bends very difficult. That is why I used the PVC. It allowed me to transfer the vibration to the lines all along the length without removing anything from the vehicle.
I had already tried the usual pumping the clutch and cracking the bleeder valve process and though disappointed, was not surprised to have no success since it usually only works when the air is trapped low in this system inside the clutch slave cylinder near the bleeder valve, not higher up in the section containing the clutch master cylinder.
you can get fancy with a vacuum too but one person on the pedal pumping and one person on the bleeder, you'll get all the air out.
if you've been working on cars since the 70s, you'd know that what you're saying about "the usual pumping the clutch and cracking the bleeder valve process" being bad is nonsense. If you didn't bench bleed the master cylinder good enough, you're going to be bleeding things for awhile. Also, if you're dealing with abs, junction blocks, or bleeding wheels out of order you're going to be there awhile.
clutch systems are a single line going from a mc to a hydraulic fork actuator. They take a whole 10 minutes to bleed starting from bone dry and you don't need to tap the air out, that what bleeding them is doing
>you're putting pressure into a system filled with a fluid that does not compress, and air, which compresses a lot. The procedure for getting the air out of any system is pump the pedal, crack the bleeder, tighten, pump until you have pedal, repeat until no air comes out of the bleeder.
I agree that this is SOP for bleeding hydraulic systems. Been there, done that.
>you can get fancy with a vacuum too but one person on the pedal pumping and one person on the bleeder, you'll get all the air out.
In normal practice this also works. Many times though I am a one man band and I'm not bendy enough any more to be able to keep the pedal depressed with one leg while I contort and stretch over to the bleeder so I have resorted to using a section of PVC cut to length so that it can be jammed into the front of the seat base after rapidly pumping the pedal - holding the pedal at the floor, thus freeing the rest of my body to navigate to the bleeder.
>if you've been working on cars since the 70s, you'd know that what you're saying about "the usual pumping the clutch and cracking the bleeder valve process" being bad is nonsense. If you didn't bench bleed the master cylinder good enough, you're going to be bleeding things for awhile. Also, if you're dealing with abs, junction blocks, or bleeding wheels out of order you're going to be there awhile.
Like I said I have been turning wrenches since the late 1970's. Insinuating that I don't understand the process or problem well enough sounds powerful and righteous on your end but comes off as an unnecessary personal attack on my end. I've maintained foreign and domestically produced automobiles manufactured during the period from 1934-2022 including teaching myself troubleshooting of electronics and sensor-driven vehicles; heavy equipment on drilling rigs including mud pumps, air and hydraulic compressors, shakers, sniffers, MWD tools, LWD tools, downhole logging tools including electronics; backhoes, bulldozers, maintainers, dump trucks, water hauling trucks including air brake systems, jackhammers and compressors; small gasoline and diesel engines on yard tools and heliportable drilling rigs; rebuilt gasoline and diesel engines from a short block to an operating engine as a night mechanic for a seismic crew. I haven't done everything and I have no official certs but I have more diverse experience than most techs will get because I never walked away from an opportunity to tear something down to see how it worked. I'm pretty sure I understand the situation with this master cylinder system and like I mentioned, I followed the manufacturer recommended procedure for bench bleeding and when that didn't work I improvised. It didn't work because there was a bad o-ring in the master cylinder check valve that allowed air into the system whether it was on the bench or in the vehicle.
>clutch systems are a single line going from a mc to a hydraulic fork actuator. They take a whole 10 minutes to bleed starting from bone dry and you don't need to tap the air out, that what bleeding them is doing
I do not disagree with anything that you have said here but will leave this bench bleeding video [0] link for your own amusement. The fun starts at 4:31 in the video link. In my process, I substituted a back massager with a length of PVC pipe for the screwdriver since the master cylinder assembly was still installed in the vehicle. Prior to this, I bent or twisted the components so that it would be easier for air to flow up and out past anything that would normally be a trap.
[0] Perfection Clutch Bench Bleeding a Clutch Master Cylinder - https://youtu.be/91IYY_YENRw?t=271
It's about time I do a brake flush on my car, so it's good I remembered this story so it's fresh in my mind.
Good luck to you.
ps, if you haven't annihilated your syncros, you can 100% shift without the clutch, just "burp the throttle" when you want to shift, meaning, let off the gas, change gears, back on the gas.
shifting up anyway.
downshifting is another story, as is starting from a stop, though I've had good luck with a disabled neutral safety switch and stopping in neutral, turning the car off, pop into 1st, start when the light turns. Hell on the starter and battery, but sometimes it's the only option.
I'm a longtime manual transmission driving speed-shifter with broad experience push-starting or roll-starting vehicles with dead batteries or other problems. I have even had one automatic transmission vehicle that could be started by putting the transmission into forward or reverse gear and turning the key so that the starter bendix drive pinion gear would engage and rotate the flywheel until it cranked the engine. Gasoline engine - 283 cubic inch Chevrolet with a PowerGlide transmission behind it. This was in a 1946 Chevy PU that had no top speed that I ever found. It would go faster until your own common sense took over.
Downshifting and upshifting by RPM are useful skills for anyone driving a vehicle with a manual transmission. Catching the point where your RPMs allow you to slip into a lower gear takes a little practice. You should do like I did and refine your skills in an old Ford dump truck with dicey hydraulic brakes, one headlight bulb, no windshield wipers, and a 6 cubic yard load of crushed limestone in the dump bed. It's more fun that way.
"Evan and Katelyn" is the name of a youtube channel where (amongst other less mature things) they make a bunch of small things with concrete and epoxy, like a concrete keyboard. Both materials (especially concrete) need some assistance in flowing into small spaces and getting bubbles out. For the size of project they often work on... a personal vibrator seems to work damn well.
Concrete keyboard video as an example: https://www.youtube.com/watch?v=HUSG5ohV0nY
https://www.cosmopolitan.com/sex-love/advice/a4805/history-o...
It makes sense. Specific professional tools to vibrate viscous fluids to get bubbles out of it exist (like those odd looking concrete vibrators), but for a small handheld vibrating tool there is already an enormous market of affordable tools which do just that.
The author is configuring the sensor wrong i think. The usually way is you setup sampling rate of register, setup fifo inside register, wait for interrupt from sensor(through GPIO pin), then read from FIFO. Just blindly read data from sensor will get you in trouble, like reading duplicate value
Anyway, even easier since the OP seems to be dealing a lot with the time between samples, would be to just make sure that at least 2.5 ms have passed before reading the sensor again. Right?
[1] Not sure if older blog posts detail the hardware, I do remember reading about this product on here before.
No, i mean the FIFO inside the sensor. The sensor will populate FIFO itself, and trigger interrupt to MCU when the FIFO is full(or half full, configurable)
> would be to just make sure that at least 2.5 ms have passed before reading the sensor again
You're resampling at the same rate by doing this, which won't be accurate due to very slight variations in timings.
[0] https://cdn.shopify.com/s/files/1/0914/0181/4398/files/24-10...
[1] page 19, https://www.st.com/resource/en/datasheet/lis3dh.pdf
It's easier said than done, but you might want to approach this like a data science project. Record the data from your test runs, annotate the behaviour you want, and build up a dataset. You should be able to experiment with any number of tweaks (admittedly except for the data sampling itself) without having to get back on the bike.
You always, always have to have at least two fingers on the brake lever and control the throttle with the thumb and palm.
It is completely irresponsible to ride not doing that because sudden obstacle will not give you enough time to put them back on it. Then you lose 60-80% of braking power for a second or two.
If you are doing it right then when you drop throttle you almost automatically slightly pull the brake lever. If the lever and brake light switch on it are adjusted properly like they should be, you have the brake lights on.
Nice project, but..
The whole point of learning to ride is to train yourself to always be prepared and situationally aware, to maintain total awareness of what you are doing, what is going on ahead and behind you, and keeping being able to correctly react as fast as possible whatever happens. Thus fingers on the brake.
They are seriously out there to kill you. Be it distracted car drivers, sloppy road maintenance, stray dogs, bad weather, random idiots.. any of this will kill you if you relax.
An occassional lowside or two in one's first two seasons most likely won't. Given even a mediocre protection set, one will get away with a bit of shock and maybe needing a new pair of pants. And a whole lot of training of the kind no school can give. Like when to pull the front brake and when to just open throttle and hope for the best.
Besides there is a saying - if you do not crash once a season, you do not ride, period.
Which is a grim reminder of that if one does not push oneself, one is losing skill.
I ride for about 30 years already and this is true. Motorcycles are not safe and cannot be safe, safety isn't in the concept, and this is what we love about them.
One can do a lowside, that is losing traction (not even locking, but just overspeeding and then braking, even engine-braking) in a turn. But this point is basically the first that must be taught: how to enter and exit turns properly.
I think ADAC is just being lazy / or too much ass-covering. But I don't know. I'm self-taught and not in Germany.
If you drop the throttle, you will already begin to decelerate from the engine your fingers are A LOT faster than "a second or two" in clasping the brake... easily sub one second.
In either case it's front brake. A bit of tilt for the second case. The rear brake is not needed at all.
If it's just a overspeed corner, you try to slow down gently, while maintaining both wheels on the trajectory. So just a little play with throttle and just a little front brake so that the bike stays balanced so to say. No rear brake at all because dropping the throttle a bit is all that's needed for the rear wheel.
If that is not enough, you're not going to make that corner, you have had too much speed coming in, and you will pay for that right now by crashing into something.
I learned this in 1990s when I first started riding.
Those are the basics.
If you drop throttle on a belt or variator transmission.. well the belt slips.
On a typical say japanese 600-ish cc with chain final drive, dropping throttle would not do 1/5 of what pulling the front brake will do.
If you have an emergency braking situation the rear brake is not only useless, it's a hazard, the rear wheel just lifts and loses traction and if you lock the rear wheel, not only you lose gyro stab effect, when you release front brakes what happens is that you highside. (crash that is).
Rear brake is for parking or slow coasting.
They all are really out there to kill you, so you must be ready at all times.
> Moreover, during intense braking scenarios, it flashes proportionately to the braking intensity.
Is it just me who finds this behaviour to be a regression? If I see a brake light on a motorbike, I know that the bike is slowing, and I respond accordingly. An urgent flashing brake light doesn't make me react faster, but it does serve to confuse and distract my brain.
Or if you are the type of driver that fixates on the vehicle in front of you, and a vehicle to the side has flashing brake lights, then it distracts you from the vehicle in front of you.
They should be illegal, and they already probably are illegal - in my state, if the brake pedal is pushed, the brake light must be on, and if it is flashing, then it is alternating between on and OFF. (And a judge does not care if "technically it is 1% on and not completely off" - it looks off.)
Next time you are in traffic, imagine if every vehicle in front of you had flashing lights.
...
> But when things are smooth for a while, the debounce comes back down
it sounds like he's just incrementing a variable in the first case and using timers to decrement it in the second case. that's a bad implementation. the correct implementation here is an envelope follower, or maybe-perhaps a kalman filter. OP's implementation will exhibit motorboating: https://en.wikipedia.org/wiki/Motorboating_(electronics)
Those massage guns could be quite useful too. When finding a problem in the field, replicating it on the lab bench is always ideal.
> The current solution: The jitter helped, but it wasn’t bulletproof. Then I realized something deeper, the sensor has its own built-in sample rate, 400 times per second. If I read it too quickly, I might just be grabbing the same number twice. No new data. And if that repeat looks like a sustained deceleration, the light fires.
It should be a de-bounce based on time, not based on an arbitrary sampling rate. So you are looking for an average value threshold over a sliding window based in time.
Better yet:
1. On start-up it should be able to indicate an error via blink codes. You should for example be able to detect if an LED has burned out, there is moisture detected, that a brake signal was not detected over a X minute runtime, the temperature is outside safe limits, or the circuit draws current outside of the expected limits.
2. Use an IMU to detect de-acceleration events encase there is a break in the signal. It's obviously not ideal, but far better than nothing. Gravity is ~9.81m/s, and a braking force would be detected perpendicular to this. Again, you would use the error code on start-up to indicate that there is an issue.
3. Consider the use of an internal battery encase there is an issue with the supply voltage to the brake light. A bad power or ground could cause continuous resets, and failure to detect a signal.
Isn't this mandatory in the EU?
Edit. No. Only for passenger cars
I for sure approve this creative way to test things
2 more comments available on Hacker News