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


Digital Dash Build - My long journey of Geekery

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

NutsyUk
Crazy Courier



Joined: 22 Jun 2016
Karma :

PostPosted: 20:55 - 13 Jul 2016    Post subject: Digital Dash Build - My long journey of Geekery Reply with quote

Hi guys, I realise trying to flash up my Lexmoto XTRS is like polishing a turd... But Im doing this more for me than the bike. Ive been meaning to get my teeth into some development work and I've been looking for a good excuse. This is it. Smile

So far all I have is a unfinished cad file and a photoshop mockup. Just to show you and have something to aim towards.

So heres the plan, The things going to be running on arduino, maybe 2. Though in the end if things seem too much I might go for a Raspberry Pi.

All the number crunching math will happen on the computer. It will read all the sensor data and throw out a bunch of variables that I could end up using to display...

So the displays. 2 standard dials, controlled by stepper motors with a LED array that follows the pin and changes colour according to certain parameters. The LEDs will be the relatively new addressable RGB diods. feed them power and you only need one pin to run them. Great stuff.

The LCD screen showing some graphics... A Digital read out of MPH, gear selected, signialing, journy miles, fuel level and range estimate, volts and odo/engine miles.

I realise the arduino cant handle all those graphics, so I'm going to use a Nextion display. I'm not sure how far I can push it, it may not support aplha channel bitmaps or pngs. So will see what I can do there. Also its one of the reasons why I might consider a Pi, it could do the graphics.

The enclosure. Im considering getting a cheap 3d printer for about 200 quid. While it wont be the top end quality printer its a good starter for me. And as a 3D artist I've been wanting to get something for a while.

Down the line when I got more money to spare ill get a higher end one.

One of the key features of this speedo is, it reads the MPH from the standard rotating speedo cable. I have worked out a low moving parts way to read the wheel rotations without the need of an extra magnetic hall effect sensor.

I need to find a spare receiver plug for a speedo to hack apart. But I can attach a disk or fan to the end of the cables receiver. This disk will spin, opening and closing the IR beam on an optical sensor. This can be used to extrapolate how many rotations the wheel makes. Using the power of maths, from there you can calculate the speed of the bike.

Because of the low level of contactless moving parts it should have a very very low failure rate. The only thing that can break is the disk coming off the cables receiver. Depending on how many holes I put in the fan/disk I can give it a high rate of accuracy...

This kinda tech is the same stuff used on mouse wheels.

I'm doing this for two other reasons, my mother passed away from cancer this year and its hit us all really hard. I need to keep busy to not let things totally become overwhelming. I'm also going to consider any business opportunities with this as well...

Now this isnt going to be a very quick build. Theres going to be lots of RnD work... I need to learn to program on the arduino (its been a while since i did any programming) and I need to save for things like the 3D printer. But all that after I've paid for all the stuff to get on the road with my bike. (insurance helmet stuff)

Costs... Now the other reason Im going ahead with this is, its going to be relatively cheap to do (other than getting a 3D printer) Its lol cheap...

Arduino clone 5 quid, 100 addressable leds 8 quid, LCD 14 quid (touch screen too so going to have a configuration page on it) wires capacitors resistors and opto sensor 5 quid? 32... Say 40 quid for safety before 3D printer stuff...

So here to begin with is a rather nasty looking photoshop mock up over the unfinished cad.

Im reacquiring my 3D software once its in hand I'll put together some better renders to show...
And I'll keep you all updated as it goes... I think I hope to have this finished by the end of the year. Depends on the 3D printer situation really.
____________________
Kawasaki ER6F 2007 650 (Now I just need that full license Very Happy)
Lexmoto XTR S 125
 Back to top
View user's profile Send private message You must be logged in to rate posts

Bodyguard
World Chat Champion



Joined: 28 Oct 2013
Karma :

PostPosted: 21:08 - 13 Jul 2016    Post subject: Reply with quote

I still think it's a waste of time and money.
 Back to top
View user's profile Send private message You must be logged in to rate posts

RhynoCZ
Super Spammer



Joined: 09 Mar 2012
Karma :

PostPosted: 21:13 - 13 Jul 2016    Post subject: Reply with quote

What the lad above says, but then, if making it brings you joy, then go for it.

One thing, make sure you pick a display bright enough so it can be used outside in the direct sun light. Thumbs Up
____________________
'96 Kawasaki ZX7R P1 (sold) - '90 Honda CB-1 (sold) - '88 Kawasaki GPz550 (sold)
'95 Mercedes-Benz w202 C200 CGI; At my disposal: MZ 150 ETZ
 Back to top
