ninjette.org

Go Back   ninjette.org > 2008 - 2012 Ninja 250R > 2008 - 2012 Ninja 250R Farkles

Reply
 
Thread Tools
Old February 8th, 2010, 10:21 PM   #81
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Fresh page!
Now I can connect and disconnect the gauge from the bike whenever I'd like.
I will get another connector and seal it off with silicon to waterproof plug the socket with for when it is raining. The gauge will pop off and go in my jacket pocket to stay dry. I will also install a big piece of shrink tubing over the connector itself to shield the connector and wires from vibration and weather.

This will also allow me to plug in later devices.

Now to those switches. I promise this time! lol
I found my motivation.






__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote




Old February 9th, 2010, 05:48 AM   #82
binlagin
ninjette.org member
 
binlagin's Avatar
 
Name: Ben
Location: Ottawa
Join Date: Jul 2009

Motorcycle(s): 2005 CBR600RR

Posts: 132
One thing i realized... all these little parts add up quite quickly!

I'm looking forward to seeing it mounted up!

PS... thats a good idea to run the wires down the front of the dash assembly... Thats pretty much what I'm going to be doing with my 12v line and Audio cable in my project.
__________________________________________________
2005 CBR600RR - 2:19 Calabogie Motorsports Park, Ontario, Canada
binlagin is offline   Reply With Quote


Old February 9th, 2010, 07:19 AM   #83
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Plenty of wire room under the windscreen.
As if the space were inviting the install of additional gadgets.
True, the little bits and pieces add up quick.
I must be somewhere near $150-$200 total on this project, but I did buy extra materials here and there for stock. That also includes the $50 for the chip (could go down to $5) and $30 for the accelerometer (could likely also cut half the cost or more on this in bulk).

Today's the day to knock out these switches if I want to ride my bike sooner than later. Look for some progress later tonight!
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 9th, 2010, 12:22 PM   #84
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Well that was easy. Not so perfect or clean, but easier than expected.
Now for the scary part.. drilling holes to mount this thing in my sprocket cover.
They'll have to be tapped and the bracket precisely located for this to work right. Otherwise stuff will move around and crap out after a short while.















__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 9th, 2010, 03:15 PM   #85
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Next time you see it, it should be wired up and ready for programming.
Yes, I tested the "bumpers" and they work!
I had my doubts for a minute there but this is gonna happen.








Damn man, where's a machinist when you need one to make this easy on me. lol
I am only one man. I need a team of techs.
My switch on the shift lever looks smaller than the big ol brick of a switch Kawasaki put on the kick stand.
Glad that part is over with for now.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 9th, 2010, 11:15 PM   #86
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Got a lot of work done on the gauge tonight!
I'm wiped.

Opened the garage and it was still raining like crazy.
This is a good winter project.


First off I ran the wires in the harness for the shifter switches!
Also sealed off the connector with shrink tubing.


Then put a piece of shrink tube on the gauge


They connect and seat nicely


All powers up good still


If you look closely you can see a twisted wire running near my harness. That's the wires heading down to the shifter switches.


All I have left to do is connect these two wires to the switches. Then a wire from both switches to the frame as a ground. Then program the gauge!
Dayum I can't wait to have this thing done and working!


The brains of the outfit


finally my window is back in and the connections have been tested with everything back installed.


Extremely close to having this finished now. I knocked out a ton of work on it tonight.
I'd say it's about 90% done, unless of course I bump in to some unforeseen problems.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 9th, 2010, 11:23 PM   #87
Chubbs032
ninjette.org member
 
Name: Chris
Location: LA
Join Date: Dec 2009

Motorcycle(s): 250r

Posts: 199
That's some amazing work, when are you gonna start selling them??
Chubbs032 is offline   Reply With Quote


Old February 9th, 2010, 11:33 PM   #88
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
If this one works, I'll design one twice as good that I can assemble in a half hour or so.
Then if somebody wants to buy them from me, they can. That would be a long time off though.
Anyone could do the same thing by then too. lol
Just showed you all how I did it.

I'm very close to proving video. We might see it working 100% by tomorrow if I'm lucky. Maybe a couple more days max. I'm hoping I got everything wired right and it's just programming from here.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 10th, 2010, 10:00 AM   #89
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
Yeah man..build some and sell them (if it works) lol..
Don't really care for lean gauge.. Just gear indicator. May be shrink the box down since lean gauge is not needed?
Also should epoxy up the digit display? The back part kinda exposed big time. Just fill the hole up with silicon?
Posted via Mobile Device
randomwalk101 is offline   Reply With Quote


