January 9th, 2010, 08:41 AM | #1 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Bike PC- Hobby Project
Hi All,
I was recently talking with a friend of mine and he let me know of his plans to build a iphone / ipod dash for his bike. Found here -> http://www.ninjette.org/forums/showthread.php?t=34273 I thought what he was doing was kind of cool, but I didn't really want to mould my iPhone to my dash. (Maybe I will once I see his). I was looking for a more permanent solution for features I wanted, and not necessarily just music. I went to school with him and I have a background in software development. Before that I used to be into robotics. Robots use programmable microcontrollers like the Arduino which is what binlagin is using and I am as well. In doing so I came up with this: The design is rough and missing some components such as resistors etc. I just got some of my components a few days ago and I have already started mashing it together. A quick break down of the pieces: 1 speaker / headphone jack for various tones from the Arduino (maybe even do voice one day, but that is pushing the capabilities of the microcontroller 1 volume control 1 wireless receiver 1 wireless transmitter 1 spinning knob or “potentiometer” to scroll through pre-defined messages on the bike "I need gas" "Lets eat" "POPO" etc… 1 Button to send message 1 LED(Light Emitting Diode) message indicator (flashes when you receive a message ) 1 Button to confirm message (this will stop the flashing LED, I could also send a confirmation message back??) (Maybe even use the same button as send??) 2 temperature sensors, 1 for air temp, 1 for engine temp 2 LED’s for shift lights (optimal shift coming up and SHIFT!) 1 GPS chip to get speed and time and more data 1 wire to the RPM indicator off the bike dash (with speed and RPM we can calculate what gear we are in ) 1 LCD 16x2 The LCD will show messages, time, speed and what gear you are in There will need to be a voltage regulator that prevents it from getting over 12V (when you start the bike there can be a surge of 16V! ++) I also plan on wiring it to my alarm starter kill relay, when the bike is armed; it is powered off and vice versa. So in summary, I am building a bike computer to do the following in no particular order: 1) Display speed on LCD 2) Display time on LCD 3) Display current Gear on LCD (I might change this to a 7 segment LCD) 4) Indicate when it is time to shift through a shift light 5) Monitor Air Temperature and Engine Temp 6) Wirelessly communicate with other bikes that have the same / similar setups (I bought some extra components and binlagin has volunteered to be my lab rat for these features) The wireless protocol will also allow for messages to hop from bike to bike to extend the range. It will be great for group rides. I have also looked into Ontario’s HTA and it will not violate the new cellphone law 7) Create a simple stop watch Future Features 8) Create a lap timer with GPS data 9) Upgrade the wireless for long range 10) Your ideas here!! Originally I was going to put a magnetic sensor on the wheel to get the bike speed, and use some other microchips to get the current time. However I realised that I had a USB GPS chip lying around at home so I ripped it open and wired it into the Arduino. With that I am able to get speed, time, location, etc. This saved me lots of work, gave me extremely accurate time, and accurate speed without having to go though pain of figuring out what speed I am going based on that data I receive from the wheel. On Thursday I received my Arduino and other components. I was able to get the LCD working in an hour after that I ripped open the GPS, hooked some wires up and I was able to interface it with the Arduino and have it write data to the LCD. Some of you may ask why not just store the time on the Arduino? The problem is, the Arduino's memory is like a USB key when powered off. So if I were to turn it back on, it would have the time from the last time I shut it down. I would have to reset the time every single time I turned it on which kind of defeats the purpose of a clock. In the rough schematic I show using a scroll wheel for scrolling through messages. I have decided to replace this with a thumb joystick, the kind you would find in Xbox or PS controller. I plan to put this under the turn signal switch. Let me know what you think, ideas you have that I could put in. Or things that you find are missing on your bike that would be cool to try and incorprate into this. I welcome all kinds of feedback and please if something is too technical, I will do the best I can to explain it better. Thanks for reading. Last futzed with by Timm3h; January 10th, 2010 at 12:26 PM. Reason: update |
|
January 9th, 2010, 08:52 AM | #2 |
You are sleeping
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009 Motorcycle(s): 2 Posts: A lot.
|
Looks like fun.
Only wish I had the time to build with microcontrollers anymore. Was pretty good at it, at one point. What are those new arduino controllers programmed in? C? Looks like just an atmel chip? |
|
January 9th, 2010, 09:23 AM | #3 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
They are programmed in C
You can include libriaries and .h files as well |
|
January 9th, 2010, 09:38 AM | #4 |
ninjette.org guru
Name: JR
Location: Augusta, GA
Join Date: Dec 2009 Motorcycle(s): Ninja 250R Posts: 432
|
That looks suit, build one for me. I know how to work with fiber glass and can build a cover or some time of housing.
|
|
January 10th, 2010, 06:29 AM | #5 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Haha,
If I can start mass producing them cheap enough, perhaps. |
|
January 10th, 2010, 12:27 PM | #6 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Added YouTube link to original post
|
|
January 10th, 2010, 12:33 PM | #7 |
ninjette.org guru
Name: JR
Location: Augusta, GA
Join Date: Dec 2009 Motorcycle(s): Ninja 250R Posts: 432
|
That thing looks so f^%&* great. I'm a electronics freak but I don't know how to make that. I WANT ONE OF THOSE.
|
|
January 10th, 2010, 12:52 PM | #8 |
ninjette.org certified postwhore
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
|
That project is great. You asked for ideas.
The one thing I can think of is to add blue tooth capability so can pair it to a blue tooth helmet and communicate with other riders with blue tooth helmets. |
|
January 10th, 2010, 03:05 PM | #9 |
ninjette.org newbie
Name: Bob
Location: Boulder Creek
Join Date: Apr 2009 Motorcycle(s): 2009 Ninja 250R Posts: 7
|
Great project. A couple of ideas. My brother designed a little board like this a few years ago (for his CBR600RR) and he included accelerometers and a very precise tacho (gear ratio tells you wheel speed) as well as GPS. He did not include tilt sensors but I always thought that would be cool too.
His board recorded all the telemetry to file along with a sync signal for the video. Later the data is combined on a PC to create a video overlay showing speed, position, tacho, G-force etc. Makes nice videos. |
|
January 10th, 2010, 06:09 PM | #10 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Snake, thanks for the ideas on bluetooth. I am not sure if the processor can handle voice, I will have to look into it.
Bob, do you have any examples of your brother's work anywhere? It is cool to see things like that for inspiration. Also thanks for the thoughts on accelerometers and tilt sensors Update. I was with binlagin for a bit tonight and he let me borrow his spare Arduino for wireless testing. I was able to send a simple test message over wireless! I will need to write a wireless protocol / parser to clean up the data. |
|
January 10th, 2010, 07:02 PM | #11 |
ninjette.org member
Name: Chris
Location: LA
Join Date: Dec 2009 Motorcycle(s): 250r Posts: 199
|
Wow good work. How much does something like this all cost?
|
|
January 10th, 2010, 07:45 PM | #12 |
ninjette.org sage
Name: Howard
Location: Cypress, So. Cal.
Join Date: Feb 2009 Motorcycle(s): '09 Candy Thunder Blue Ninja 250R Posts: 618
|
That looks awesome, can't wait to see the final product!
|
|
January 11th, 2010, 10:46 AM | #13 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
in CAD
The Arduino was $32 LCD was $26 Joystick $4 LED $2 RF components $5 $69 Plus taxes and shipping You can get Arduinos as cheap as $18, and even the componets to build one for under $10. You can also get cheaper LCD's but they take up more pins on the Arduino. |
|
January 11th, 2010, 11:14 AM | #14 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Another thought I had was using RFID to unlock the bike and have a push button start
|
|
January 11th, 2010, 07:06 PM | #15 |
The Sportisi Master
Name: Matt
Location: Chico
Join Date: May 2009 Motorcycle(s): 2008 Ninja 250 Posts: A lot.
|
If you can get something like that functioning I will get sportisi to buy however many it takes to get you to mass produce them.
__________________________________________________
Sportisimoto USA is born. |
|
January 13th, 2010, 08:17 AM | #16 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
I just had a minor setback.
My laptop that had all of my code on it... the hard drive went corrupt beyond normal repair techniques. Looks like I might have to recode everything. On another note I was playing with the LED's last night... too much fun :P |
|
January 13th, 2010, 12:15 PM | #17 |
The Sportisi Master
Name: Matt
Location: Chico
Join Date: May 2009 Motorcycle(s): 2008 Ninja 250 Posts: A lot.
|
Offer still stands. Confirmed with Bram make it functional and we'll take as many as you can crank out.
__________________________________________________
Sportisimoto USA is born. |
|
January 13th, 2010, 12:17 PM | #18 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
|
|
January 13th, 2010, 01:30 PM | #19 |
ninjette.org member
Name: Seth
Location: Maine
Join Date: Jul 2009 Motorcycle(s): 2003 YZF600R, 2009 Kawasaki Ninja 250R Posts: 160
|
That thing's sweet. I'd love to learn how to make things like this but architecture/engineering's my current field of study. If you decide to sell these I'd probably get one for my kawi and one for the yamaha
__________________________________________________
http://i40.photobucket.com/albums/e2...r95/banner.jpg |
|
January 13th, 2010, 01:30 PM | #20 |
The Sportisi Master
Name: Matt
Location: Chico
Join Date: May 2009 Motorcycle(s): 2008 Ninja 250 Posts: A lot.
|
I understand that. But its always great if a hobby can make you money
__________________________________________________
Sportisimoto USA is born. |
|
January 13th, 2010, 01:37 PM | #21 |
ninjette.org sage
Name: Howard
Location: Cypress, So. Cal.
Join Date: Feb 2009 Motorcycle(s): '09 Candy Thunder Blue Ninja 250R Posts: 618
|
I am in a similar process as well. My tech friend said something you can try is putting the HD in the freezer for about 10 mins and try extracting that way. (May want to wrap it in a anti static bag so no moisture sets on it)
|
|
January 13th, 2010, 02:29 PM | #22 |
wat
Name: wat
Location: tustin/long beach
Join Date: Sep 2009 Motorcycle(s): wat Posts: Too much.
Blog Entries: 5
MOTM - Oct '12, Feb '14
|
very similar to what i'm trying to get going... i'm shooting a little higher res though... 160x120 lcd mounted behind a replacement dash & speedo. awesome idea with the built-in communicator though! with my added resolution, i have the ability to render a map of your bread-crumb trail which is a kinda nice fluff-item
http://www.ninjette.org/forums/showthread.php?t=34606
__________________________________________________
|
|
January 13th, 2010, 02:33 PM | #23 |
wat
Name: wat
Location: tustin/long beach
Join Date: Sep 2009 Motorcycle(s): wat Posts: Too much.
Blog Entries: 5
MOTM - Oct '12, Feb '14
|
also- have you actually gotten your rpm line wired into your dash yet? did it work straight into the analog input? did you use the induction line? or simply the output going to the dial gauge?
__________________________________________________
|
|
January 13th, 2010, 02:40 PM | #24 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
I haven't tried the rpm gauge yet. My Bike is buried under 3 feet of snow. I recall there being a wire under the dash for it, as all of the wires were screw terminals. I have installed a tach in my car before and one of the wires is for the signal. I believe it can plug into the analog port, but may need some resistors. I would put a multimeter on it first to see what comes off of it. If someone could take a pic underneath showing all of the screws, that would be handy too.
|
|
January 13th, 2010, 02:43 PM | #25 | |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Quote:
|
|
|
January 13th, 2010, 03:43 PM | #26 | |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Quote:
I have heard of that and done that in the past, thanks for the reminder! I totally forgot. Update: I put my hard drive in the freezer and I was able to boot and copy the files. I only copied the arduino stuff All I need Last futzed with by Timm3h; January 13th, 2010 at 03:54 PM. Reason: update |
|
|
January 14th, 2010, 10:22 PM | #27 |
self wrencher
Name: john
Location: houston
Join Date: Dec 2008 Motorcycle(s): 08 250r and 07 600r Posts: A lot.
|
How do you have it to display which gear you're in?
Posted via Mobile Device |
|
January 15th, 2010, 06:14 AM | #28 | |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Quote:
I am going to have to wait until the spring to build it, but simply put its logic and math. In 1st gear you can only be going so fast. So if I am going 60mph I can't logically be in first. The aduino will also monitor the rpm gauge, if it jump higer in a certain time frame that is a downshift, if it jumps lower it is an upshift. When you pull in the clutch it read 0 RPM, that will be the tricky part (If I downshift 3 gears what gear am I in) it will be lots of trial and error in terms of math. I may even wire a switch to the shift petal (might be easiest, based on RPMS i'll know if theshift made it or not) |
|
|
January 15th, 2010, 12:22 PM | #29 |
You are sleeping
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009 Motorcycle(s): 2 Posts: A lot.
|
You could just supply a small bracket with a magnetic switch or optical switch and a tiny wiring harness to read a magnet or black/white lines on the shifter output shaft.. (shaft encoding)
Attach to your unit and the bike with zip ties and a plug. (anyone could handle a zip tie and bolt on mod) +&- button math in the programming and output display from there. Reset button for failed shifts.. or if the switches are adjusted very tightly probably won't missfire the gear counter cause you shift probably mechanically didn't make it all the way either. There is also the neutral indicator sensor you can tap in to. If the gear skips, put in your clutch and shift to neutral (gear indicator is programmed to know neutral via line input from bike sensor) , hit the reset button and then shift back to the gear you were in. A gear counter reset like this could be performed while moving still and requires no actual speed or tach taps or sensors or more complex programming necessary. A few extra wires down to the shift pedal area attached to a bracket. |
|
January 15th, 2010, 12:51 PM | #30 |
You are sleeping
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009 Motorcycle(s): 2 Posts: A lot.
|
Also,
if you omit the arduino things all together and just put an atmel chip on a breadboard with a resonator your costs go down significantly. Probably 50%. Use the AVR ISP to program them. |
|
January 15th, 2010, 12:57 PM | #31 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
|
|
January 15th, 2010, 02:08 PM | #32 |
wat
Name: wat
Location: tustin/long beach
Join Date: Sep 2009 Motorcycle(s): wat Posts: Too much.
Blog Entries: 5
MOTM - Oct '12, Feb '14
|
as far as determining gear, if you have access to speed and rpm (from the rpm line and speedo line) you can do the following:
gearRatio = RPM / Speed then in your integration code, check if the gearRatio has changed (more than some accuracy epsilon) since N seconds ago, if it hasn't, you're in a gear or neutral. keep a table of 7 variables that you check your gearRatio against, you will need to keep it sorted but thats simple. at that point, simply check which gearRatio you're in, and take the index of the ratio table as your gear number. in terms of getting the RPM and Speedo from the the input lines on the bike, running the input into a small capacitor which is tied to a resisted ground before going into an analog line in the arduino should convert the variously timed pulses coming from the speedo and rpm lines into a meaningful analog signal. this should reduce CPU time needed to calculate these and make this all able to happen on one chip.
__________________________________________________
|
|
January 15th, 2010, 02:21 PM | #33 | |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Quote:
Well said, thank you! I can also keep various tables based on the gear setup for a bike too |
|
|
January 15th, 2010, 03:32 PM | #34 |
wat
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 should be able to set it up to automatically repopulate your gear ratio table each startup eliminating the need for a fixed table (and making it automatically adapt to any gearing/sprocket change... only down-side would be it would screw up the gear numbering if you skipped a gear when accelerating for the first time on startup. of course this would only really be useful for a commercial product, since most of the time your sprockets aren't going to change.
__________________________________________________
|
|
January 15th, 2010, 10:51 PM | #35 |
self wrencher
Name: john
Location: houston
Join Date: Dec 2008 Motorcycle(s): 08 250r and 07 600r Posts: A lot.
|
Can you program it to do fuel injection too? )
Posted via Mobile Device |
|
January 16th, 2010, 05:52 AM | #36 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
|
|
January 20th, 2010, 07:24 PM | #37 |
ninjette.org member
Name: Seth
Location: Maine
Join Date: Jul 2009 Motorcycle(s): 2003 YZF600R, 2009 Kawasaki Ninja 250R Posts: 160
|
Any updates? I really want to learn how to do things like this after college...we shall see
__________________________________________________
http://i40.photobucket.com/albums/e2...r95/banner.jpg |
|
January 20th, 2010, 08:39 PM | #38 | |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
Quote:
I put all of the electronics into a cardboard box for testing and did some soldering. My GPS hasn't been working lately I hope I didn't fry it by accident. The RF is still the next biggest thing to work on, while I have a proof of concept ( I am able to send a recieve a message ) I still have lots of code to write to parse the data correctly. Right now I am using a an exisitng library which does a checkum on the data to make sure it is valid. I will try and get some more work done this week, but I still have a lot to pack. |
|
|
February 11th, 2010, 08:13 AM | #39 |
ninjette.org member
Name: Tim
Location: Ottawa
Join Date: Jun 2009 Motorcycle(s): 2009 Ninja 250R Posts: 60
|
I figured I might as well add this idea I had before I forget.
Show windchill temperatures by comparing current temp to speed |
|
February 11th, 2010, 10:14 AM | #40 |
You are sleeping
Name: Casey
Location: LMFAO!!!
Join Date: Nov 2009 Motorcycle(s): 2 Posts: A lot.
|
Nice. Lots of good ideas. Been thinking of getting an adriuno thingy the play
with and brush up on my c skills. Either that or try plugging up one of my mega8's. See if I can get my processor up to speed so I can make it talk to your bike pc. Hehe Posted via Mobile Device |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My first bike project! | Kruse08 | 1986 - 2007 Ninja 250R Farkles | 76 | May 21st, 2015 08:23 AM |
Rebuild Bike is officially a project bike | antwan718 | 1986 - 2007 Ninja 250R Tech Talk | 4 | December 18th, 2012 10:32 AM |
WTB: 2008+ 250R salvage bike for track bike project | htdub | Items Wanted | 0 | April 25th, 2012 11:12 AM |
Anyone in the Northeast looking for a project bike? | adouglas | General Motorcycling Discussion | 6 | November 21st, 2009 08:37 AM |
Help me pick out a project bike!! | M-Oorb | General Motorcycling Discussion | 34 | November 18th, 2009 12:09 PM |
|
|