Resend my activation email : Register : Log in 
BCF: Bike Chat Forums


Homegrown digital dash

Reply to topic
Bike Chat Forums Index -> Show & Tell Goto page 1, 2, 3 ... 17, 18, 19  Next
View previous topic : View next topic  
Author Message

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 23:44 - 10 Dec 2011    Post subject: Homegrown digital dash Reply with quote

No, I haven't decided to jack the GS in, I'm just doing this as well.

Basically, I've been sodding about with arduino stuff for the past month or two, and it's awesome. Kinda like programming a BBC micro, but with more external interfaces, and sod all RAM (specifically, 2K). More info can be found here. That's the board I'm prototyping on, but I'll be using a Boarduino, once I've nailed the code part of it down.

Based on this, I had the idea to make a digital dash. I like the idea of the Vapor-style dashes, but I've always thought they looked a bit pedestrian - this way, I get to design it and work out the kinks. It also gives me the opportunity to polish a turd, which is something I do seem to be drawn toward. SV650, with custom dash? Go on then.

Two things: I'm improving at programming, but I'm far from being a master at it. Also, I have no electronics theory at my disposal - I'm doing this all on the fly, and learning as I go. So far, there haven't been any epic hiccups, but I get the feeling that meshing this with the bike may prove to be interesting.

Design considerations: the display I'm using is a dot matrix display, and has a resolution of 128x64. In its favour, it's a negative display, so pixels are illuminated, instead of darkened. It also has the tasty bonus of having an RGB backlight, which will be capitalised upon shortly.

I'm going to have to use some kind of voltage stepper for the inputs from the bike - I've still not explored the intricacies of the temperature sensor that's built in to the SV at the moment, and I need to work out whether the hall effect sensor the current speedo uses will be totally compatible with the arduino, or if I'll have to 'clamp' the voltage somehow. From what I've gleaned so far, a hall effect sensor is simply an on/off switch, so I can just push 5V through it, and it'll be fine.

I've already gotten most of the bits together that I'm going to need for the designing/building of the dash unit itself, and I'm crunching through a ton (hah! 32K maximum!) of code at the moment.

Features that will be included are:
normal trip1/trip2, odo, speedo, tacho, estimated tank range remaining, average mpg, coolant temperature, and time/date.

Here's a sneak peek as to a possible layout:
http://farm8.staticflickr.com/7166/6488931205_61fdea7fce.jpg

With an overview to give you an idea of the actual size:
http://farm8.staticflickr.com/7015/6488960635_dc97122dda_z.jpg

I am, however, up for any submissions/suggestions as to improved styling. I know that everything's impossibly tiny on the screen; trust me, I'm intimately aware of this, having drawn all of the bitmaps for it manually so far.

I'm not sure how easily I'll be able to flip between screens with this - I've already had to shift the bitmaps into progmem, so there's not a a huge amount of room, if people start suggesting tons of different screens for any advanced functionality.
One screen flip might be do-able, although I'll need to look into how much RAM it'll consume.

I'm thinking of using a larger font, and splitting the trip1/2/odo and tank/mpg/temp into two seperate screens.

The temperature will also be crudely indicated by the colour of the backlight; blue for cold, green for fine, and red for too hot. There'll be a smooth gradation between the colours, so it should be fairly clear how quickly the bike's getting toasty/cooling down.

There'll be a trip reset button for each trip meter - the one that's attached to trip one will be used for determining mpg rates between fillups and so forth. Obviously, it'll be completely thrown out by resetting it and not filling the tank, but c'est la vie. It's something I'll be looking to improve upon in future, I think. I'm going to try and use the reserve light to roughly calibrate the mpg and tank fields.

I'm also toying with the idea of using a small servo as an analogue tacho, and freeing up more screen space, as well as a chunk of RAM. I'm not sure, though - analogue tachos are a bit, well, last century, y'know Wink
Having said that, there's always the option of using an LED bar graph display - I only need ten gradations, but that'd be even smaller to look at.

I'll be posting circuit diagrams and code snippets as I go. Suffice to say that it's so absurdly alpha at the moment, that I'm kind of embarrassed by the crap that I'm uploading to the board at the moment. It shall all be tidied soon. I've got a couple of weeks off around Christmas, when I'm hoping to break the back of most of the coding.
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts

Blackwolf
Burgerfist