View user's profile Send private message You must be logged in to rate posts

lihp
World Chat Champion



Joined: 22 Sep 2010
Karma :

PostPosted: 21:44 - 13 Jul 2016    Post subject: Reply with quote

Waste of money, won't get finished.

Your OP suggest you don't know what you're doing.
____________________
covent.gardens: lihp is my most favourite member ever
 Back to top
View user's profile Send private message You must be logged in to rate posts

NutsyUk
Crazy Courier



Joined: 22 Jun 2016
Karma :

PostPosted: 21:57 - 13 Jul 2016    Post subject: Reply with quote

op?
____________________
Kawasaki ER6F 2007 650 (Now I just need that full license Very Happy)
Lexmoto XTR S 125
 Back to top
View user's profile Send private message You must be logged in to rate posts

lihp
World Chat Champion



Joined: 22 Sep 2010
Karma :

PostPosted: 22:03 - 13 Jul 2016    Post subject: Reply with quote

NutsyUk wrote:
op?


Original Post
____________________
covent.gardens: lihp is my most favourite member ever
 Back to top
View user's profile Send private message You must be logged in to rate posts

NJD
World Chat Champion



Joined: 11 Mar 2015
Karma :

PostPosted: 22:04 - 13 Jul 2016    Post subject: Reply with quote

OP = Original post, gah, get with the times.
____________________
The big ol' lump.
C̶h̶o̶n̶g̶ ̶n̶o̶o̶d̶l̶e̶.̶
 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: 22:14 - 13 Jul 2016    Post subject: Reply with quote

How will the arduino handle the floating point maths for the speed and distance. You aren't going to be able to leave it plugged into a computer while you are riding. Floating point maths is processor cycle heavy and there for time consuming

Have you checked well rpm to the rpm of the speedo cable. Well the refresh rate of the ardiuno and ir pickup be fast enough. Hours are intending to stuff the stepper motors, unipolar or bipolar, personally I would drop this altogether and just display the data.
____________________
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

Nope.
World Chat Champion



Joined: 16 Feb 2011
Karma :

PostPosted: 22:19 - 13 Jul 2016    Post subject: Reply with quote

Utterly utterly pointless, if it makes you happy then go for it but I doubt it'll run to completion. Not knocking, just being honest.

Wouldn't the time/money be better spent getting a licence and a bigger bike? Razz
____________________
2011 XT660Z Ténéré - 2003 YZR-R1 5PW (In Build)
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

NutsyUk
Crazy Courier



Joined: 22 Jun 2016
Karma :

PostPosted: 22:31 - 13 Jul 2016    Post subject: Reply with quote

I considered the price of the bits cheap enough as a little cheap side thing to work on... Yeah its more to do something than doing it for this particular bike...

As for floating point... This doesn't need floating point calculations, Im happy to round off my integers to still be accurate to around 1 or 2 mph. Not like off the shelf speedos are anywhere near that accurate.

But I'm paying for the more important getting on the road stuff first. So far I've only spent 15 quid on enough parts to start researching.
In any case im not going to be doing the full licence until next year at the earliest anyway, so even saving up for a bigger bike isnt going to happen yet.

Anyway as i said, if one arduino or its higher powered clones cant handle everything, ill consider a second arduino to share the tasks or move to Pi.
____________________
Kawasaki ER6F 2007 650 (Now I just need that full license Very Happy)
Lexmoto XTR S 125
 Back to top
View user's profile Send private message You must be logged in to rate posts

JGrey
Derestricted Danger



Joined: 15 Jul 2016
Karma :

PostPosted: 10:03 - 15 Jul 2016    Post subject: Reply with quote

I've built a few streetfighters and adventure bikes. I love it, it makes me happy, anything that gets me away from the wife makes me happy. I recently got a Honda Sonic 125. She hated it so I decided to keep it and pimp it out, just to really piss her off. I'm loving working on it, so much easier than playing with a big, expensive bike. I say go for it, it'll be worth it just for what you learn along the way.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

WD Forte
World Chat Champion



Joined: 17 Jun 2010
Karma :

PostPosted: 15:46 - 16 Jul 2016    Post subject: Reply with quote

I'm all for gadgets and such as I do enough myself but if you're new to programming Arduino ( C/C++) and Pi's ( Python)
you're breaking the starting out or catching up K.I.S.S. law
I'd break it into seperate projects first and only combine them
after the inevitable mistakes are made and experience gained