Old February 10th, 2010, 12:53 PM   #90
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Yeah this one is just the "rough draft" sloppy test. Wait till you see what happens when I try and make something presentable.
I'll have to get out the CAD programs and draw all the parts on the computer first. Takes a lot of time because I have to take brakes because it hurts! lol

This one no need for epoxy on the digit. Just for testing and sunny weather riding. Unplug for the rain.. I don't really ride in the rain unless in emergencies anyways. (get caught in rain)

I can easily make the shift gauge by itself, or another bigger gauge with even more features. When I use an atmel chip, it's like drawing on a computer screen and very easy to make circuit boards.

At any rate, one connector and a program away from a finished prototype to test. Hehe I get to try the first one.
I'll be writing the program tonight.

Wired up the switch with shrink tubing and liquid electrical tape. the blue wire is grounded to the sprocket cover bolt with a hoop crimp terminal that I soldered on.

One interesting thing about it is the transmission won't let the downshift switch be pressed after hitting first gear. Kinda cool but hard to explain how it helps.




NOW, we are ready to see some action. =)
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 10th, 2010, 09:04 PM   #91
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
It'll be interesting how it keeps up with the gears. Down is one (+1) then up is two which is also +1 gear. Also up 1/2 is neutral but switch can't tell so need to tap into neutral wire. Lol.. Let's hope it doesn't get confused and starts searching for 7th gears
I think it's better to use rpm and speed to calc gearing.
randomwalk101 is offline   Reply With Quote


Old February 10th, 2010, 11:18 PM   #92
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Quote:
I think it's better to use rpm and speed to calc gearing.
You have to understand programming. How a "If then" function works.

If something happens, then do that. Or else do this.

That's how it will count gears.
"Get stuck in X gear. If shift up then display higher gear, or else if shift down then display lower gear"

It will know when it's in first gear. It does not need to know when it's in neutral. Also, you can reset it by pressing a button if there is any problem.

It will work, no worries. I'm programming it now. Here's how the wires ended up looking on the bike..
I wouldn't have drilled holes and mounted that stuff if I didn't think it would work.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 11th, 2010, 05:42 AM   #93
Timm3h
ninjette.org member
 
Name: Tim
Location: Ottawa
Join Date: Jun 2009

Motorcycle(s): 2009 Ninja 250R

Posts: 60
Quote:
Originally Posted by ninja250 View Post
You have to understand programming. How a "If then" function works.

If something happens, then do that. Or else do this.

That's how it will count gears.
"Get stuck in X gear. If shift up then display higher gear, or else if shift down then display lower gear"

It will know when it's in first gear. It does not need to know when it's in neutral. Also, you can reset it by pressing a button if there is any problem.

It will work, no worries. I'm programming it now. Here's how the wires ended up looking on the bike..
I wouldn't have drilled holes and mounted that stuff if I didn't think it would work.
looks awesome! like it was supposed to be a part of the bike!
Timm3h is offline   Reply With Quote


Old February 11th, 2010, 08:34 PM   #94
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Well here's where I am now.
Lil confusing to be honest but doing my best.
I'd say I have about 40% of the program finished.

I have to implement a something in the program that does not let the shift gauge advance to the next gear until you release the shifter.
Sometimes I may downshift but still keep my foot on the shifter for a while after in the down shifted position. I forgot to account for this in my program and the gauge keeps shifting all the way down to first gear.

So, I need a subroutine that checks to see if the shifter switch is still depressed before moving on to displaying the next gear.

Confusing ey?
I still don't know how I'm going to do it yet, but I'll figure it out. It's only a matter of typing the exact right sequence of words.

You can see that the program has condensed and complicated some from the original by using the additions of subroutines like "clear_digits" instead of manually clearing them in each routine. Thus helping me save program space and the whole things runs more efficiently and quicker.

I find it simply amazing how they can get mini computer chips to read this jumbo and it does things accordingly. The whole thing won't work unless I tell it the right words!

Just looking at the program now versus where I left off this morning I know I can improve on several things immediately.

Quote:
' {$STAMP BS2}
' {$PBASIC 2.5}

x VAR Word
current_gear VAR Word

main:
IF (IN5 = 1) THEN shift
IF (IN7 = 0) THEN sss
IF (IN10 = 0) THEN sss
GOSUB lean
GOTO main