Joined: 19 Nov 2006
Karma :

PostPosted: 23:52 - 10 Dec 2011    Post subject: Reply with quote

Clapping


Looks awsome! glad to see you've gotton your head into that Arduino stuff, I gave it one look and thoguht fuck that..


Will follow this closely.. Thumbs Up

As for ideas..


Im assuming theres a button you can use to change hat the screen shows. if so have the trip 1 and 2 on differnt screens.

So on the main screen, you have Odo, revs, speed. ect.

Also is temp nessary? as you have the grading of the colours? or visa versa.. saves memory?

Looks cool man!
____________________
Current: CBR900
Specialist Building Drying Services
www.anytimeuk.co.uk
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 00:05 - 11 Dec 2011    Post subject: Reply with quote

Blackwolf wrote:

Im assuming theres a button you can use to change hat the screen shows. if so have the trip 1 and 2 on differnt screens.

So on the main screen, you have Odo, revs, speed. ect.

Also is temp nessary? as you have the grading of the colours? or visa versa.. saves memory?


Right - I can add a button that allows you to toggle between the two. The easiest way to do it would be for me to just use strings, instead of any bitmaps. It won't look as pretty, at least not until I manage to crunch the code down as tightly as is possible. My coding style's not spectacularly terse at the moment, so it's something for me to work on.
I do only have a certain number of I/O ports to play with, tough, so I'd like to keep the number of buttons to a relative minimum, if possible. Many more than the (currently) proposed three will be pushing it a bit.

This is also a convincing argument in favour of the analogue tachometer, as it goes. I'm still in two minds about this, but it will free up enough space for me to use a more readable font Laughing

Temperature's just a nicety. I'm a bit anal about it, given that it's very easy for it to get very, very hot while riding in London. Just something for me to get paranoid about, really.


On a side note, just for CHR15:
http://farm8.staticflickr.com/7162/6489178261_ab81d77cb7_z.jpg
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts

CHR15
Turbo nutter bastard



Joined: 14 Jun 2008
Karma :

PostPosted: 00:20 - 11 Dec 2011    Post subject: Reply with quote

*subscribed*

Mr. Green
____________________
Turbocharged drag thing / project death weapon / GK73A
Ste: I'm not entirely sure how you'd go about verbally abusing someone with a potato but I'm sure it's possible.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Howling Terror
Super Spammer



Joined: 05 Dec 2008
Karma :

PostPosted: 00:25 - 11 Dec 2011    Post subject: Reply with quote

Drooling

Pass the popcorn

Very Happy
____________________
Diabolical homemade music Listen to Howling Terror here
Singer songwriter, Artist and allround good bloke Listen to Andrew Susan Johnston here
Some of my replies are relevant.
 Back to top
View user's profile Send private message You must be logged in to rate posts

chris-red
Have you considered a TDM?



Joined: 21 Sep 2005
Karma :

PostPosted: 14:14 - 11 Dec 2011    Post subject: Reply with quote

On the Tacho Change the numbers to 'black' once the revs are past that number so you can see it Thumbs Up

What about a button to flip between trip, odo,etc.

Cool Tacho BRO
____________________
Well, you know what they say. If you want to save the world, you have to push a few old ladies down the stairs.
Skudd:- Perhaps she just thinks you are a window licker and is being nice just in case she becomes another Jill Dando.
WANTED:- Fujinon (Fuji) M42 (Screw on) lenses, let me know if you have anything.
 Back to top
View user's profile Send private message You must be logged in to rate posts

orac
World Chat Champion



Joined: 25 Sep 2011
Karma :

PostPosted: 15:55 - 11 Dec 2011    Post subject: Reply with quote

this is noce programme, i havent seen much of the arduino programme system. i will go a head and ask if you looked into the picaxe system, it hugely flexible and has a good backup forum.

from what i ahve seen from the programme system you ill be using the picaxe system uses a VB style of programming. some of the larger chips can have mulitple programmes, extra RAM installed on an i2c bus along with maths co proccessor, and an almost unlimited amount of input or outputs depening on how you configure them with.

oh yeh and real time clock over i2c too.
http://www.picaxe.com/
there software includes a flow chart programmer too, so you can reverse engineer stuff to learn more quickly too. and there chips can be OCed too