If the tacho and speedo are servo driven which I looked into when considering my own dash project,
don't drive them directly from the Arduino, it wil shit its pants(technical term)
use a servo driver board.
I'd use something like this
http://www.ebay.co.uk/itm/I2C-16-Channel-Servo-Driver-Board-with-12-Bit-PWM-for-Arduino-Raspberry-Pi-/141493194018?hash=item20f1a6cd22:g:QkMAAOSw3ydVp8S9

What you don't use for servos can be used for leds and other stuff
This saves the duino doing all the hard work and it just has to
spit a few numbers at the driver board every few hundred mS or so
The programmable leds are fun but will need their own power supply as well

All good fun but costs will rise I betcha
____________________
1979 cx500 - Zanussi Wd12: - LG Combi Multiwave - Swan 4 slice toaster with removable crumb tray
 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: 16:35 - 16 Jul 2016    Post subject: Reply with quote

WD Forte wrote:
All good fun but costs will rise I betcha


this times a million.

When I built the macro rail, by the time you taken into account 2 mistakes which caused the FPU and the stepper controller to be cooked I spent the better part if £90 just on the electronics. was hoping to spend £30 or £40. was hoping everything was going to be less than £150

Spent 2 years on the code that makes it run - that's the killer, even if you are really really good and coding it takes time, testing, more time and more testing, rinse and repeat until you get close to the final product. Heck just the learning curve that came with the FPU was 6 months. Designing how the user interfaces with the system is another 6 months of coding and recoding until there was something that worked smoothly and could be interface with the rest of the code effectively. if its not the hardware that get you, its the hours of banging your head against the keyboard screaming "why wont thing fecker work"
____________________
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

NutsyUk
Crazy Courier



Joined: 22 Jun 2016
Karma :

PostPosted: 17:13 - 16 Jul 2016    Post subject: Reply with quote

orac wrote:
WD Forte wrote:
All good fun but costs will rise I betcha

its the hours of banging your head against the keyboard screaming "why wont thing fecker work"


Oh im prepared for that *shows scars on his forehead from other head banging projects...

Already playing with the arduino learning it and coding in c...

This is what I learnt so far... 1 The Arduino IDE is horrid. Simple but too simple. There isnt even any kind of class/option drop down when coding... and its a pain in the arse to view source option from the imported libraries...

So, I've got a eclipse spin off for arduino and going to try that out for a bit.

2, the cheap stepper motor i got off ebay when i ordered the arduino is not great. Its slow.... VERY SLOW. Spent a while trying to get it to work, (one of those head banging moments) and realised its top speed is about 15rpm way to slow for a speedo.

http://www.ebay.co.uk/itm/Stepper-Motor-X27-168-Gauge-Instrument-Cluster-For-GM-Chevy-GMC-Pontiac/251719346120?_trksid=p2047675.c100005.m1851&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D35923%26meid%3De81a0c9a662c44afb669d2987b14e497%26pid%3D100005%26rk%3D1%26rkt%3D3%26sd%3D252456346049

wow long url...

Anyway this stepper motor is low torque for speedoes should do fine.

Im currently running off the power through the arduino as its only 5v, but when i do the propper build ill be designing a pcb with a dedicated power line for the motors and leds and stuff... Only thing is right is i need to work the best way to drop 12-15v to 3-5 Very Happy I dont want to go down the dropper resistor route as its wasted power. I want to do it right. I think (though I need to research it a little) its a dropper capacitor?

Anyway plenty of time.
____________________
Kawasaki ER6F 2007 650 (Now I just need that full license Very Happy)
Lexmoto XTR S 125
 Back to top
View user's profile Send private message You must be logged in to rate posts

NutsyUk
Crazy Courier



Joined: 22 Jun 2016
Karma :

PostPosted: 17:19 - 16 Jul 2016    Post subject: Reply with quote

WD Forte wrote:

What you don't use for servos can be used for leds and other stuff
This saves the duino doing all the hard work and it just has to
spit a few numbers at the driver board every few hundred mS or so
The programmable leds are fun but will need their own power supply as well


Ill look into it.

Though the LEDs i have planned only need 1 pin to feed out all the data.
____________________
Kawasaki ER6F 2007 650 (Now I just need that full license Very Happy)
Lexmoto XTR S 125
 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:15 - 17 Jul 2016    Post subject: Reply with quote

using libraries, class drop down. what the hell sort of coding have you done the past, just write the code out. most of my current projects would need around 15 side of a4 to print, the macro rail needed more than 40.