lean:
PULSIN 6, 1, x
DEBUG CLS, ?x
IF (x < 2000) THEN r2
IF (x < 2275) THEN r1
IF (x < 2800) THEN middle
IF (x < 2840) THEN l1
IF (x > 3000) THEN l2 ' need to fix sticky left max lean LED
RETURN

middle:
LOW 0
LOW 1
HIGH 2
LOW 3
LOW 4
RETURN

r1:
LOW 0
HIGH 1
LOW 2
LOW 3
LOW 4
RETURN

r2:
HIGH 0
LOW 1
LOW 2
LOW 3
LOW 4
GOSUB rrr
RETURN

l1:
LOW 4
LOW 0
LOW 1
LOW 2
HIGH 3
RETURN

l2:
LOW 0
LOW 1
LOW 2
LOW 3
HIGH 4
GOSUB lll
IF (x < 3008) THEN L1 'still sticky..
DEBUG "stuck" , CR
RETURN

shift:
GOSUB clear_digits
HIGH 1 'display neutral until...
LOW 15
LOW 12
LOW 14 ' new
IF (IN10 = 0) THEN first ' new
IF (IN7 = 0) THEN second ' new
GOTO shift

first:
GOSUB clear_digits
HIGH 0
LOW 15
LOW 8
PAUSE 400
IF (IN10 = 0) THEN first
IF (IN7 = 0) THEN second 'trick jump neutral
GOTO first 'new

neutral:
GOSUB clear_digits
HIGH 1
LOW 12
LOW 14
LOW 15
PAUSE 400
IF (IN10 = 0) THEN first
IF (IN7 = 0) THEN second
IF (IN5 = 1) THEN buttonbreak
GOTO neutral

second:
GOSUB clear_digits
HIGH 2
LOW 9
LOW 8
LOW 14
LOW 12
LOW 13
PAUSE 400
IF (IN10 = 0) THEN neutral
IF (IN7 = 0) THEN third
GOTO second

third:
GOSUB clear_digits
HIGH 3
LOW 9
LOW 8
LOW 14
LOW 15
LOW 13
PAUSE 400
IF (IN10 = 0) THEN second
IF (IN7 = 0) THEN fourth
GOTO third

fourth:
GOSUB clear_digits
HIGH 4
LOW 11
LOW 14
LOW 8
LOW 15
PAUSE 400
IF (IN10 = 0) THEN third
IF (IN7 = 0) THEN fifth
GOTO fourth

fifth:
GOSUB clear_digits
HIGH 3
LOW 9
LOW 11
LOW 14
LOW 15
LOW 13
PAUSE 400
IF (IN10 = 0) THEN fourth
IF (IN7 = 0) THEN sixth
GOTO fifth

sixth:
GOSUB clear_digits
HIGH 2
LOW 9
LOW 11
LOW 14
LOW 15
LOW 13
LOW 12
PAUSE 400
IF (IN10 = 0) THEN fifth
IF (IN7 = 0) THEN sixth
GOTO sixth

lll:
LOW 11
LOW 12
HIGH 8
HIGH 9
HIGH 14
HIGH 13
HIGH 15
PAUSE 50
HIGH 9
HIGH 8
HIGH 11
HIGH 12
HIGH 13
HIGH 14
HIGH 15
PAUSE 50
RETURN

rrr:
LOW 8
LOW 15
HIGH 14
HIGH 13
HIGH 9
HIGH 11
HIGH 12
PAUSE 50
HIGH 9
HIGH 8
HIGH 11
HIGH 12
HIGH 13
HIGH 14
HIGH 15
PAUSE 50
RETURN

sss:
HIGH 8
HIGH 12
LOW 9
LOW 11
LOW 14
LOW 15
LOW 13
PAUSE 50
HIGH 9
HIGH 8
HIGH 11
HIGH 12
HIGH 13
HIGH 14
HIGH 15
PAUSE 50
RETURN

clear_digits:
LOW 0
LOW 1
LOW 2
LOW 3
LOW 4
HIGH 9
HIGH 8
HIGH 11
HIGH 12
HIGH 13
HIGH 14
HIGH 15
RETURN

buttonbreak:
GOSUB clear_digits
PAUSE 500
IF (IN5 = 1) THEN main
RETURN

hold:
PAUSE 500 ' use this as shift release indication splitter
IF (IN7 = 0) THEN RETURN
GOTO hold
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 11th, 2010, 08:40 PM   #95
Timm3h
ninjette.org member
 
Name: Tim
Location: Ottawa
Join Date: Jun 2009

Motorcycle(s): 2009 Ninja 250R

Posts: 60
I dont even know how you program in that.