i will be watching this thread with a keen interest as its already looking very good
____________________
Current rides - 2016 Triumph Street Triple Rx, 1994 Suzuki Bandit 400 VM, TGB 204 Classic 125cc
"with nothing left to lose, there is everything to gain. It's not the size of the dog in the fight, it's the size of the fight in the dog"
 Back to top
View user's profile Send private message You must be logged in to rate posts

neil.
World Chat Champion



Joined: 24 Feb 2008
Karma :

PostPosted: 18:47 - 11 Dec 2011    Post subject: Reply with quote

http://4.bp.blogspot.com/_yDwFuzAvP2k/TDRqYphfFBI/AAAAAAAAAC8/AUikViic2jI/s1600/burnsexcellentsticker.jpg

Can't wait to have a gander at work, if you may be so kind.
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 19:23 - 11 Dec 2011    Post subject: Reply with quote

orac - Yeah, I did look at the PIC stuff a few years back, but I had a bit of a hard time getting my head around it at the time. It's just timing that's brought be to Arduino, really - that, and the fact that one of the lecturers at work co-wrote the O'Reilly book, so getting a free copy of that in dead tree format helped a bit. Overclocking really isn't necessary - it's a 16MHz chip, which is more than fast enough for this. It's RAM that's the main concern, but with a bit of careful programming, I can probably nail it all down without too much trouble. I've already got a chunk of code that's been happily appropriated from the demo program that'll report back how much RAM is still available, which will prove invaluable.

neil. - Once I've gotten something workable together, then yeah, I'd be happy to show you. At the moment, it's really, really early alpha at best. Haven't coded the I/O in at all, yet - I've just been playing with the display, really. I've got some old code that I'm going to be cannibalising for it, which should give me the speedo code pretty soon.

I think I'm going to have to buy and fit a hall effect sensor, because it looks like the SV uses some weird electromechanical sensor, which I can't be arsed to fathom out. Least of all, given that it's apparently pretty inaccurate. Hall effect + magnets = epic precision.

chris-red - Inverting the colour like that is potentially resource expensive. I'll look into it, because aesthetically, it's a good idea. I'm not sure how readily it can be done (with my skill level, anyway), though.
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts

herulach
World Chat Champion



Joined: 19 Apr 2010
Karma :

PostPosted: 19:24 - 11 Dec 2011    Post subject: Reply with quote

Buy this
http://www.adafruit.com/products/376
be the pimpiest pimp ever
____________________
YBR 125>FZS600
 Back to top
View user's profile Send private message You must be logged in to rate posts

orac
World Chat Champion



Joined: 25 Sep 2011
Karma :

PostPosted: 19:32 - 11 Dec 2011    Post subject: Reply with quote

fair enough, i too had issues with stuff like stamp, but i had to learn something for my a-level in systems control. picaxe using basic/plain language programming made it the choice over other systems. it was alot more basic back then tho and has grown considrable with increasing amount of application and hardware to acoompany there CPUs.

why use 16mhz, when you could have 48mhz - i know what i have, but i buy the fastest computer setup and then OC it past 4ghz any how
____________________
Current rides - 2016 Triumph Street Triple Rx, 1994 Suzuki Bandit 400 VM, TGB 204 Classic 125cc
"with nothing left to lose, there is everything to gain. It's not the size of the dog in the fight, it's the size of the fight in the dog"
 Back to top
View user's profile Send private message You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 19:35 - 11 Dec 2011    Post subject: Reply with quote

herulach wrote:
Buy this
http://www.adafruit.com/products/376
be the pimpiest pimp ever

It's cool, but it eats I/O lines like they're going out of fashion. Also, it probably wouldn't work properly with gloves on.
The current display is only using 9 lines, as opposed to 13. I've only got 14 digital lines to work with, and I'll need at least two spare ones for the tacho and speedo.
I might be able to use a more flash display in future iterations of this, but for now, I'm going to stick with this one, and see where it takes me.
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 19:37 - 11 Dec 2011    Post subject: Reply with quote

orac wrote:
why use 16mhz, when you could have 48mhz


Because I don't believe in using a tactical nuke to crack a walnut Laughing
I might do if I end up doing a homegrown ECU, but that's in the future, and I'm still scratching around in the here and now...
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts

Clanger
Stirrer



Joined: 27 May 2004
Karma :

PostPosted: 20:01 - 11 Dec 2011    Post subject: Reply with quote