you need to learn some electronics by the sound of it too. a decent buck regulator with 5.1 zenner (on the regulated side) for extra protection, smoothing caps on all both the input and output side of the regulator and power pins of the processors and ICs in the circuit. All the non buck regulators I use are rated for about 48v and are LDO. The bonus of the buck regulator is there is very little power wastage and the can normally deliver more current that linear regulators, the down side is they normally need more support components which make the circuit more complex. If you plan on using an ADC somewhere along the way you may need to take into account how clean the power supply is, getting a very clean supply in the noisy environment of cheap motorcycle supply could be tricky.

I normally use picaxe, which has its drawbacks with processor speed (caused by it interpreted and tokenised code implementation) but being based on VB syntax its very easy to learn fast and prototyping can often be done in less time, due to this simplicity.
____________________
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

Robby
Dirty Old Man



Joined: 16 May 2002
Karma :

PostPosted: 10:05 - 24 Jul 2016    Post subject: Reply with quote

Nowhere_Elysium was working on a very similar project a couple of years ago. I think he got most of the way there and then got bored and did something else. Worth looking for his thread to find out the pitfalls and maybe nick his code.

Otherwise, I'd give you the same advice I gave him. Rather than cocking around with a low priced arduino and cheap screen, see if you can do the whole thing as an Android app instead. That way you can use your phone as your dashboard, and integrate some nice GPS mapping and datalogging stuff.

For extra bonus points, get the phone to also work as your ignition/immobiliser/2nd factor authentication to start the bike.
 Back to top
View user's profile Send private message You must be logged in to rate posts

NutsyUk
Crazy Courier



Joined: 22 Jun 2016
Karma :

PostPosted: 16:42 - 24 Jul 2016    Post subject: Reply with quote

Robby wrote:
Nowhere_Elysium was working on a very similar project a couple of years ago. I think he got most of the way there and then got bored and did something else. Worth looking for his thread to find out the pitfalls and maybe nick his code.

Otherwise, I'd give you the same advice I gave him. Rather than cocking around with a low priced arduino and cheap screen, see if you can do the whole thing as an Android app instead. That way you can use your phone as your dashboard, and integrate some nice GPS mapping and datalogging stuff.

For extra bonus points, get the phone to also work as your ignition/immobiliser/2nd factor authentication to start the bike.


That would still require running some sort of arduino with bluetooth to send interface with the phone...

In any case. Heres some update... Been playing with stepper motors and leds, and so far got some basic positioning sorted out for the MPH side of things. So all you need to do is feed in a MPH value and leds and motor update where they need to be.

Though currently I've been trying to move this project over to a mini maple clone. Faster CPU and support for multiple software threads... However, ive just bricked the maple trying to update the boot loader Sad
Alls not lost I think, but its being a nightmare to move over to this new board.
____________________
Kawasaki ER6F 2007 650 (Now I just need that full license Very Happy)
Lexmoto XTR S 125
 Back to top
View user's profile Send private message You must be logged in to rate posts

NutsyUk
Crazy Courier



Joined: 22 Jun 2016
Karma :

PostPosted: 09:30 - 25 Jul 2016    Post subject: Reply with quote

managed to unbrick it... so today im going ot be porting my project over to the new board.
____________________
Kawasaki ER6F 2007 650 (Now I just need that full license Very Happy)
Lexmoto XTR S 125
 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: 10:16 - 25 Jul 2016    Post subject: Reply with quote

Wow, didn't realise that my incredible laziness would lead to such cynicism in the BCF crowd Laughing

OP, it's a ballache and a half, and is most definitely not worth doing for a 125, IMO. It's also not really a good project to cut your teeth on with regards to making prototyping and developing a functional item like this. You've no experience of the 3D printing aspect, you're rusty on coding, and trust me when I say that motorbikes are a fucking horrible electrical environment to try and integrate low-voltage digital electronics into.
____________________
'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

weasley
World Chat Champion



Joined: 16 Oct 2010
Karma :

PostPosted: 12:01 - 25 Jul 2016    Post subject: Reply with quote

NutsyUk wrote:
2, the cheap stepper motor i got off ebay when i ordered the arduino is not great. Its slow.... VERY SLOW. Spent a while trying to get it to work, (one of those head banging moments) and realised its top speed is about 15rpm way to slow for a speedo.


I'm not at all into coding and such, but this caught my eye. 15 rpm = 5,400° per minute = 90° per second. Your speedo mockup shows 0-80 mph over (approx) 180° of arc. Your bike can do 0-80 faster than 2 seconds...?! Shocked