I would have a boolean that would keep track if the button is being pressed and block out all other gear options until it is released
Timm3h is offline   Reply With Quote


Old February 11th, 2010, 08:50 PM   #96
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Eh, it's just like C really. Just a little easier and dumbed down. I think it's a version of "BASIC".

You have all your basic operators and a 48 word language set to work from.
Then your registers and your i/o. You don't even have to go through chip initialization. Ancient microcomputers.

I just get lost in my subroutines bigtime. I've seen some people be a whizz at these things like you wouldn't believe. I know it's capable of doing what I need it to, I just have to figure out how to make it do it by wording it right.

I'd be stuck on the same things with an atmel chip right now. Just have to figure out how the chip wants me to word it.
I have two small bugs. The over-shift thing as stated above and upon the return lean in the lean routine one LED gets stuck before another fires. I should be able to work them out with enough tinkering.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 11th, 2010, 08:56 PM   #97
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Yes,
I think I may convert from a "If upshift_detected then second gear"
"now since in second gear if upshift then third" and so on type of deal to a

"Variable word current_gear"
"if upshift_detected then current_gear = current_gear + 1"
"if downshift_detected then current_gear = current gear - 1"
"display current gear"

While a separate while routine handles not letting the current gear variable overun itself. Oiy! Confusing.
Maybe I should draw up a flow chart.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 11th, 2010, 09:00 PM   #98
Snake
ninjette.org certified postwhore
 
Snake's Avatar
 
Name: Rick
Location: Alexandria, Louisiana
Join Date: Jan 2009

Motorcycle(s): 05 Blue Ninja 250

Posts: Too much.
MOTY - 2017, MOTM - Jan '19, Oct '16, May '14
KC that is some great fabricating on the switch bracket.
Snake is offline   Reply With Quote


Old February 12th, 2010, 05:48 PM   #99
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Major progress just a bit ago!
I figured out my programming woes. The gauge is on the bike and counting gears!

It has a bug or two but I did damn good for a first attempt! The second one will be spot on. I know exactly everything that needs to take place now to put a complete 100% functioning gear display on to our little ninja 250Rs.

It is now only a matter of time before I built a unit that works perfectly.

This one I made here now is good, but the next one will be 100%.

I will take video of the gauge in operation tonight.

Also, here is how complex the programming is getting. check out this shift routine! whew! Just a small clip of the program now! If I copied and paste the whole thing this page would go on forever.

I did manage to create a subroutine to not advance the gear count until the lever us released too and it's working! Video later.

Quote:
shift:
GOSUB clear_digits
HIGH 1
LOW 15
LOW 12
LOW 14
IF (IN10 = 0) THEN first
IF (IN7 = 0) THEN first_up_debounce
'IF (IN5 = 1) THEN halfbreak
GOTO shift

first:
GOSUB clear_digits
HIGH 0
LOW 15
LOW 8
' PAUSE 400
IF (IN10 = 0) THEN first
IF (IN7 = 0) THEN first_up_debounce
IF (IN5 = 1) THEN buttonbreak
GOTO first

neutral:
GOSUB clear_digits
HIGH 1
LOW 12
LOW 14
LOW 15
' PAUSE 400
IF (IN10 = 0) THEN first_down_debounce
IF (IN7 = 0) THEN neutral_up_debounce
IF (IN5 = 1) THEN buttonbreak
GOTO neutral

second:
GOSUB clear_digits
HIGH 2
LOW 9
LOW 8
LOW 14
LOW 12
LOW 13
' PAUSE 400
IF (IN10 = 0) THEN second_down_debounce
IF (IN7 = 0) THEN second_up_debounce
IF (IN5 = 1) THEN buttonbreak
GOTO second

third:
GOSUB clear_digits
HIGH 3
LOW 9
LOW 8
LOW 14
LOW 15
LOW 13
' PAUSE 400
IF (IN10 = 0) THEN third_down_debounce
IF (IN7 = 0) THEN third_up_debounce
IF (IN5 = 1) THEN buttonbreak
GOTO third

fourth:
GOSUB clear_digits
HIGH 4
LOW 11
LOW 14
LOW 8
LOW 15
' PAUSE 400
IF (IN10 = 0) THEN fourth_down_debounce
IF (IN7 = 0) THEN fourth_up_debounce
IF (IN5 = 1) THEN buttonbreak
GOTO fourth

fifth:
GOSUB clear_digits
HIGH 3
LOW 9
LOW 11
LOW 14
LOW 15
LOW 13
' PAUSE 400
IF (IN10 = 0) THEN fifth_down_debounce
IF (IN7 = 0) THEN fifth_up_debounce
IF (IN5 = 1) THEN buttonbreak
GOTO fifth

