If you are thinking commercial you may want to look into IP issues to see if there are active patents (probably expired by now?)
As far as design choices, based on my journeys in similar types of projects: (just my$.02, not a critique)
USB will be a significant point of failure. The connector has voltage present and electrochemical activity will destroy the connector over time unless you can keep it in a clean, low humidity environment. Consider a different connector or a wireless SOC to eliminate this point of failure and make a completely potted unit possible. If you use usb, make sure there is no voltage normally present, even from the data connections, and you have a good watertight plug for the access port. Everything gets wet on bikes. Everything. nRF52840 or ESP32C3 would be my go to choices here, but there are a lot of excellent candidates. BLE is probably the protocol you will want to use. This will facilitate making a simple app to do firmware updates and feature adjustments.
Consider eliminating the need for RPM input. This will be a significant point of failure and your greatest installation headache across different motorcycles.
As a failsafe, control the lamp output pass-through with a pulled-up mosfet of at least 50a capacity (you won’t ever see this high current, but it protects from bulb changing short circuits and other unknowns)
An Infineon BTS5016-2EKA or its low side equivalent is probably a great choice, and gives you both of the switches you need in one package, for less than $3, with full protection features. ( I assume you will need one to interrupt existing signaling and one to light where’s there is no activation from the brake switches)
The main thing is the lamp must light with regular inputs even if the circuit loses power or the chip gets a hole drilled in it. If it comes on when it shouldn’t, that is also bad, but not as bad.
Idk what sensor you are using, but consider the icm20948, it’s not too expensive ($3-4) and it has onboard sensor fusion. Only downside is it’s 1.8v, but if you use the nRf52840 that’s not an issue. Even so, level conversion isn’t too big a deal. Sensor fusion will greatly simplify understanding what’s going on.
Since power consumption is not critical I would consider using an ML algorithm on the sensor data to detect hazard conditions, lie downs, etc and filter out steep uphill/downhill false activation/failure to activate.
You could collect the data easily and train a simple model with off the shelf tools designed specifically for doing that kind of thing with MCUs. I forget the name but it’s commonly used for voice action or gesture training. You might want to train on a few bikes though, especially ones with different vibration frequencies.
Now you can add a subscription model for premium flashing features and “enhanced AI” with in-app GPT4 access to an interactive tour guide and a “best rides” feature customized to your riding style and search history! Business could pay-to play, and insurance companies, motorcycle manufacturers, and tire sellers would love that personally identifiable riding data! (Please, don’t)
If you are thinking commercial you may want to look into IP issues to see if there are active patents (probably expired by now?)
As far as design choices, based on my journeys in similar types of projects: (just my$.02, not a critique)
USB will be a significant point of failure. The connector has voltage present and electrochemical activity will destroy the connector over time unless you can keep it in a clean, low humidity environment. Consider a different connector or a wireless SOC to eliminate this point of failure and make a completely potted unit possible. If you use usb, make sure there is no voltage normally present, even from the data connections, and you have a good watertight plug for the access port. Everything gets wet on bikes. Everything. nRF52840 or ESP32C3 would be my go to choices here, but there are a lot of excellent candidates. BLE is probably the protocol you will want to use. This will facilitate making a simple app to do firmware updates and feature adjustments.
Consider eliminating the need for RPM input. This will be a significant point of failure and your greatest installation headache across different motorcycles.
As a failsafe, control the lamp output pass-through with a pulled-up mosfet of at least 50a capacity (you won’t ever see this high current, but it protects from bulb changing short circuits and other unknowns)
An Infineon BTS5016-2EKA or its low side equivalent is probably a great choice, and gives you both of the switches you need in one package, for less than $3, with full protection features. ( I assume you will need one to interrupt existing signaling and one to light where’s there is no activation from the brake switches)
The main thing is the lamp must light with regular inputs even if the circuit loses power or the chip gets a hole drilled in it. If it comes on when it shouldn’t, that is also bad, but not as bad.
Idk what sensor you are using, but consider the icm20948, it’s not too expensive ($3-4) and it has onboard sensor fusion. Only downside is it’s 1.8v, but if you use the nRf52840 that’s not an issue. Even so, level conversion isn’t too big a deal. Sensor fusion will greatly simplify understanding what’s going on.
Since power consumption is not critical I would consider using an ML algorithm on the sensor data to detect hazard conditions, lie downs, etc and filter out steep uphill/downhill false activation/failure to activate.
You could collect the data easily and train a simple model with off the shelf tools designed specifically for doing that kind of thing with MCUs. I forget the name but it’s commonly used for voice action or gesture training. You might want to train on a few bikes though, especially ones with different vibration frequencies.
Now you can add a subscription model for premium flashing features and “enhanced AI” with in-app GPT4 access to an interactive tour guide and a “best rides” feature customized to your riding style and search history! Business could pay-to play, and insurance companies, motorcycle manufacturers, and tire sellers would love that personally identifiable riding data! (Please, don’t)