Slightly off topic, but have you tried Ginger Altoids...they are wickedly hot and seriously morish. Thumbs Up
____________________
Be who you are and say what you feel, because those who mind don't matter, and those who matter won't mind - Dr. Seuss
 Back to top
View user's profile Send private message You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 20:09 - 11 Dec 2011    Post subject: Reply with quote

Clanger wrote:
Slightly off topic, but have you tried Ginger Altoids...they are wickedly hot and seriously morish. Thumbs Up

No, but I'm happy to give them a go. The trick is to find somewhere nearby that sells them...
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 21:34 - 11 Dec 2011    Post subject: Reply with quote

What speed does the thing run at? How soon would you expect the go into the red line then see it on the dash?

Also on that note. When you go above X rpm the screen should turn to 'fffuuuccckkkkk!!!'

Also I second the suggestion on a button to change between invidual item or at least predetermined ones.
I would have tacho speed and temp on one. Could add the odo on another.

How about a low fuel warning that appears at X miles. That's common these days so no need to miss out on it.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 21:37 - 11 Dec 2011    Post subject: Reply with quote

steven_191 wrote:
What speed does the thing run at? How soon would you expect the go into the red line then see it on the dash?

It should be able to keep up without too much trouble. Given that the bar layout originally described had 10px per 1k rpm, it's not being asked to redraw at a totally mental rate. The screen should be able to update at ~25 fps, although I'll probably clamp it at a lower rate than that, to reduce flicker.
steven_191 wrote:

Also on that note. When you go above X rpm the screen should turn to 'fffuuuccckkkkk!!!'

Ah, you've guessed what my rev limiter hint is going to be... Laughing
steven_191 wrote:

Also I second the suggestion on a button to change between invidual item or at least predetermined ones.
I would have tacho speed and temp on one. Could add the odo on another.

How about a low fuel warning that appears at X miles. That's common these days so no need to miss out on it.

The fuel warning is already accounted for, and I'm going to get on to the multiple screen bit in a sec.

In related news, the code which just uploads and displays the image I did for CHR15 only takes 226 bytes of RAM. I'm not quite as worried about having multiple pages now. Smile

I've gotten something which I'm going to try and gut for the pulse counter code, and should be able to put together a viable speedo function. Conveniently (albeit a little prematurely) I already have the code to smooth out the speedo reading, so the number will actually be readable, as opposed to flickering between, say, 31 and 32 when I'm actually doing 31 and a bit.

Guess I'd better get on with the layout for them, then.

How do we reckon I should divide up the functions?
My first instinct is to go for odo, tank range, and trip 1 on the first screen, and average mpg, trip 2, temperature, and maybe (just as a really geeky aside) 'uptime'.

While people debate this (at least, I hope they will), I'm going to go hook the rtc up, and get it to display the time.
I might even go so far as to get a temporary thermal sensor in there, too.
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project


Last edited by nowhere.elysium on 22:07 - 11 Dec 2011; edited 1 time in total
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 22:04 - 11 Dec 2011    Post subject: Reply with quote

Temp, tacho, speed. Possibly tank range and odo. Last two are maybe. Everything else can go on another page.

Could you route all this data on for data logging? If so you would want a tps reading and lamda.

Also how is it sending data to the screen. Through a serial connection?


Last edited by steven_191 on 22:12 - 11 Dec 2011; edited 1 time in total
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 22:09 - 11 Dec 2011    Post subject: Reply with quote

steven_191 wrote:
Temp, tacho, speed. Possibly tank range and odo. Last two are maybe. Everything can go on another page.

Could you route all this data on for data logging? If so you would want a tps reading and lamda.

I'd have to upgrade to an Arduino Mega to be able to deal with all the extra I/O requirements. Especially if I'm going to have to deal with datalogging, as that eats up a bunch of pins, too.

Fuck it, if I'm going down the path of datalogging, then I might as well include the GPS unit I've got knocking about.
Do it properly, and all that. Infinitely incriminating, if I'm stupid, though.
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts

Paddy.
Red Rocket



Joined: 14 Feb 2008
Karma :

PostPosted: 22:17 - 11 Dec 2011    Post subject: Reply with quote

BCF - Never cease to amaze, fantastic project Thumbs Up