I'll agree it's too slow for a rev counter, but it looks within scope for a 125 speedo.
____________________
Yamaha YZF600R Thundercat
 Back to top
View user's profile Send private message You must be logged in to rate posts

ScaredyCat
World Chat Champion



Joined: 19 May 2012
Karma :

PostPosted: 12:53 - 25 Jul 2016    Post subject: Reply with quote

Ignore all the naysayers. If you've ever built anything yourself from scratch you'll now it's not just about the end result, it's the journey and what you learn from it. It doesn't matter that it'll cost loads more than you expect and you'll hit barriers that will have you screaming.

Don't stop. Do it. You'll learn a lot from it.

Also add: Air temp, coolant temp, hrm, gps, indicator trigger, brake trigger, suspension triggers. Make it so you can store stuff on an SD Card.

Congratulations on your own black box Smile
____________________
Honda CBF125 ➝ NC700X
Honda CBF125 ↳ Speed Triple
 Back to top
View user's profile Send private message You must be logged in to rate posts

weasley
World Chat Champion



Joined: 16 Oct 2010
Karma :

PostPosted: 13:10 - 25 Jul 2016    Post subject: Reply with quote

ScaredyCat wrote:
Ignore all the naysayers. If you've ever built anything yourself from scratch you'll now it's not just about the end result, it's the journey and what you learn from it. It doesn't matter that it'll cost loads more than you expect and you'll hit barriers that will have you screaming.

Don't stop. Do it. You'll learn a lot from it.

Also add: Air temp, coolant temp, hrm, gps, indicator trigger, brake trigger, suspension triggers. Make it so you can store stuff on an SD Card.

Congratulations on your own black box Smile


Also, this. Do it because you can. And keep us informed - I love following this sort of thing.
____________________
Yamaha YZF600R Thundercat
 Back to top
View user's profile Send private message You must be logged in to rate posts

J.M.
World Chat Champion



Joined: 27 Mar 2011
Karma :

PostPosted: 00:54 - 27 Jul 2016    Post subject: Reply with quote

I would consider modulating this.

Have one board that deals with turning mechanical movements into digital signals. Then another board for turning digital signals into pretty graphics.

That way, you'd get two neat benefits;
- You can mock input to the graphics board for easy testing
- Moving the dash to a new bike just needs a simple replacement of the mechanical movements board
____________________
2004 R1
 Back to top
View user's profile Send private message You must be logged in to rate posts

NutsyUk
Crazy Courier



Joined: 22 Jun 2016
Karma :

PostPosted: 16:32 - 29 Jul 2016    Post subject: Reply with quote

Thanks guys, thats pumped me up a bit. Kinda bad news today, my 7D camera seems to have died Sad So been a bit glum about that.

But in other more positive news. I wanted to post a little video of the current state of this project.

After all the head scratching and banging head against the table, and getting the maple mini board up and running again. i finally got the project ported over to the faster board, I say faster it does seem to have one problem. It seems slower sending code to the LEDs, but i think its a bug in the library im using. Hope to have that fixed up by the time im done with this.

Right, new addition today to the board. yesterday my nextion display turned up. So ive been playing with that working out how to get it going and upload stuff to it.

So i have a little treat.
A little video showing where I am at now.
https://www.youtube.com/watch?v=bfcksaWX2BU

Its just running off a random number between 0 and 80 for now.
I tweaked the code for this video so it runs on 360' matching the LED array.

The final build will be back to half circle.

Next thing to do now is build a sketch that simulates more realistically MPH and RPM data. Put that on my other arduino and have it send the pulses down a wire for this board to pick up and read and calculate.

And yeah this motor while slow is fast enough for the MPH side of the gauge, though I have 2 proper speedo gauge motors on the way to try and I've also ordered 2 12V versions of this stepper motor I currently have. During early tests I found at 12v i can run it a lot faster. But the motor got rather hot... So going to try a 12v version see if it runs cooler but stays the same high speed.

Also its my birthday soon :p So I may have convinced some one close by to help me buy a cheap 3D printer... So I may have a case to fit all this in sooner than I first thought. Ill keep you updated...
____________________
Kawasaki ER6F 2007 650 (Now I just need that full license Very Happy)
Lexmoto XTR S 125
 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 1 year, 139 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
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
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.13 Sec - Server Load: 3.63 - MySQL Queries: 17 - CDN Objects: 57 - Page Size: 145.44 Kb