Kawasaki VN750 Forum banner

Data Logger.

2366 Views 76 Replies 8 Participants Last post by  Buddy
Well, a good project is never done! I'm expanding on my Ignitech Ignition module project.

A gentleman from New Zealand contacted me with interest in my logging program. He's using the Ignitech on his 2 stroke race bike and wants to log his races. He didn't like the idea of hauling around a laptop in a backpack for data-logging, so he asked me if I could set up an M5 Core2 (pictured below) to do the datalogging. I agreed, so he bought me one in exchange for helping him.

Product Communication Device Portable communications device Mobile device Output device

So, I'm rewriting my program to run on one of these.

In addition to logging, I'm hoping to use the small screen to output some of the data.
For my use, I'm planning on displaying RPM and engine vacuum. I already found that my tach is inaccurate, showing about 900 when the ignitech shows 1100.
The engine vacuum would be useful for syncing the carbs.

I haven't decided yet if I'm going to try to mount it up by the gauges, or if I'm going to tuck it under the trim panel, or not mount it at all.
Of course, this isn't waterproof, but the gentleman from New Zealand is working on a solution for that.

We're also talking about implementing GPS for speed monitoring. The built in accelerometer can be used to record G forces and lean angles.
If I have GPS speed data, I can use that along with RPM to show a gear indicator.

This project is going way beyond practical and is getting into the "just for fun" and "why not?" category. Clearly the 750 isn't a track bike. But it's now getting into a more universal project that can be used on more bikes. But I see some practical uses, like using G forces to practice emergency stopping.

After a week or so of fighting through some code bugs, I finally got the LCD screen to display "Hello World".
I'll periodically update my progress on here, unless this project is deemed too far off scope of the Vulcan 750.
I won't be offended if asked not to post updates. It is a bit off topic.
I suppose it could move it to the Goats Belly too. Whatever the administrators decide is ok with me.
See less See more
  • Like
Reactions: 2
1 - 20 of 77 Posts
I think this post can stay right here. It fits.

Love the Hello World reference. Reminds me of my youth, learning BASIC from nothing more than books and magazines I could scoop up at the library. Amazing how quickly computer processing has advanced.

Anyway, that M5 looks to be about $50? Not bad. And you're coding in MicroPython? How much does it differ from standard Python?

