Kawasaki VN750 Forum banner
1 - 20 of 51 Posts

·
Registered
Joined
·
905 Posts
Discussion Starter · #1 ·
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.
 
  • Like
Reactions: mmart and Spockster

·
Super Moderator
Joined
·
843 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?
 

·
Registered
Joined
·
905 Posts
Discussion Starter · #3 ·
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.
 

·
Super Moderator
Joined
·
843 Posts
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!
 

·
Registered
Joined
·
1,719 Posts
Always interested in the gadgetry!

Might be worth noting that the accelerometer won't really tell you the lean angle, since from your frame of reference as you move through a turn you & the bike will perceive 'down' as skewed towards the outside of the curve. You'd need to mount a gyro & encoder to the frame to get a proper lean angle. Might be able to fudge it using overall g-forces as long as you assume you're running on flat ground? Will be curious where that calculation lands.
 

·
Registered
Joined
·
905 Posts
Discussion Starter · #7 ·
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.

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!
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?

Always interested in the gadgetry!

Might be worth noting that the accelerometer won't really tell you the lean angle, since from your frame of reference as you move through a turn you & the bike will perceive 'down' as skewed towards the outside of the curve. You'd need to mount a gyro & encoder to the frame to get a proper lean angle. Might be able to fudge it using overall g-forces as long as you assume you're running on flat ground? Will be curious where that calculation lands.
Many accelerometers (including the ones in this device) also include gyros. So I'd be using the gyros for lean angle.

The accelerometer should allow a horsepower number, of sorts. The ScanGauge has a code I could input that would let it read horsepower. Maybe not a very precise reading but you could see if the number changed after tuning.
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.
 

·
Registered
Joined
·
10,800 Posts
Ping is spark at the wrong time, and detonation is combustion occuring by heat and pressure, without spark. Knock is the sound they both make. Detonation is why diesels make so much racket, they fire by heat and compression, no spark at all.

When we did horsepower runs with the ScanGauge we just did a drag race run as far and fast as we dared. Then tried to duplicate the time and distance for each run. 270 hp from a chipped inline six.

Buggers at the inspection station swiped the ScanGauge from my glove box. Had it in my pocket and decided I didn't need to worry about it.
 

·
Super Moderator
Joined
·
843 Posts
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.
 

·
Registered
Joined
·
905 Posts
Discussion Starter · #10 ·
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.
 

·
Super Moderator
Joined
·
843 Posts
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.
 

·
Registered
Joined
·
905 Posts
Discussion Starter · #12 ·
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.
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.
 

·
Super Moderator
Joined
·
843 Posts
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.
 

·
Registered
Joined
·
1,719 Posts
Many accelerometers (including the ones in this device) also include gyros. So I'd be using the gyros for lean angle.
Nice! Looks like I've fallen behind on the technical curve!
 

·
Super Moderator
Joined
·
843 Posts
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!
 

·
Premium Member
Joined
·
1,744 Posts
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.
 
1 - 20 of 51 Posts
Top