Project: Simple Gear Indicator

Im a Computer Science student my self and cant belive I didn't think of this myself! great use of a small microcontroller. If you don't mind me asking, what was your method of figuring out what gear your in?

Hey, glad you asked!

I mapped out where the electrical contact that closes the circuit for the Neutral light on the Neutral Position Switch goes in each gear, added an extra "neutral light spot" for each gear (and each of those got a separate wire). Those all got run as separate wires to individual digital input pins on the Arduino.

When the Arduino is on, it checks if any of the wires have a closed circuit (corresponding to the electrical contact being in a certain position, i.e., being in a certain gear.) It's just a bunch of IF loops: when it detects one signal going low (closed circuit, like a button being pressed), it changes a variable to be that signal's "gear number", and then prints the variable to the screen.

I wasn't able to make a contact for 1st gear, so programmatically I just said if none of the other contacts (N-2-3-4-5-6) are closed, assume you're in 1st.

The arduino sketch is in TXT format in the post above yours if you want to really get into the details. I'm not a programmer by any means, it's basically just a bunch of example sketches frankensteined together.
 
Hey, glad you asked!

I mapped out where the electrical contact that closes the circuit for the Neutral light on the Neutral Position Switch goes in each gear, added an extra "neutral light spot" for each gear (and each of those got a separate wire). Those all got run as separate wires to individual digital input pins on the Arduino.

When the Arduino is on, it checks if any of the wires have a closed circuit (corresponding to the electrical contact being in a certain position, i.e., being in a certain gear.) It's just a bunch of IF loops: when it detects one signal going low (closed circuit, like a button being pressed), it changes a variable to be that signal's "gear number", and then prints the variable to the screen.

I wasn't able to make a contact for 1st gear, so programmatically I just said if none of the other contacts (N-2-3-4-5-6) are closed, assume you're in 1st.

The arduino sketch is in TXT format in the post above yours if you want to really get into the details. I'm not a programmer by any means, it's basically just a bunch of example sketches frankensteined together.
Wow, thats some real engineering! If u ever make a write up I think ill add it to my bike too since I always seem to forget which gear I'm in. Ive also seen some aftermarket gauges (not sure if its plug and play) but yeah, I definitely could use more info when riding!
 
Back
Top