sixth:
GOSUB clear_digits
HIGH 2
LOW 9
LOW 11
LOW 14
LOW 15
LOW 13
LOW 12
' PAUSE 400
IF (IN10 = 0) THEN sixth_down_debounce
IF (IN7 = 0) THEN sixth_up_debounce
IF (IN5 = 1) THEN buttonbreak
GOTO sixth

first_up_debounce:
IF (IN7 = 1) THEN second
IF (IN7 = 0) THEN first_up_debounce
GOTO first_up_debounce

first_down_debounce:
IF (IN10 = 1) THEN first
IF (IN10 = 0) THEN first_down_debounce
GOTO first_down_debounce

neutral_up_debounce:
IF (IN7 = 1) THEN second
IF (IN7 = 0) THEN neutral_up_debounce
GOTO neutral_up_debounce

neutral_down_debounce:
IF (IN10 = 1) THEN first
IF (IN10 = 0) THEN neutral_down_debounce
GOTO neutral_down_debounce

second_up_debounce:
IF (IN7 = 1) THEN third
IF (IN7 = 0) THEN second_up_debounce
GOTO second_up_debounce

second_down_debounce:
IF (IN10 = 1) THEN neutral
IF (IN10 = 0) THEN second_down_debounce
GOTO second_down_debounce

third_up_debounce:
IF (IN7 = 1) THEN fourth
IF (IN7 = 0) THEN third_up_debounce
GOTO third_up_debounce

third_down_debounce:
IF (IN10 = 1) THEN second
IF (IN10 = 0) THEN third_down_debounce
GOTO third_down_debounce

fourth_up_debounce:
IF (IN7 = 1) THEN fifth
IF (IN7 = 0) THEN fourth_up_debounce
GOTO fourth_up_debounce

fourth_down_debounce:
IF (IN10 = 1) THEN third
IF (IN10 = 0) THEN fourth_down_debounce
GOTO fourth_down_debounce

fifth_up_debounce:
IF (IN7 = 1) THEN sixth
IF (IN7 = 0) THEN fifth_up_debounce
GOTO fifth_up_debounce

fifth_down_debounce:
IF (IN10 = 1) THEN fourth
IF (IN10 = 0) THEN fifth_down_debounce
GOTO fifth_down_debounce

sixth_up_debounce:
IF (IN7 = 1) THEN sixth
IF (IN7 = 0) THEN sixth_up_debounce
GOTO sixth_up_debounce

sixth_down_debounce:
IF (IN10 = 1) THEN fifth
IF (IN10 = 0) THEN sixth_down_debounce
GOTO sixth_down_debounce

lll:
LOW 11
LOW 12
HIGH 8
HIGH 9
HIGH 14
HIGH 13
HIGH 15
PAUSE 50
HIGH 9
HIGH 8
HIGH 11
HIGH 12
HIGH 13
HIGH 14
HIGH 15
PAUSE 50
RETURN

rrr:
LOW 8
LOW 15
HIGH 14
HIGH 13
HIGH 9
HIGH 11
HIGH 12
PAUSE 50
HIGH 9
HIGH 8
HIGH 11
HIGH 12
HIGH 13
HIGH 14
HIGH 15
PAUSE 50
RETURN

sss:
HIGH 8
HIGH 12
LOW 9
LOW 11
LOW 14
LOW 15
LOW 13
PAUSE 50
HIGH 9
HIGH 8
HIGH 11
HIGH 12
HIGH 13
HIGH 14
HIGH 15
PAUSE 50
RETURN

clear_digits:
LOW 0
LOW 1
LOW 2
LOW 3
LOW 4
HIGH 9
HIGH 8
HIGH 11
HIGH 12
HIGH 13
HIGH 14
HIGH 15
RETURN

buttonbreak:
GOSUB clear_digits
PAUSE 500
IF (IN5 = 1) THEN main
RETURN
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 12th, 2010, 05:54 PM   #100
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Aside from the update above..
I think a neutral sensor is mandatory on the next gauge.
Without it, you need a reset button and a hell of a complex program. (or careful manipulation of the shift lever to actuate the switches without shifting to reset the gauge) That is how the current gauge I'm working on now is. Resettable with button or careful manipulation of the shift lever. So I'm pretty sure the next one will actually be easier. lol

Video on it's way.
It's really not bad at all for a first attempt and no other sensors besides the shift buttons and a program/reset button. I'm surprised I did this good!