Well done for even giving it a go Cool
____________________
Current ride : Suzuki GSXR1000 L0 - Suzuki SV650 track bike - Yamaha Majesty YP250
My biking history so far
Rogerborg wrote: Whole life care for a VTR full of quadraspazzed Darrryls and Shoniq'uas cost mad dollah.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 22:18 - 11 Dec 2011    Post subject: Reply with quote

Hmm. Based on steven_191's comments, and the fact that I've got a spare Arduino Mega 1280 knocking about, I'm really tempted to do a complete system with a whole bunch of extras thrown in for shits and giggles.
It's got four times as much RAM (a positively luxuriant 8KB), and 128KB of flash memory, so I've got a ton and a half of elbow room for really crap coding, as well as a bunch of bitmap images.

Plus, I'll have enough spare digital lines to be able to do all the idiot lights , as well as SD card datalogging.

It's tempting.

Here's a really badly taken picture, so you can see the size difference between the boards:
http://farm8.staticflickr.com/7142/6494827359_af482b0243_z.jpg
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 01:01 - 12 Dec 2011    Post subject: Reply with quote

I'm not 100% sure on what all this lot is but I'm 99% sure that I want to play with it. Its far to close to what I do at work for me not to be interested.

The only difference will be the code and what it controls.

Correct me if I'm wrong.

Your sending inputs from sensors or digital inputs in and writing code to deal with it, calculations etc, then sending it out to the display? What, other than the display, will you be using as an output?

And yes do something with the GPS. And while your at it, add a remote start from your phone.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 01:39 - 12 Dec 2011    Post subject: Reply with quote

Also lol at your 128k of ram. I could fart that much out.

I see this runs at 16Hz but what would you expect to need to run ecu control?
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Frost
World Chat Champion



Joined: 26 May 2004
Karma :

PostPosted: 02:27 - 12 Dec 2011    Post subject: Reply with quote

It will be 16mhz not 16nhz, so that's a resolution of 16,000,000th of a second, PLENTY radpid enough for an ecu. embedded stuff runs really bloody fast provided that you avoid floating point calculations. Surely revs & distances will require electrical input that will need to be translated via and ADC? Provided that you have some suitable timer code written it should all be fairly easy to code up.
The problem with timer based code is that you need to cycle through a loop wasting time until an event is reached, so to halt something for 1 second you need to waste 16 million cycles, which is a pain the the arse when the highest something can count is 65536 Laughing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

nowhere.elysium
The Pork Lord



Joined: 02 Mar 2009
Karma :

PostPosted: 09:00 - 12 Dec 2011    Post subject: Reply with quote

Frost wrote:
It will be 16mhz not 16nhz, so that's a resolution of 16,000,000th of a second, PLENTY radpid enough for an ecu. embedded stuff runs really bloody fast provided that you avoid floating point calculations. Surely revs & distances will require electrical input that will need to be translated via and ADC? Provided that you have some suitable timer code written it should all be fairly easy to code up.
The problem with timer based code is that you need to cycle through a loop wasting time until an event is reached, so to halt something for 1 second you need to waste 16 million cycles, which is a pain the the arse when the highest something can count is 65536 Laughing


ADC is already covered on the arduinp: it has a bunch of analog inputs that can double up as digital if they need to. As for the counter interrupts, I'd like to avoid relying on a process that stutters as much as that will. The speedometer will be taking a signal sample over 200ms, and averaging over that. I might slow it down a bit further, but it depends on the way I can mount up the magnets on the disc rotor. As long as it will register <10mph speeds accurately, its slow enough.

Apologies for typos, this is on my phone. I'll reply properly in an hour or so.
____________________
'10 SV650SF, '83 GS650GT (it lives!), Questionable DIY dash project, 3D Printer project, Lasercutter project
 Back to top
View user's profile Send private message You must be logged in to rate posts
Old Thread Alert!

The last post was made 6 years, 344 days ago. Instead of replying here, would creating a new thread be more useful?
Display posts from previous:   

Post new topic   Reply to topic    Bike Chat Forums Index -> Show & Tell All times are GMT + 1 Hour
Goto page 1, 2, 3 ... 17, 18, 19  Next
Page 1 of 19

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Read the Terms of Use! - Powered by phpBB © phpBB Group
 

Debug Mode: ON - Server: discovery (www) - Page Generation Time: 0.18 Sec - Server Load: 0.92 - MySQL Queries: 16 - CDN Objects: 54 - Page Size: 156.21 Kb