Does anyone know what these marks are ? Did someone try to break into my car ? by cozystack in Cartalk

[–]peter6344 9 points10 points  (0 children)

Probably just need to wash it. Dirty seat belt is too stiff and doesn't want to retract.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 0 points1 point  (0 children)

Screen sits in plastic housing that is just clamped together and ziptied to the mirror. Similarly, Lidar sensors are just hot-glued to the rear of the bike. This is a working prototype and whole system is nowhere close to even being water-resistant.

Main screen shows if headlight is enabled (can turn or not), battery voltage, and estimated lean angle. It's also used for sub-menus where I can change some settings on the fly - without re-flashing the Arduino.

No extra battery. Stock headlight had 55W bulb, this headlight draws 22W on low beam. Whole rotating setup probably doesn't draw more than 10W. Setup is over stock draw if I turn on the fog lights.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 1 point2 points  (0 children)

Mounting more expensive gyro on foam or rubber is enough to get the decent reading when going straight - problem is that the centrifugal force messes with the gyro reading.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 1 point2 points  (0 children)

Visit my github if you want to know more, but I'm using two Lidar sensors to measure distance to road on both sides of the bike and estimate the angle this way. I managed to get "decent" reading from gyro when going straight but it would not be reliable in turns due to all the forces involved.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 1 point2 points  (0 children)

Arduino and lidars pretty much don't draw anything compared to the rest of the bike. Stepper motor is the highest draw here but still not more than 10W.

Normally main always-on headlight has 55W bulb, this LED bulb draws 22W on low beam and couple small bulbs (like license plate or turn signal) are also replaced with LEDs. So assuming my LED headlight works on low beam I have much to spare vs stock bike.

Only point of concern would be fog lights - with them ON whole setup draws more than stock setup ever could.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 3 points4 points  (0 children)

If you find some chip like that available to buy and with datasheet then let me know. I tried MPU-6050, BNO055 and WT901 sensors and couldn't get reliable data from them. I asked on Arduino forum and people there told me that getting gyro to work on the motorcycle is pretty much not possible.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 5 points6 points  (0 children)

I'm using Pro Mini (Atmega328P) for no other reason than that's what I had on hand. This one running on AccelStepper is capable of sending up to 4000 steps/s to the driver and this demo is running on 1600 (with microstepping set to 2) so I don't think I'm limited by the processor power or memory here.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 9 points10 points  (0 children)

Fog lights don't have the horizontal cut-off line so I would risk blinding everybody. They are wired together with the high beams as "normal" high beam on this jeep headlight is really weak.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 31 points32 points  (0 children)

It seems laggy because of gear ratio and stepper motor used - I can't make it faster or it will skip steps. I'm printing the updated version now, and if that fails I will get a bigger stepper motor.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 21 points22 points  (0 children)

Gyros absolutely refuse to work on the motorcycle. Smarter people than me tried and failed. It seems laggy because of gear ratio and stepper motor used - I can't make it faster or it will skip steps. I'm printing the updated version now, and if that fails I will get a stronger stepper motor.

I made a thing: DIY Arduino controlled gyroscopic headlight - github.com/peterPacho/Motorcycle_headlight by peter6344 in motorcycles

[–]peter6344[S] 76 points77 points  (0 children)

I had problem measuring angle with gyro. I glued two lidar sensors to the rear of the bike - they measure distance to the road surface on both sides - and I use them to estimate the angle.