I think if I put a resistor on the neutral sensor coming off the bike to one of the input lines that an LED from the lean gauge circuit is on I be able to read neutral on this project without having to make a new one as well. lol
If you weren't confused before, that might help!
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 12th, 2010, 08:32 PM   #101
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
And with the 100th post to this thread...

Videos of it working!

I need to remove the resistor from the display to make it viewable during daylight so had to film at night. Will do soon. At least I have some sort of footage of the gauges working!

Needs a few more bugs worked out but check it out!

Next I'm going to change the display resistance and add a neutral sensor wire.

This video just down my street, turn around and come back again. I even tried to shift to seventh on purpose I think but it didn't work. hahaha

Link to original page on YouTube.

This video went to sixth gear and back again.

Link to original page on YouTube.

__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 12th, 2010, 10:57 PM   #102
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
That's pretty neat. Glad to see it come to fruitation.
Posted via Mobile Device
randomwalk101 is offline   Reply With Quote


Old February 13th, 2010, 09:49 AM   #103
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
Btw, how much approx will it cost to mass produce the shift gauge by itself?
Posted via Mobile Device
randomwalk101 is offline   Reply With Quote


Old February 13th, 2010, 09:53 AM   #104
Timm3h
ninjette.org member
 
Name: Tim
Location: Ottawa
Join Date: Jun 2009

Motorcycle(s): 2009 Ninja 250R

Posts: 60
Looks awesome.... Kinda got me thinking a heads up display on the windscreen would be cool, just have to mirror the text and what not
Timm3h is offline   Reply With Quote


Old February 13th, 2010, 12:18 PM   #105
Momaru
ninjette.org certified postwhore
 
Momaru's Avatar
 
Name: Paul
Location: Roanoke, VA
Join Date: Jun 2009

Motorcycle(s): 2008 Candy Plasma Blue 250R

Posts: A lot.
Congratulations KC! Guess you've been working on the shift section too hard to get the lean angles dialed in yet?
__________________________________________________
Proud member of the Blue Army
Momaru is offline   Reply With Quote


Old February 13th, 2010, 06:28 PM   #106
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
It'd be cool to have a gadget that displays gear, volt meter, auto signal cancellation
Posted via Mobile Device
randomwalk101 is offline   Reply With Quote


Old February 14th, 2010, 12:14 PM   #107
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Quote:
Originally Posted by randomwalk101 View Post
Btw, how much approx will it cost to mass produce the shift gauge by itself?
Posted via Mobile Device
I'm not sure.
If I were to do a shift gauge for sale, it will have professional printed circuit boards and a housing made just for it. I can do the circuit boards myself for cheap (like $100 for 10 pcb of the gauge) so $10 ea there..
So then add $5-10 for a processor..
few wires and switches and stuff that needs to come with the kit - $20
and a few more components to populate the PCB.. maybe another $10 ea pcb.

You're probably looking at roughly $50 each to produce a shift gauge if I do it.
You could then sell them for double, since it operates on different principles than most gauges and can probably accommodate lots of different bikes that couldn't add one of these before.

I dunno, this is all a quick estimate though man. Lots of unforseen stuff could pop up during the engineering of the final unit that might raise costs or even lower them!


Quote:
Originally Posted by Timm3h View Post
Looks awesome.... Kinda got me thinking a heads up display on the windscreen would be cool, just have to mirror the text and what not
I was thinking that earlier. Quick reverse and flip of the digit or whatever and the thing is now a HUD. I thought that was cool as well.

Quote:
Originally Posted by Momaru View Post
Congratulations KC! Guess you've been working on the shift section too hard to get the lean angles dialed in yet?
I'll get there. I'm not so sure the sensor is going to be the right one, but I'm still working on it. It works perfect when stationary and leaning the bike but I think it does respond to the gravity change in a corner. I'm not so sure yet. I might have to change the orientation of the sensor inside of the actual gauge itself. It's sensing on the right plane but I need it tilted a bit more maybe. Seems like people are most interested in shift display anyway. I suppose I could even throw a super bright shift light on the gear display too, to tell you to shift at whatever RPM you set. Then I'd have to add an RPM line. Not a big deal when I redesign it really.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 14th, 2010, 01:22 PM   #108
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
Quote:
Originally Posted by ninja250 View Post
.

