Hi Community
This is the first time that i was not able to find all the info i needed on the forum after 4 year and 50 project not bad. So there it goes my first post.
We are trying to make a cruise control for a Yamaha motorcycle with fly by wire system. The TPS(throttle position sensor) give us a voltage between 0.7-4 v we also get a rpm from the ignition system.
we would put the on/off switch of the cruise control between TPS and arduino
My idea is : Read the voltage from the TPS with an pinMode:input when there is a votage over 0.7 than activated pinMode:output and then send voltage to the TPS that as just been read. keep the speed by modifying the output voltage according to rpm .
My questions:
the Yamaha system read 1000 times / second (according to the Yamaha spec)if i use a the pvm from the arduino is that gone work or just give a bunch of false reading to the motorcycle computer?
For the electronic circuit is there is anything that i need to protect the arduino or the on board PC. I was planning to put a resistance to make sure its not going over 4v? Anything else?
How do i sens that the switch is off? i could use a double pole switch but any idea how to do it with code?
For the stress case : we are not stupid we are using a mechanical on/off switch that cut entirely the arduino from the motorcycle system. brake will also deactivates the cruise control. Will be safe mom