New project - Arduino!

Please share your secrets! What mods have you made to your TRX?

Moderators: trixynut, Mincehead, dicky, phuk72, Jak, Kevtrx849

coxylaad
Site Sponsor
Posts: 1211
Joined: Fri Jan 21, 2011 12:30 am

New project - Arduino!

Post by coxylaad » Sat Jul 05, 2014 12:02 am

Hi all, well my new project will be an ongoing development of an electronics package for the TRX.
I am going to use an Arduino with a 3 axis accelerometer, gyroscope and gps sensor to measure g forces, rpm, speed, and gps position. Hopefully I will be able to over lay this onto my video footage.

From there I am going to try and measure front and rear wheel speeds, and combined with the other recorded information use it start to look at some sort of traction control system via phased ignition cut.

Should be interesting, and it's awesome that the parts are peanuts to buy! The unit is a fiver, the accerometer and gyroscope is 4 quid. I reckon the entire hardware won't cost me more than 30 quid.

It's something to do for when the winter closes in :)

cobbadiggabuddyblooo
Site Sponsor
Posts: 6809
Joined: Thu Aug 28, 2008 9:19 am
Location: Brisbane,Australia

Re: New project - Arduino!

Post by cobbadiggabuddyblooo » Sat Jul 05, 2014 1:08 am

Wow :shock: a Trx with a flux capacitor to bring something from the past , back to the future 8) 8) and all for the price of a slab of beer
laughter is the best medicine

coxylaad
Site Sponsor
Posts: 1211
Joined: Fri Jan 21, 2011 12:30 am

Re: New project - Arduino!

Post by coxylaad » Sat Jul 05, 2014 1:14 am

It's worth noting I have yet to push the bike hard enough warrant any traction control, so testing should 'interesting'

cobbadiggabuddyblooo
Site Sponsor
Posts: 6809
Joined: Thu Aug 28, 2008 9:19 am
Location: Brisbane,Australia

Re: New project - Arduino!

Post by cobbadiggabuddyblooo » Sat Jul 05, 2014 7:22 am

But as you said , will be an interesting project to just tinker with through winter. I 'be had a few fun controlled slides out of turn 1 on the the carousel here at Lakeside Raceway with only 87hp to the rear and it's one of the things I love about the Trx. Enough power to have some fun and not enough power to get you into too much trouble.
laughter is the best medicine

coxylaad
Site Sponsor
Posts: 1211
Joined: Fri Jan 21, 2011 12:30 am

Re: New project - Arduino!

Post by coxylaad » Sat Jul 05, 2014 10:52 pm

That was the reason I built the bike cobba. That said there have been a few murmurings about something more powerful to keep up with the big bikes on the straights...

coxylaad
Site Sponsor
Posts: 1211
Joined: Fri Jan 21, 2011 12:30 am

Re: New project - Arduino!

Post by coxylaad » Mon Jul 28, 2014 12:04 pm

small update on this one:

I have now wired up the 6 axis accelerometer and gyroscope, and put some code in so it now displays the lean angle of the circuit board. it was quite easily really. the next step is to wiring in my SD card slot and start recording the data.

Once I have done this I will look at purchasing a GPS module so I can overlay my lean angles onto a track position.

Can you get a brake pressure sender at all? I would love to be able to record when and how hard I am braking.

User avatar
Kev44
TRX-Enthusiast
Posts: 94
Joined: Thu Jul 18, 2013 2:02 pm
Location: Sunny Lincs

Re: New project - Arduino!

Post by Kev44 » Wed Jul 30, 2014 2:41 pm

Wont the -g force from the gps tell you when and how hard you are braking? or did you mean in pressure?
TRX850 Cafe Racer, Ducati 749 Hybrid, Aprilia SXV550, KTM525EXC, new cafe racer project watch this space!

coxylaad
Site Sponsor
Posts: 1211
Joined: Fri Jan 21, 2011 12:30 am

Re: New project - Arduino!

Post by coxylaad » Wed Jul 30, 2014 2:45 pm

it would, but it wouldn't tell you how hard you were squeezing the brake, or what proportion of that was engine braking, or even rear brake (should you be one of those perverts that actually use their rear brake lol

User avatar
Kev44
TRX-Enthusiast
Posts: 94
Joined: Thu Jul 18, 2013 2:02 pm
Location: Sunny Lincs

Re: New project - Arduino!

Post by Kev44 » Wed Jul 30, 2014 3:10 pm

Only use my rear brake off roading :lol:
TRX850 Cafe Racer, Ducati 749 Hybrid, Aprilia SXV550, KTM525EXC, new cafe racer project watch this space!