Seems like people are most interested in shift display anyway. I suppose I could even throw a super bright shift light on the gear display too, to tell you to shift at whatever RPM you set. Then I'd have to add an RPM line. Not a big deal when I redesign it really.
Seems like it huh?
When I'm leaning in corner, I know I'm leaning...don't need no gauge to tell me how steep...but I do need to have a little gadget to remind me of what gear I'm in But the knight rider effect is dope nevertheless
randomwalk101 is offline   Reply With Quote


Old February 14th, 2010, 06:07 PM   #109
binlagin
ninjette.org member
 
binlagin's Avatar
 
Name: Ben
Location: Ottawa
Join Date: Jul 2009

Motorcycle(s): 2005 CBR600RR

Posts: 132
Yummmmmmmmmmm! That is awesome man. Congratz!

Soon as spring rolls around and I have better access to my bike I'll be doing something very similar to this! You know forsure I'll be referecing this thread... alot! Especially with the switch on the shift lever... thats great haxoring!

I need to get working on my foam mold soon... spring will be here before we know it and I need to finish my project!
__________________________________________________
2005 CBR600RR - 2:19 Calabogie Motorsports Park, Ontario, Canada
binlagin is offline   Reply With Quote


Old February 14th, 2010, 06:40 PM   #110
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
If anything, the ideas for the code I posted on the shifter can translate to an atmel chip. I learned myself how to create a routine that doesn't advance until a switch is first pressed and then second, released, with no delays or bugs.
That was pretty cool.
Writing that code is extremely confusing. One of the most confusing things I've ever done every time I do it. Way too easy to get frustratingly lost or permanently forget how you program was working or supposed to work. Forgetting to add things or forgetting you removed things will kill you too. Just finding bugs in such a complex routine is crazy enough. Then it all has to be structured so as to where it actually flows in the right order and doesn't trip up and get stuck on itself!

Frustrating just thinking about it, but I figured out the main things I needed to.
I will transfer the delay-less shift switch program routine over to the atmel chip when I get there. Of course it won't transfer straight across, but the idea of how it's structured will. I can probably even condense it further with the addition of a few small subroutines.

An ATMega8 chip will be perfect for this. It even has interrupt inputs that will stop everything immediately pending the signal from the neutral sensor.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 16th, 2010, 06:05 AM   #111
Timm3h
ninjette.org member
 
Name: Tim
Location: Ottawa
Join Date: Jun 2009

Motorcycle(s): 2009 Ninja 250R

Posts: 60
Quote:
Originally Posted by ninja250 View Post
If anything, the ideas for the code I posted on the shifter can translate to an atmel chip. I learned myself how to create a routine that doesn't advance until a switch is first pressed and then second, released, with no delays or bugs.
So it wont start the program until it has been through first then second? So if you start the device up in 3rd gear it will work? How do you know what first gear is? Or do you have something wired onto the neutral switch?

Last futzed with by Timm3h; February 16th, 2010 at 07:12 AM.
Timm3h is offline   Reply With Quote


Old February 17th, 2010, 02:42 PM   #112
Momaru
ninjette.org certified postwhore
 
Momaru's Avatar
 
Name: Paul
Location: Roanoke, VA
Join Date: Jun 2009

Motorcycle(s): 2008 Candy Plasma Blue 250R

Posts: A lot.
Quote:
Originally Posted by Timm3h View Post
So it wont start the program until it has been through first then second? So if you start the device up in 3rd gear it will work? How do you know what first gear is? Or do you have something wired onto the neutral switch?
I think what KC was saying was that the program doesn't indicate a counter advance (in this case the gear) until the switch that monitors that is both pressed and released fully. Thus if the switch gets stuck depressed or doesn't trigger on the depression cycle, the counter doesn't advance.
__________________________________________________
Proud member of the Blue Army
Momaru is offline   Reply With Quote


Old February 17th, 2010, 05:19 PM   #113
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Paul has it right.
Also there is no neutral sensor yet, but a simple routine to drop everything and display a neutral digit upon receiving a neutral signal should be extremely easy for me to implement now that I figured out the more complex programming. (for me). The next version will indeed have a neutral sensor along with the shifter switches.

I think that programming stuff might be a lot easier for others. I'm not very good with it at all. I'm lucky I figured out how to get that gauge shifting like I did. I'm usually much better with the electronic aspect of things.. but I can make due with the programming when absolutely necessary. I had a falling out with my "programming guy" several years ago so had to learn it on my own. I don't know why I get so lost in the programming thing but I do my best.

