A vibrator helped me debug a motorcycle brake light system

(bikesafe.me)

120 points | by mygnu 4 days ago ago

57 comments

  • doodlebugging a day ago ago

    I too have repurposed a similar machine to try to help me solve a nagging problem.

    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.

    • QQQQQQQQQQQQQM 10 hours ago ago

      Your issue with the o-ring reminds me of the time my buddy and I tried replacing the flex-line to one of his rear brake calipers. We rented one of the vacuum bleeder pumps from Auto-Zone, replaced the flex line, slightly loosened the bleeder cap and went to town. Sucked a ton of air out as the new line filled, but then there was a constant stream of tiny bubbles. He wanted to make absolutely sure that the line was clear, so he kept pumping and kept filling the reservoir. At first we thought maybe something about the way his original flex line failed catastrophically had introduced air all the way through the system, but the bubbles just kept coming. A full bottle of DOT3 later, we were questioning and trying to figure out where the bubbles were coming from, which turned into a fine-comb search of the entire brake line all the way back to the front of the car looking for pinholes, weeping, etc. After maybe 2 hours of searching, we found nothing. Continued pumping through a second bottle of DOT3, and then we realized that the air was seeping in through the threads of the bleeder cap and could be safely ignored. We felt real stupid.

      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.

      • doodlebugging 3 hours ago ago

        I'm glad that something in the post helped you remember something useful. You are spot-on with your description of the situation.

        Good luck to you.

    • mh- 21 hours ago ago

      I'm given to understand there are multiple companies manufacturing those back massagers in different shapes and colors these days, if you need one that can reach into those tight places under the hood without relying on the PVC pipe to help it along.

      • doodlebugging 21 hours ago ago

        Sounds like a front massager. Different tools that certainly have their place, especially when there's no pipe handy.

        • goopypoop 20 hours ago ago

          yeah there's all sorts of useful shapes and convenient features, priced for every budget. Better in most ways!

          pipes just lead to trouble

          • doodlebugging 19 hours ago ago

            >pipes just lead to trouble

            I'm an old pipeliner. I can vouch for that.

          • MengerSponge 18 hours ago ago

            As I understand it you can even source them with specific bend and taper profiles, which lets you optimize for the geometry of the system you're trying to flush.

            • dotancohen 14 hours ago ago

              I've seen one recently that seemed to be long and skinny enough where if OP could see the part, he could vibrate the part. I have no idea what part of the human anatomy such a device is necessary for. Maybe top-of-the-foot while standing?

              • epcoa 7 hours ago ago

                Near field Teledildonics

      • amelius 11 hours ago ago

        You can buy vibration motors on AliExpress for $1.

      • mc3301 20 hours ago ago

        yeah, downhill mountain bike mechanics have used this method for brake bleeds for a while.

    • userbinator 18 hours ago ago

      For bleeding hydraulic brakes, which operate on a similar principle, the normal procedure is to open the bleeder valves on the slave cylinders and vigorously pump the pedal, refilling the master as necessary, until the fluid coming out of the bleeders is free of bubbles. Vibrating the lines won't do anything since the air bubbles fill their entire inside diameter.

      • doodlebugging 15 hours ago ago

        I've been wrenching since my teens in the late 1970's and have learned a lot over that long time span. I was following, sometimes to the letter other times to the spirit, the documented procedure for burping this particular hydraulic clutch system. The system has bends from the factory that act to trap air and most aftermarket parts arrive pre-bled so that the installer doesn't need to deal with the issue because it is such a PITA to bench bleed these systems.

        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.

        • wutwutwat 5 hours ago ago

          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.

          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

          • doodlebugging 3 hours ago ago

            I follow all the recommended bleeding procedures for the assembly and since I did not want to remove the assembly from the vehicle to enable burping it, I improvised with the back massager, hoping to speed the process.

            >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

    • wutwutwat 5 hours ago ago

      pull a vacuum from the bleeder. problem solved.

      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.

      • doodlebugging 3 hours ago ago

        Thanks for this additional reply. Pulling a vacuum from the bleeder screw may be problematic since air can be pulled past the bleeder screws and you might not ever achieve a vacuum there unless you can install an open port in place of the bleeder screw and attach your MityVac or other tool to that port. I pulled vacuum at the reservoir end as was recommended in several forums and videos. It did pull air up to the reservoir but without straightening all the kinks in the system that act as traps it could not evacuate all the air. I spent multiple hours at 25 psi and never successfully bled the system. In theory it should work great though.

        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.

  • gpm a day ago ago

    Mildly related:

    "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

    • Freak_NL 15 hours ago ago

      Similarly, I used a wired vibrator (more power) to get the bubbles out of body casting alginate.

      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.

    • malfist 18 hours ago ago

      When I poured a pier for my telescope I did something similar with a sawzall

    • e40 14 hours ago ago

      Well, that was a deep rabbit hole.

    • martin_a 12 hours ago ago

      Came here to comment that. I'm using a vibrator for exactly that purpose, too. Really helps with better surfaces on the parts I make for friends (and etsy).

  • mrheosuper 21 hours ago ago

    > 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

    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

    • unwind 15 hours ago ago

      Not all microcontrollers[1]} have FIFOs for stuff like this, but perhaps you meant implementing it in software as a regular queue or something.

      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.

      • mrheosuper 14 hours ago ago

        >Not all microcontrollers[1]} have FIFOs

        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)

      • simgt 14 hours ago ago

        Their chip seems to be [0] an LIS3DH from ST, it has a fifo [1]. I actually haven't come across a modern IMU that doesn't have one.

        > 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

  • bArray 9 hours ago ago

    > So I needed a cheat code. Enter: a repurposed vibrator, No joke. I hooked it up to mimic the kind of high-frequency engine vibes you'd get ripping down a motorway. It wasn’t pretty, but it worked. I could test tweaks right from my test bench.

    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.

  • giant_fern 18 hours ago ago

    > Motorway is an hour out from where I live. Each tweak meant hopping on the bike and carving out hours to test.

    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.

    • pavel_lishin 4 hours ago ago

      Yeah, I'm very surprised they didn't record the data from a single ride, with some sort of manual entry for "brakes should light up now", and then test at home.

  • speedbird 14 hours ago ago

    Fun signal processing project and all the sampling problems sound typical. Unless this is just for your bike, given that some of the pokey fours run up to 15k rpm ~ 250Hz primary, I think it would be a lot easier to use a significantly higher sample rate and then treat in the digital domain. If you can recognise the engine speed and signal as a reliable pattern (use a digital PLL?) you might be able to subtract it and get more of the chassis signal left. As another poster pointed out, if you could do a motorway run with a high sample rate you have a good dataset to experiment with, including seeing how far you could downsample and still get appropriate sensitivity and selectivity.

  • gnfargbl 12 hours ago ago

    From the original article, linked from this article:

    > 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.

    • RandomBacon 9 hours ago ago

      Flashing brake lights are super annoying. Flashing lights are attention-grabing and thus distracting when you are trying to observe the whole scene and not just fixate on the vehicle in front of you.

      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.

  • boltzmann-brain 19 hours ago ago

    > It bumps up the debounce for next time

    ...

    > 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)

  • throwaway894345 5 hours ago ago

    This reminds me of a project I built in a class during my EE degree--I wanted a thing that would pick out the beat in a song and flash an LED accordingly. I thought it would be pretty easy to just look for spikes, but you can't have a constant threshold or else you will just run the LED for the entire duration of some high-energy portion of the song (or else you will hardly ever run it at all). It needed to be adaptive, but the adaptive threshold needed to be able to respond quickly to changes in the "average energy" of a song. It took quite a lot of calibrating to make it work properly, and I learned a lot in the process.

  • theZilber 4 days ago ago

    Sheesh, talk about "taking a break"...

    I for sure approve this creative way to test things

  • lttlrck 20 hours ago ago

    I used one to find the location of rattles in my car.

  • landgenoot 21 hours ago ago

    > Interestingly, adaptive brake light technology already exists in high-end vehicles.

    Isn't this mandatory in the EU?

    Edit. No. Only for passenger cars

  • latexr 4 days ago ago

    This is a blog post, so it should be a regular submission even if you’re the one you wrote it.

    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.

    • 17 hours ago ago
      [deleted]
    • tomhow a day ago ago

      We updated the title, thanks.

    • mygnu 4 days ago ago

      fair enough, thanks

  • lstodd 13 hours ago ago

    On a bike you have the front brake lever at the throttle on the right hand.

    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..

    • maikhoepfel 12 hours ago ago

      I know a few bikers do something similar as you describe. I want to point out it is not generally accepted truth, e.g. the German ADAC explixitly teaches to keep fingers off the brake until needed. The idea being that if you're surprised by something, you're much more likely to slam the brake, introducing instability or locking up the front. You don't hover over the brake in a car either.

      • nickthegreek 4 hours ago ago

        The local state motorcycle training course will not allow you to cover the brake while learning. They consider it especially dangerous for new riders for the reason you stated.

      • potato3732842 11 hours ago ago

        When I see comments written in that sort of emphatic style and laced with appeals to emotion I immediately write them off as reddit type drivel written by people who've got some low common denominator training or experience but don't actually understand the whys and hows of the subject.

        I don't know much about motorcycle riding, but it seems my heuristic works well.

        • onethought 11 hours ago ago

          > I don't know much about motorcycle riding, but it seems my heuristic works well.

          If you don't know much about motorcycle riding, then maybe STFU. Also how could you judge if your heuristic works well, if you don't understand the topic?

          GP is actually correct.

          • potato3732842 9 hours ago ago

            >Also how could you judge if your heuristic works well,

            Seems to work damn well on every topic I do know about.

      • lstodd 10 hours ago ago

        It is quite hard to lock the front going straight. A [edit] stoppie while spectacular is a quite simple trick. I basically did a couple the second time I rode a bike. Unintentional at that.

        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.

    • euroderf 13 hours ago ago

      On a motorcycle it is essential to have the mindset that they're out to kill you.

    • onethought 11 hours ago ago

      This technique is explicitly frowned upon in a number of licensing tests. Hand is required to be completely on throttle, or all four fingers completely on brake. So I'm not sure "completely irresponsible" is the right term, as it's actually taught that way.

      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.

      • randlet 11 hours ago ago

        Not to mention that the rear brake comes into play as applying the rear brake will transfer weight to the front allowing you to apply your front brakes harder.

        • lstodd 9 hours ago ago

          Not in my experience (20yrs). If it's all-in-or-we're dead, you either do a stoppie and hope, or do a deliberate lowside and also hope someone will patch you up once they dislodge your parts from wherever you end up in.

          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.

          • randlet 5 hours ago ago

            With all due respect it sounds like you could use a refresher on motorcycle physics.

        • 11 hours ago ago
          [deleted]
      • lstodd 11 hours ago ago

        Might be frowned upon, but it saved my life a few times.

        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.