GPS for monitoring speed is cool. And using the accelerometers is also a nifty idea. You mentioned mounting it up by the gauges, is that safe? Extended exposure to sunlight will fry any smartphone, so would this thing be prone? (I'm specifically thinking of the screen and battery...)

Anyways, cool project! Can't wait for updates!

EDIT: Almost forgot... The GPS data for speed sampling is an interesting topic. In a nutshell, from what i understand, the smaller the sampling rate of that data, the more inaccurate the reading. Are you using a separate unit to acquire the GPS data?
I originally wrote the program in Python as the quickest path to log data on the computer. I have had a heck of a time getting any MicroPython working on the M5. So I decided to go with C Code instead, using Arduino IDE. C code is much more efficient anyways. I wasn't concerned about processing power on a laptop, but the M5 might be a bit constrained comparatively. That said, I'm not certain what all the differences are between Python and MicroPython.

Funny you mention smartphones and weather. I've been riding with my phone on the handlebars exposed to sun/wind/rain/bugs for 3 years. I've had to scrap bugs off the case. I've had to drain water from the case. And I've had the phone shut off from cold/low battery when I forgot to plug it in. In all, the phone (LG V30) has held up well! I did notice after my iron butt trip, that the screen now has a slight burned in image of the Calimoto navigation screen. Probably the 103F direct sunlight for hours is what did it in. I should have turned the screen off when I didn't need it. Most phone issues though seem to come from vibration messing up the camera focus motors. I haven't had any issues myself though. As for the M5, I'll make it removable so I can take it inside when parked.

For GPS, they make a GPS add-on for the M5. Some GPS receivers can calculate speed. Others only tell you location and you have to calculate speed based on distance over time. I don't know which one this is yet. For my use, I just need GPS speed to be in the ballpark and I can calculate exact speeds from RPM. My computer based logger already calculates speed off RPM. I just assume 5th gear and no clutch at all times.

The gent from New Zealand found a universal knock sensor that he's putting on his bike. He's wanting to interface that to the M5. Whenever a knock is detected he wants the M5 to trigger an input on the Ignitech which will then retard the ignition. He's also getting an exhaust temperature probe to measure exhaust gas temperature. I'm not sure his plan with that one yet. Maybe just logging it? Either way, the M5 is going to by BUSY.
Glad to hear that sunlight exposure didn't completely ruin your phone. I just remember hearing something about direct sunlight blah blah blah, so I've always tried to avoid it. Considering you've had no major problems with your screen, I have an interesting suggestion (which may or may not have occurred to you already....)

I wonder if you'd be better off using a rooted Android cell phone. Especially for the price point and capabilities. I'm assuming you're familiar with Java, but you can also use C++...

I started delving deeply into Android app development about three years ago (I had what I thought was a million-dollar-idea but someone beat me to it...) and found that it was very intuitive and relatively easy. Plus, there's already a massive library of code templates, and, via Reddit and other social media platforms, there's a veritable plethora of extremely experienced coders out there eager to help people.

Possibly worth checking into, maybe?

Regarding the knock sensor you mentioned... What conditions need to occur to produce a knock? I've never experienced it with any vehicle I've owned, but I've heard about it enough times to know that it's concerning. And, what does retarding the ignition have to do with it?

Sorry, I threw a lot at you at once. Take your time answering!
See less See more
Today I got the screen printing text. I figured out the 3 touch buttons. And I wrote a routine to set the internal clock time and date. I plan to time/date stamp all the logs. Next I'm going to try a serial port loopback test (tie RX and TX together) to try out the serial interface. The Python code should be fairly straightforward to port over once I get some of these details hammered out.

In short, if you advance ignition too much, it can cause the temperature/pressure to rise too high and cause spontaneous combustion elsewhere in the cylinder. AKA Detonation or pinging or knocking. I think technically pinging, knocking and detonation are different, but I don't recall the difference.

I had some pining on my F150 during low RPM acceleration. It fires cylinder 7 and 8 one right after the other. These two are the furthest cylinders from the distributor. It turns out that when the two wires are run parallel, the spark will jump from one wire to the other...even with new wires! Thus, a cylinder is fired 90 degrees too early! Ford put out a TSB telling shops to reroute the wires so they are no longer next to each other. Problem solved and no blown engine.

As for using a phone, my concern is physical interface to devices. How would I connect a SPI, UART and I2C device to a phone? Unless, are you talking about using a phone just as a touchscreen and letting the M5 do the heavy lifting?

Many accelerometers (including the ones in this device) also include gyros. So I'd be using the gyros for lean angle.

I'd be curious to run a WOT pull from 2k-8.5k and graph G-force vs RPM. I would expect it to roughly trace out the torque curve found on the dyno sheet that someone once posted here on the forum. It'd probably have to be 1st gear to avoid the effects of wind. But F = MA, so if we know A and M, we can calculate F. After more maths and gear ratios and tire diameters, you can get an approximate dyno run graph. Somewhere I have my bike weight written down. I rolled it 1 tire at a time onto a bathroom scale.
Don't see why you wouldn't use a phone, and just attach all the sensors you want via bluetooth.
Bluetooth is not very good for time sensitive data (when you're talking accuracy below 10mS). At redline, the engine is rotating once every 7mS. I'm reading from the Ignitech every 30mS. The guy from New Zealand wants to sample the knock sensors only during the combustion stroke at 15k rpm (half a rotation) which is 2mS, and he has to trigger the listening with 10 degrees of rotation accuracy (0.1mS). Bluetooth has ping times around 40-50mS on a good day. This is plenty fast for displaying data, reading key presses, and storing data. But it's orders of magnitude too slow for sensor data.

At some point too, you still need physical connections and a decent amount of processing power to read the sensors.
Fair enough. It's not difficult to add USB devices to a smartphone. My brother uses a modified smartphone with his paramotor. It tells him engine temp, rpms, fuel level, knots, and all all kinds of other stuff. I know that the phone is directly connected to a Raspberry Pi, and then the Pi is connected to a bunch of other sensors. I also know that the phone is rooted and running a customized OS. Honestly, for what you're doing, needing great processing power is important.

You could also implement a lot of devices commonly found in radio-controlled aircraft applications.

I am pretty sure that everything you and your friend from New Zealand are wanting has already been developed and perfected, but you'd have to reach out to the right folks, who I'm sure would be absolutely happy to freely provide you with all the info you need. I can think of quite a few places to point you to, so let me know if it interests you and I'll drop some links.
  • Like
Reactions: 1
Sorry, I get a little too passionate when someone challenges me on certain things. You were making good suggestions and I feel went overboard to prove my way of thinking. It's a pattern in my life that was recently pointed out to me, and now I'm starting to see it more often. I'm a little stuck in my ways and wanting to work with what I know, thus I had to prove that my way is best. It's not an attitude conducive to learning, that's for sure! I appreciate your suggestions! If I wasn't already as far down my current path, I might pivot. Especially if I was intending on a commercial product.
I found nothing negative about your last reply! Don't be so hard on yourself.

So, just how far down the path are you? Because now that we've been having this discussion, I'm trying to convince myself that I need something that I probably don't!

Seems like Eleanor is running very well. I like your idea of a shift indicator, but where would you put it? On a HUD? Because it seems like having to look at the instrument cluster for a cue on the exact right moment to shift would be wildly distracting to me.

Keep in mind, my one and only accident was t-boning a Honda Element (looks like a toaster on wheels) at 35mph, and if I hadn't taken an extended glance at my left rearview mirror, I could have avoided that lady. My point being that I try to keep my eyes on where I'm going, with occasional quick glances at the rearview. (I should also mention that the mirrors were mounted on the ends of the handlebars, and I'd never recommend those to anyone.

I'm eager to hear your reply, because I have a novel idea for a great helmet HUD. I don't know if it's been done, I tried looking on Google, but saw nothing specific.

I have a Samsung Galaxy watch that my brother gave me last year. It's the very first version they made, and it was brand new when he gave it to me. His excuse for deciding he no longer wanted it was "I don't like stuff on my wrists." I asked "Why'd you buy it, then?" His response was "Because it looked cool."

Nowadays this same version can be found easily for $50, many of them new. Coding apps for Android isn't too difficult, so I think it would be neat to use the watch as a HUD. Or, just as a display for real-time data. I've considered places to mount it, where I could see it easily, and I think it would work great above and between the speedo and tach. I'd like to make one of those panels that Knifemaker made. It would work great there.

I dunno. Just spitballing.

Once again, no offense was taken. It takes quite a bit to get me rattled.
See less See more
Nice! Looks like I've fallen behind on the technical curve!
Heh, how about gravitometers and magnetometers? My Samsung watch has more processing power than NASA had at their disposable when sending men to the moon. Seriously.
Nah that was the cool one.
I spent a good fifteen minutes looking for Transformers Caclulator Watches, and this is the only one I could find. Sorry. I wish I had all of my Transformers from back in the day. Sounds like you and I are similar in age. My big thing was the sets with multiple Transformers that combined to make a big one. I used to have the original Megatron pistol with accessories before it was banned.

It blows my mind how much some of our old toys are worth!
I’ll be 46 in a few weeks, the watch I had was a definitely a nifty little knockoff. I had a fair amount of the real stuff but most didn’t survive. I wasn’t thinking about future investments yet lol. I did manage to save two, and a 5 piece Voltron lion set, but it’s not mint. My Megatron pistol met a horrific fate.
I'll be 48 next week. Close enough, though. Man, I don't care what anyone says, the '80's and '90's were fine by me.
  • Like
Reactions: 1
What I have for a shift light is a... ....I was going to automatically delete the oldest log files as space runs out.
Sounds like you really know your stuff! What I still quite don't understand is the why of it. What's the advantage of shifting at a specific moment? And, when that light blinks, by the time you react to it that moment is long past, right?

It almost seems to me like it's an awful lot of investment for little/inconsequential return.
I have GPS data working...[REDACTED TO SAVE SPACE] ....It's displaying the compass heading, elevation, speed, and unit (not vehicle) battery percentage.
My brother and I were talking a little about your project, and he told me to ask you something and I completely forgot about it until I saw your post again today...

He wanted to know if you considered reading RPM's optically? Not sure I understood what he meant, but I think I get the idea. Is this something that's commonplace or no? I'd never heard of it until he mentioned it.
More screen shots. These show all the different data that can be displayed on the screen (and logged) so far. Up to 4 displayed at a time, and you can mix and match what's on screen. I also added the ability to write standard .GPX files. Anything with imperial/metric units has both units available. Time can be 12/24hr and is set by GPS. It's stored locally so time is always available immediately at power up.

RPM turns orange at 7500 and flashes red at 8500. Vehicle voltage turns white when it's in a normal range.
You're making great progress! Now, if there's a way for you to program that thing to tell someone to stop tailgating me, I'll buy one.

(Actually, I'd like to get one of those little scrolling-text LED things, and mount it on the back of my helmet and have it say "BACK THE **** OFF!")
  • Like
Reactions: 1
Very cool! My phone does the same thing. I use it every time I ride. It also records my speed when moving. I decided to start doing this after my friend Caleb's accident. There was debate about what had happened, and how. This way, if something happens to me, at least they'll be able to see exactly what I was doing.
  • Like
Reactions: 1
Here's actually connected to Veronica!
The ignition timing isn't reading correctly, but everything else appears correct!
View attachment 55109
Nifty! Those leads remind me of the receiver/servo/gyro leads on RC aircraft.

I've got a whole bunch of mercury motion switches from thermostats, been contemplating a lighting setup that kicks on when I decelerate. Haven't decided on anything yet. I collected these things for awhile, figuring I'd sell the mercury, but never did find a buyer. Not even sure what else I could do with them.
The video should work now. (Content redacted to save space. Because NASA said so.)
Jason, have you ever ridden your Vulcan for, you know, fun? Or leisure? You're like the Mad Frankenstein of Kawasaki Vulcans! 🤣😂🤣
  • Haha
Reactions: 1
That is most likely the most high tech VN750 around. Truly all you need now is fuel injection and a overdrive or 6th gear
I'd love to have EFI, but after asking about it here, it turns out it would be a phenomenal pain-in-the-a$$.
Conversion to a good single carb would be fine unless you had the electronics Jason does.
I'm absolutely going to try to switch to a single carb in the spring. I did talk to the local motorcycle mechanic, and he said he'd do the conversion for $250, not including parts. I can't imagine spending over $500 just to make the switch to EFI. But it would definitely be cool to have.
I refined the calculated speed to better accommodate gear changes.
If the RPM changes by more than 12% within 1/2 second, it assumes a gear change and calculates the speed based on the expected new gear.
After 1/2 second, the GPS speed again matches the calculated speed.
This keeps the displayed speed from jumping around.
It's not perfect, and the graph will sometimes show small spikes in speed, but it's much better than before.

I added 2 resettable trip meters that track miles, engine revs and running time.
I might add a 3rd: one for oil change intervals, one for fuel ups, and one for a particular trip.

I'm working now on rotating the accelerometer data to accommodate non-level mounting.
Once this is done, it'll be possible to estimate speed by integrating acceleration over time.
GPS speed not only has the 1/2 second delay in reported speed, it also has a longer and somewhat variable delay in showing speed when accelerating from a stop.
As a result, the gear indicator isn't reliable until about 3rd gear on spirited accelerations.
Rotating the accelerometer data will also allow me to record lean angles.
Using acceleration data for speed would allow me to maintain speed should I lose GPS reception.
Eventually, I should be able to corelate changes in RPM to acceleration to determine speed and gear without GPS.

Somewhere along the way, my GPS stopped updating 10 times a second and is only updating 1 time a second.
It might have been when I told it to use multiple GPS networks (GLONASS, Beidou, Galileo etc).
Some GPS units lose reporting frequency when using multiple networks.

I put one thermocouple into a radiator tube while I was doing a coolant flush.
Unfortunately, the probe is in contact with the metal housing and it's shorting to ground.
So I'm not getting a proper temperature reading.
I put it in the hose between the thermostat housing and the fill cap from the cap side, but I couldn't get the probe to go past the lip.

I added a grade calculator that compares the altitude every 1/10 of a mile to determine the grade of the roadway.

I added lifetime max speed and min/max altitude.

I modified the physical power button to function as a physical sleep button (short press) and a soft power button (3 second hold) in addition to a hard power button (6 second hold).
This allows for power down with gloves on. Previously it required the touch screen to safely power off (save all variables to memory).
Waking up from sleep happens either by screen touch, or key on/kill switch off.
Sleep happens either by a short press of power button, or 2 minutes of inactivity (key off/kill switch on) and GPS speed under 3.5 MPH.
I love reading about your project! At the end of the day, what exactly is the ultimate goal here? Don't mistake this sincere question for anything other than that. As exciting as it is to see your progress, I'm still not quite sure what the goal is.

A portable GPS device that will tell you when the optimum moment to shift gears has occurred? I also don't quite understand the benefit of recording the lean angle information.

Once you've completed this entire project to your satisfaction, will this be something that you offer for sale? I'd buy one just for the novelty of it.
  • Like
Reactions: 1
To me it sounds like an engineer “engineering” for fun and I say why the hell not? If you’re selling a product then finding a practical purpose is always important, but If you simply love science and want to apply it to wherever possible then I say have at it. Keep asking more questions and finding more answers. More data is never a bad thing it may come in useful later.
That’s my GenX tech guy mind frame.
Agreed, for sure. But I had to know if there was some sort of ultimate goal he was after. Tinkering for tinker's sake is always a good thing in my book.
  • Like
Reactions: 1
I decided to take a crack at an MPG and fuel consumption estimator. According to my screen, I'm getting -18.5 MPG and I had 0.4 gallons more in my tank after my commute then when I left! :cool:

Clearly a math error somewhere.
Nooo, no math error there. Your expertise and skill are impeccably perfect, Jason.

You know what it is? It's a glitch in the matrix, man. Maybe you DO have 0.4 more gallons than when you left, eh??? Did you actually empty the tank and measure the fuel? HUH?

Don't be a doubter, Jason. That magical data logger of yours produces free gasoline!!! Ssssshhhhhh, don't tell anyone. Next thing you know, NASA will be ringing your doorbell. Them, or Exxon.

  • Haha
Reactions: 1
1 - 20 of 77 Posts