So what do you guys think.. would I be able to sell 10 switch activated neutral sensor calibrated shift indicators? Or do I not waste my time making them?
I've turned my projects into products before but they usually don't fare so well for some reason. Of course I'd make it work and much better and smaller on the next version but it will take a lot of work. Don't want to do that work if nobody is really interested in purchasing one of these puppies. lol Been down that road before.

Of course I wouldn't charge double to ninjette.org members since I told you what they would cost.. Would have to factor in some labor for assembly time though on each unit after I draw up the final gauge and test it. Kindof a big investment on my end to put a bunch of these together. Definitely don't want to "step on anybody's toes" either since this idea wasn't really originally mine.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 17th, 2010, 07:54 PM   #114
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
perfect up the shift gauge and sells it..i'm sure they will be picked up. I'd like to pick one up to play myself
randomwalk101 is offline   Reply With Quote


Old February 17th, 2010, 07:55 PM   #115
Keenan84
ninjette.org member
 
Keenan84's Avatar
 
Name: Keenan
Location: Newmarket, Ontario
Join Date: Jan 2010

Motorcycle(s): 2009 Kawasaki Ninja 250r Special Edition

Posts: 217
you sir, are a genius.
Keenan84 is offline   Reply With Quote


Old February 17th, 2010, 08:08 PM   #116
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
BTW, say like you sells these gauges and you reprogram it...is there a way for the user to "upgrade" the "firmware"
randomwalk101 is offline   Reply With Quote


Old February 17th, 2010, 08:46 PM   #117
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
Upgradable/customizable firmware is definitely possible/desireable, but may require the purchase of additional programming equipment. (beyond my control.. these little chips require funny dongles to program here and there)

I think what I am going to do is build another gear indication gauge right now with a neutral signal wire and a new 7 segment display digit that is brighter for daylight. I also would have to source enough parts for all the gauges beforehand to secure them. So no design changes are necessary later down the road.

I also may upgrade the switches to something even more reliable.

Then I will take a new video showing operation in all conditions.

Then I will have something I am proud to sell.

Only then will I sell it. I don't want it on your bike if I'm not proud of it.
Give me a little more time and I should have something more to work with. =)
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 17th, 2010, 08:59 PM   #118
randomwalk101
self wrencher
 
randomwalk101's Avatar
 
Name: john
Location: houston
Join Date: Dec 2008

Motorcycle(s): 08 250r and 07 600r

Posts: A lot.
Sweet man...cook it up
Posted via Mobile Device
randomwalk101 is offline   Reply With Quote


Old February 17th, 2010, 09:10 PM   #119
ninja250
You are sleeping
 
ninja250's Avatar
 
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009

Motorcycle(s): 2

Posts: A lot.
I want to just hack a neutral wire into the current gauge I have built now but I guess I might as well go for broke with the atmel chip to make it small now while I'm at it so I don't have to redesign it a fourth time. As it is this will be time #2 with the atmel chip and the final (actual) one will be the third.

Agh, here goes. This is when you see stuff go surface mount level.
Redesign and optimization of a digital shift display gauge for the Kawasaki Ninja 250.

Time to mount the little ATMega8 to a PCB and then to the breadboard and see if my 'ol dusty ISP still works to write some C routines.
I wonder just how small I will be able to make this thing.
__________________________________________________
http://www.ninjette.org/forums/signaturepics/sigpic2121_4.gif <Yeah, it's a 250.
LMFAO!
Weaksauce
ninja250 is offline   Reply With Quote


Old February 17th, 2010, 10:41 PM   #120
alex.s
wat
 
alex.s's Avatar
 
Name: wat
Location: tustin/long beach
Join Date: Sep 2009

Motorcycle(s): wat

Posts: Too much.
Blog Entries: 5
MOTM - Oct '12, Feb '14
you could simplify it by using a 4029 counter IC and feed the 4 least significant binary lines into a 7 segment decoder IC and on into the 7-segment display... wouldn't cost more than a buck to mass produce
__________________________________________________
alex.s is offline   Reply With Quote


Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
[topix.net] - BREW Bikes featured in magazines Ninjette Newsbot Motorcycling News 0 August 12th, 2012 02:00 AM
Any home brewers here keg your brew? headshrink Off-Topic 2 August 27th, 2011 06:40 PM
[motorcycle.com] - H-D teams up with the Brew Crew Ninjette Newsbot Motorcycling News 0 September 4th, 2008 08:09 PM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Motorcycle Safety Foundation

All times are GMT -7. The time now is 03:45 AM.


Website uptime monitoring Host-tracker.com
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Except where otherwise noted, all site contents are © Copyright 2022 ninjette.org, All rights reserved.