coxylaad
Site Sponsor
Posts: 1211
Joined: Fri Jan 21, 2011 12:30 am

Re: New project - Arduino!

Post by coxylaad » Fri Feb 20, 2015 12:46 pm

I've not had a great deal of time to work on this but this is the current staus:

I have the hardware for the lean angle, and accelerometer wired up on a prototyping breadboard and proven.
Myself and my mate have written some code to produce a csv file at a sampling rate of 60 frames a second to record lean angle, pitch and yaw rate against time. this is all but working now.
The next step is to wire in the GPS unit that we have and include on the same row of data, gps coordinates, speed, and date time.

I have a track day booked for the 20th april, I am hoping to have a working prototype fitted to the bike by then.
There is a software package called dashware that can create overlays onto your video to display the recorded data - stay tuned for MotoGP lean angle graphics! (unless my lean angle is so pisspoor then I might not put it on there haha)

All that is phase1. Phase2 if to start recording throttle position, and front + rear wheel speeds. I would like to record brake pressure but so far I have not been able to find anything that that I can fit onto the braking system to record that information.
As part of phase2 I am going to try and build a dash display that displays lean angle real time, and also has a rear wheel slip meter.


Phase3 when it comes around may building on the data gathering from the above to work out some sort of algorithm for traction control via ignition cut. The new yamaha R1 so far is the only production bike with lean sensitive traction control on it. may as well have a go at that :)
What I need to produce is a table of what level of lean angle against acceptable slip, then on top of that I need 3 dimension for each cell element to show how hard the TC comes in against how far over the slip threshold the reading is.

I cant see why this wouldn't work. I just don't want to be the guy to test it lol

coxylaad
Site Sponsor
Posts: 1211
Joined: Fri Jan 21, 2011 12:30 am

Re: New project - Arduino!

Post by coxylaad » Fri Feb 20, 2015 4:48 pm

This is an example of the dashware product in use with a purchased datalogger.
https://www.youtube.com/watch?v=YRMjBXdU4fY

55 degrees lean 8-[

User avatar
M.V.
Site Sponsor
Posts: 1509
Joined: Sat Jul 04, 2009 3:23 am
Location: Melbourne, Australia

Re: New project - Arduino!

Post by M.V. » Fri Feb 20, 2015 11:19 pm

Great project, looking forward to more!

You can get inline pressure switches for activating brake lights, but I'm pretty sure they are just on/off, not actually pressure per se...

-G loads would give you a pretty good idea of how hard you were actually braking, be it front, rear or engine. You could always do a few benchmarks tests to estabilish maximum -G from each, ie engine braking alone, rear brake alone (until it locks), front brake until you lift the rear (or go over the bars, or lock the front :D )

Can't remember the exact figure, but there's a G limit to what the tyre can put up with under braking, if you know what that is you know that you can brake harder/later into a particular corner. Not sure brake line pressure would give you as much useful info as the -G loads really...

Must get one of these Arduino things, they look pretty cool.

User avatar
QuickDraw
Site Sponsor
Posts: 165
Joined: Thu Dec 16, 2010 9:06 am
Location: Sunshine Coast, QLD
Contact:

Re: New project - Arduino!

Post by QuickDraw » Fri Feb 20, 2015 11:20 pm

That is some cool, cool data! 8) Can't wait to see some TRX footage!
A real-time dash wouldn't suit me though. Practicing at QR years ago, I once mounted a stopwatch up front and wasn't happy with the numbers so I pushed it a bit harder an binned it in the next turn (6) #-o Lesson learned: ride by my bum, not the numbers!

coxylaad
Site Sponsor
Posts: 1211
Joined: Fri Jan 21, 2011 12:30 am

Re: New project - Arduino!

Post by coxylaad » Mon Feb 23, 2015 11:02 pm

haha well ultimately track days for me are a fun hobby. I like to go fast but I never push too hard so that I feel I am beyond control. It means I tend to progress at a slow rate.

The data gathering for me satisfies the nerd in me to analyse what I am doing and look for ways to improve safely.

I can record g force really easy, its just another field that the accelerometer produces. It will all go in the mix.
Last edited by coxylaad on Sun Mar 01, 2015 7:17 pm, edited 1 time in total.

User avatar
rbaron25
Site Sponsor
Posts: 744
Joined: Thu Sep 23, 2010 7:34 am
Location: South Queensland, Australia

Re: New project - Arduino!

Post by rbaron25 » Sat Feb 28, 2015 4:04 am

Hi mate,
Any chance you could post the sketches and components you used... If you're not manufacturing them for sale
...
I have some Arduino gear here I might be able to mimic your effort...
I didn't see you...
Cause you didn't bloody look!

Post Reply