Page 1 of 2

New project - Arduino!

Posted: Sat Jul 05, 2014 12:02 am
by coxylaad
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 :)

Re: New project - Arduino!

Posted: Sat Jul 05, 2014 1:08 am
by cobbadiggabuddyblooo
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

Re: New project - Arduino!

Posted: Sat Jul 05, 2014 1:14 am
by coxylaad
It's worth noting I have yet to push the bike hard enough warrant any traction control, so testing should 'interesting'

Re: New project - Arduino!

Posted: Sat Jul 05, 2014 7:22 am
by cobbadiggabuddyblooo
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.

Re: New project - Arduino!

Posted: Sat Jul 05, 2014 10:52 pm
by coxylaad
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...

Re: New project - Arduino!

Posted: Mon Jul 28, 2014 12:04 pm
by coxylaad
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.

Re: New project - Arduino!

Posted: Wed Jul 30, 2014 2:41 pm
by Kev44
Wont the -g force from the gps tell you when and how hard you are braking? or did you mean in pressure?

Re: New project - Arduino!

Posted: Wed Jul 30, 2014 2:45 pm
by coxylaad
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

Re: New project - Arduino!

Posted: Wed Jul 30, 2014 3:10 pm
by Kev44
Only use my rear brake off roading :lol:

Re: New project - Arduino!

Posted: Fri Feb 20, 2015 12:46 pm
by coxylaad
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

Re: New project - Arduino!

Posted: Fri Feb 20, 2015 4:48 pm
by coxylaad
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-[

Re: New project - Arduino!

Posted: Fri Feb 20, 2015 11:19 pm
by M.V.
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.

Re: New project - Arduino!

Posted: Fri Feb 20, 2015 11:20 pm
by QuickDraw
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!

Re: New project - Arduino!

Posted: Mon Feb 23, 2015 11:02 pm
by coxylaad
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.

Re: New project - Arduino!

Posted: Sat Feb 28, 2015 4:04 am
by rbaron25
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...