<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5701322305614387811</id><updated>2026-07-18T20:30:39.186-04:00</updated><category term="Arduino"/><category term="Buell"/><category term="C"/><category term="C++"/><category term="ECM"/><category term="Lightning"/><category term="Motorcycle"/><category term="XB9"/><category term="checksum"/><category term="code"/><category term="header"/><category term="program"/><category term="barometer"/><title type='text'>Buell ECM to Arduino</title><subtitle type='html'>This blog follows the progress of my Buell ECM to Arduino project.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-8140757285297822565</id><published>2012-07-30T22:40:00.001-04:00</published><updated>2012-07-30T22:40:17.646-04:00</updated><title type='text'></title><content type='html'>Hey everyone! Thanks for all the views. I know it has been a while since I last updated my blog. I did present my project and got a great grade on it, my instructor was impressed with how much work I got done in a semester. If I get enough interest I might post a PDF of my final report.&lt;br /&gt;
&lt;br /&gt;
I did speak with Professor George about how to calculate the varying flow from fuel injectors. Injectors don&#39;t instantly turn on and spit out the perfect amount of fuel. They have a non-linear &quot;ramp up&quot; and &quot;ramp down&quot; that happens every time the injector turns on, although from an engineering standpoint, it is safe to assume that the ramps are non-linear, and constant for every &quot;squirt&quot;. So the actual fuel emitted from the injector on a Volume (or mass) vs. Time graph would look similar to that of a bandpass filter. If you know your pulsewidth (total injector time), and you know your time it takes the injector to turn on and off, then you can calculate the volume (or mass) of fuel that was injected during a single engine cycle, and with RPM you can calculate &amp;nbsp;your rate of fuel consumption. Or if you want to get really advanced, you can calculate your temperatures and pressures (and forces, torques) internally, or you can go and calculate your power with the power equation if you know your A/F ratio and engine efficiencies and some additional data. After all, power is mass of fuel times the Lower Heating Value (QLHV) over time. Although, it costs a LOT of money and resources to get accurate efficiency numbers for engines (I mean millions of dollars). But there are some good methods for us working out of our garages to get rough estimates&lt;br /&gt;
&lt;br /&gt;
For now, the project is on hold. I went active duty as a 2nd&amp;nbsp;Lieutenant&amp;nbsp;in the Air Force in June and moved out to Los Angeles.&amp;nbsp;Going active duty is a LONG process (reporting in, security, training, finances, healthcare).&amp;nbsp;I have had a TON going on and just don&#39;t have enough time to show my bike some TLC. The movers also my mirrors on my bike, so it will be a bit longer until I can even ride my bike again. I also bought a new Volkswagen GTI, and I can&#39;t help but dump money into it :D&lt;br /&gt;
&lt;br /&gt;
I do plan on picking up where I left off, but I can&#39;t say when that will happen. But when it does, I will keep posting on here. But in the mean time, I am still around. If anyone in the Los Angeles area is interested in seeing the project (want to meet up for a cruse) just let me know! Please feel free to leave comments and ask questions, I will reply pretty quickly.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://sphotos-b.xx.fbcdn.net/hphotos-ash4/383208_10150546830860864_28926872_n.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://sphotos-b.xx.fbcdn.net/hphotos-ash4/383208_10150546830860864_28926872_n.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Me on The Tail of the Dragon (Deal&#39;s Gap, 2011)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/8140757285297822565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/07/hey-everyone-thanks-for-all-views.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/8140757285297822565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/8140757285297822565'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/07/hey-everyone-thanks-for-all-views.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-8896918300862114277</id><published>2012-04-10T15:44:00.001-04:00</published><updated>2012-04-10T15:48:17.324-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="barometer"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>I got a LOT of work done this past weekend. Since I was able to get the Arduino to communicate with the ECM in real-time I was able to take a big step toward the purpose of the project, which is to calculate power, torque, and make a shift indicator.&lt;br /&gt;
&lt;br /&gt;
You can see the results of this weekend&#39;s work here:&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/7Ki2UxUx0Co&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
I attempted to compute acceleration from the change in speed. The problem with this method is that my ECM outputs speed in increments of 1MPH, which is a horribly low resolution. at the speed that the Arduino was computing with each increase in 1MPH, the acceleration would be an instant 4.48MPH/s. Since the resolution is so low, the speed would jump around all over the place and was causing my power equation to jump all around as well.&lt;br /&gt;
&lt;br /&gt;
My solution for this is to go back to my original idea of calculating force from acceleration by using an accelerometer. I ordered one on Monday so hopefully it will get here this week and I can hook it up so I can get some good smooth power calculations.&lt;br /&gt;
&lt;br /&gt;
Right now I also have a small problem with the speed that the arduino does its calculations. Right now with all of the datalogging code it records data at about 4-5Hz, which is a bit lower than I would like. Theoretically with a baud rate of 9600, my maximum recording speed would be at about 10Hz, so I will try to optimize my code to get closer to there.&lt;br /&gt;
&lt;br /&gt;
The last little concern of mine is that the Arduino (or the program) hangs/freezes randomly. I suspect it is from the ECM not completely&amp;nbsp;receiving the request, or the Arduino not completely&amp;nbsp;receiving&amp;nbsp;the response. Hopefully it is not from the Arduino hitting its memory limit, because that would be dire to the entire project.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;On a separate note:&lt;/b&gt;&lt;br /&gt;
Last Saturday I contacted Erik Buell Racing and asked them about the fuel injectors from the XB series bikes, and I also asked them about why they didn&#39;t use the MAF method for their ECM. This is the response I got earlier today:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;&quot;Low pulse widths can be dominated by the dynamic
flow duration;&amp;nbsp;there is a dynamic and static flow rate so for short pulse
widths you’ll be heavily into the dynamic flow portion of it and may not get an
accurate calculation. We can probably dig up the spec, and it&#39;ll be something
to get you in the neighborhood but more complicated analysis is needed to truly
calculate a proper mass-fuel-injected value.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;Regarding the MAF question, we actually use alpha-N
(not speed density). MAF is better in some cases, but only given the intake air
flow can be properly pre-conditioned such that it is laminar across the sensor
and a steady even flow without reverse waves, especially needed on a
V-twin.&amp;nbsp; This works on a car because there is ample room for intake length
and volume for chambers but usually is not feasible in a motorcycle, and
definitely not on an H-D based motor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;Thank you,&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;Tech Support&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;Erik Buell Racing&quot;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Apparently there is a lot more to calculating fuel flow rate than just multiplying the pulsewidth by the flow rate and RPM. I am actually interested in seeing the dynamics behind calculating the actual flow rate. Hopefully just getting an approximation will be accurate enough to calculate fuel economy.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
It seems I was mistaken in my earlier blog post about Buell not using the MAF method for determining fuel flow. I knew that their were waves in the intake runners and manifold, but I didn&#39;t realize it made MAF sensors unusable. I also thought that the speed-density method was the same as alpha-N, but they are very different. Alpha-N is different in that it uses the TPS angle (alpha) and engine RPM (N) map to select a predetermined amount of fuel to flow into the engine.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/8896918300862114277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/04/i-got-lot-of-work-done-this-past.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/8896918300862114277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/8896918300862114277'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/04/i-got-lot-of-work-done-this-past.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/7Ki2UxUx0Co/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-3191309139945289389</id><published>2012-04-03T17:47:00.000-04:00</published><updated>2012-04-04T03:44:21.983-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="barometer"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>I was reading through the EcmSpy Buell Tuning Guide V2 pdf and found a couple really interesting things with my ECM.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1.&lt;/b&gt; The ECM has a function built into it that leans out the AF ratio under acceleration and other times for noise emissions. This creates a dead spot around the 3000RPM range. It is possible to send the ECM a command to disable this and return a little power in the mid range, and make the bike a little louder :D&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2.&lt;/b&gt;&amp;nbsp;The ECM has a function built in that uses a barometer to measure the atmospheric pressure when the key is turned on. A correction factor is then applied for the rest of the ride that compensates for the different air pressure. The XB bikes do not use this from the factory. The ECM has the capability, but the bikes do not have the pressure sensors installed. The tuning guide has instructions for how to make a working pressure sensor and how to connect it to the ECM with pictures and everything.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3icdlcyh6bcaarEMhPXcpgFNiNquCxdjgkjPQvaxeBzJ6VMbgKPFw7vfdz0hN91HyUGp-YHwuxa_nMKZg1_bmSTaHcMXClW-ZRYA1f6iO_JSETaNBQiaXLSPBia18Nfnym1JiOvl1G1jJ/s1600/Bar1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3icdlcyh6bcaarEMhPXcpgFNiNquCxdjgkjPQvaxeBzJ6VMbgKPFw7vfdz0hN91HyUGp-YHwuxa_nMKZg1_bmSTaHcMXClW-ZRYA1f6iO_JSETaNBQiaXLSPBia18Nfnym1JiOvl1G1jJ/s400/Bar1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNtYfoYJvUqEHSGpGLqdBBX72nPMz9O6ayh6PJn2Sl_5vJse_7hvF4yyqKA7QmwPbWdr4v5-91-sA2ccYZ6NYzzNBOgJjyGzsJQcAfdbcOnGKMX0aOELYA50Yule0fLM2x2A6JYmZen40F/s1600/Bar2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNtYfoYJvUqEHSGpGLqdBBX72nPMz9O6ayh6PJn2Sl_5vJse_7hvF4yyqKA7QmwPbWdr4v5-91-sA2ccYZ6NYzzNBOgJjyGzsJQcAfdbcOnGKMX0aOELYA50Yule0fLM2x2A6JYmZen40F/s400/Bar2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAyx09x5LfN6gdLu3Jbet0sPxEKUHlloxN2MnFq3S-rSo60NAfhwaEgC0v6BbXzi8IirpQb4VybSHsYmvwWoj_Uee81lbI4ec5fIJQgzpeggDOJt52LOUPs2I5yXDszemg45Arv8ApnJ18/s1600/Bar3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAyx09x5LfN6gdLu3Jbet0sPxEKUHlloxN2MnFq3S-rSo60NAfhwaEgC0v6BbXzi8IirpQb4VybSHsYmvwWoj_Uee81lbI4ec5fIJQgzpeggDOJt52LOUPs2I5yXDszemg45Arv8ApnJ18/s400/Bar3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Details can be found in the Buell Tuning Guide V2 Appendix J:&lt;br /&gt;
&lt;a href=&quot;http://www.ecmspy.com/tgv2/guide2.shtml&quot;&gt;http://www.ecmspy.com/tgv2/guide2.shtml&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
This is exciting because it shows that the designers understood the effects of pressure (maybe not humidity) on an engine. I don&#39;t know if they fully understood how it directly effects A/F ratio, but they were on the right track.&lt;br /&gt;
&lt;br /&gt;
I would like to apply both of these fixes to my bike. This will definitely help with power and with efficiency. It strikes me as odd that the ECM has this function, but wasn&#39;t utilized. I am beginning to think that they used a cookie cutter ECM and set it up for the XB bikes, which might also explain why it uses the speed-density method.</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/3191309139945289389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/04/i-was-reading-through-ecmspy-buell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/3191309139945289389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/3191309139945289389'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/04/i-was-reading-through-ecmspy-buell.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3icdlcyh6bcaarEMhPXcpgFNiNquCxdjgkjPQvaxeBzJ6VMbgKPFw7vfdz0hN91HyUGp-YHwuxa_nMKZg1_bmSTaHcMXClW-ZRYA1f6iO_JSETaNBQiaXLSPBia18Nfnym1JiOvl1G1jJ/s72-c/Bar1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-5257115374972938354</id><published>2012-04-01T19:57:00.001-04:00</published><updated>2012-04-01T20:03:14.342-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>More great news!&lt;br /&gt;
&lt;br /&gt;
I finally got the arduino to read all 107 bytes of data in real-time. No delays, no stops, no cutting off data, it works like a dream. Check out the video:&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/uztKs8W0mi4&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Now time for the real engineering. I can now start using the inputs that I have to generate the equations and code for torque, horsepower, and hopefully a shift indicator. I also need to start learning how to use the data-logging shield to save all 107 bytes of data to an excel.</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/5257115374972938354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/04/more-great-news-i-finally-got-arduino.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/5257115374972938354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/5257115374972938354'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/04/more-great-news-i-finally-got-arduino.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/uztKs8W0mi4/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-8405186413130919346</id><published>2012-03-28T13:42:00.001-04:00</published><updated>2012-03-28T13:42:36.343-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>Well I did it, I finally am able to read all 107 bytes of information that the buell sends to the arduino. If you want to see the code I am using right now check out the &lt;u&gt;Arduino Code&lt;/u&gt; page. If the link will work correctly you can also view the spreadsheet that I created to help determine what each byte means &lt;a href=&quot;https://docs.google.com/file/d/12jLE21V6S3yY9P4sBL4VFAfoHaKWQf4cJ720ShXJw4U/edit&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;HERE&lt;/a&gt;, most of it was taken from the tables on the EcmSpy website and cleaned up and matched with the data I collected.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
My next step is to figure out how to do it fast enough. My first few attempts either didn&#39;t work at all, or only read info every 20 seconds. It was brought to my attention that I also need to add functionality that verifies that all of the data was actually&amp;nbsp;received&amp;nbsp;and is good data. This means I will need to match the first 7 bytes of the header, since they are always the same, and I need to keep a running checksum as the data comes in to compare with the checksum at the end of the data. If those 8 bytes of data match then the information received is good and can be used to calculate in the next iteration.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.innovatemotorsports.com/products/images/LC_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;145&quot; src=&quot;http://www.innovatemotorsports.com/products/images/LC_1.jpg&quot; title=&quot;LC-1 Lambda Wideband O2 Sensor&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;I need to meet with my Adv. Engines Professor to talk about how the best way to get the air mass flow rate in my motorcycle. During a quick chat with him the other day he referenced using the narrowband O2 sensor, but I didn&#39;t get a chance to ask him to elaborate on it. I talked with a classmate of mine and he suggested using the&amp;nbsp;&lt;a href=&quot;http://www.innovatemotorsports.com/products/lc1.php&quot; target=&quot;_blank&quot;&gt;LC-1 Lambda Wideband O2 sensor&lt;/a&gt;&amp;nbsp;because it will feed the data I want into the Arduino while at the same time feeding a narrowband signal to the ECM. I wish it didn&#39;t cost $200 :(&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/8405186413130919346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/well-i-did-it-i-finally-am-able-to-read.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/8405186413130919346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/8405186413130919346'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/well-i-did-it-i-finally-am-able-to-read.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-6029789895589000189</id><published>2012-03-22T12:32:00.001-04:00</published><updated>2012-03-28T13:42:59.170-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>Things have been a bit slow, I have had a bit of trouble getting the arduino to read the entire 107 byte length of code being sent from the ECM, but I am getting ever closer. Right now it seems to only read 67 of the 107 bytes, which is no good for my project. It is mostly a matter of getting the arduino to read the incoming data just right. Hopefully I can get this finished up this weekend so that I can get crunching on the numbers and get the hard math done with all of the ECM info.&lt;br /&gt;
&lt;br /&gt;
If anyone is interested in seeing the arduino programming roadblocks and solutions, check out this thread I have been using.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://arduino.cc/forum/index.php/topic,96280.0.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Buell ECM to Arduino help forum&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/6029789895589000189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/things-have-been-bit-slow-i-have-had.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/6029789895589000189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/6029789895589000189'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/things-have-been-bit-slow-i-have-had.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-6338241975428790781</id><published>2012-03-14T16:06:00.000-04:00</published><updated>2012-04-10T15:53:21.158-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>I was talking about engine design and ECM controls with my roommate yesterday and came to some interesting conclusions about my Lightning&#39;s ECM design.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Engine and ECM basic concepts&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
An engine, at it&#39;s core, is an air pump. The way you control the engine is by feeding it more or less air. An engine is designed to work with a certain fuel, which burns optimally at a very specific air-to-fuel ratio (A/F). This A/F for generic unleaded fuel is approximately 14.7 (14.7 parts air and 1 part fuel). Unfortunately air changes with pressure, temperature, humidity etc. which means that your engine on one day will need a different A/F than your engine needs on a different day or different location.&lt;br /&gt;
&lt;br /&gt;
Luckily we have sensors that detect the humidity and pressure and temperature we can get the density of air and calculate our needed A/F ratio using a little bit of chemistry and balancing stoichiometric equations. This is all fed into and performed automatically in the engine control module (ECM).&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://i224.photobucket.com/albums/dd1/Mikey394/Buell%201125R/20.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;201&quot; src=&quot;http://i224.photobucket.com/albums/dd1/Mikey394/Buell%201125R/20.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Image of Buell 1125 Rotax engine throttle body&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
So, what happens when you push down on the&amp;nbsp;accelerator&amp;nbsp;or twist the throttle? Generally the valve (the gold circles in the image above) opens to allow the engine to suck in more air. So then how much fuel do I need? Well, we can measure the amount of air being sucked in with a mass air flow sensor (MAF). The ECM already knows the A/F ratio it needs from its sensors and math, and using that it calculates how much fuel to squirt into the engine for a good burn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not &lt;b&gt;too&lt;/b&gt; complicated,&amp;nbsp;&lt;i&gt;right&lt;/i&gt;?&lt;br /&gt;
&lt;br /&gt;
Unfortunately, that is not how MY engine (and all XB series Buells) works because it does not use a MAF. When I twist the throttle, the throttle body opens and the ECM looks at the throttle position sensor (TPS) and the current RPM of the engine. The ECM doesn&#39;t directly know how much air is going into the engine because there is no MAF sensor. It then looks at a map (see below table) and decides how much fuel is needed.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirb9kfHqdoJRmmw8JWbGdWyF2ZofCquHAxgDx8U4hSGOv8RkI0ZvVkw-nSq7yFA6ElCaRgLMdsnW8qV49bRcPG1ud8XNaXdIAlUWoe2NLxCsvVUWE5MwZlUmMG5mpGJmsvO7xC-golx_wN/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;289&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirb9kfHqdoJRmmw8JWbGdWyF2ZofCquHAxgDx8U4hSGOv8RkI0ZvVkw-nSq7yFA6ElCaRgLMdsnW8qV49bRcPG1ud8XNaXdIAlUWoe2NLxCsvVUWE5MwZlUmMG5mpGJmsvO7xC-golx_wN/s640/Untitled.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Front cylinder Fuel Map for my XB9&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;The ECM approximates the amount of air using the temperature, pressure of the air, &lt;/span&gt;volumetric efficiency of the engine (% of air it can jam into the cylinder), and a few other factors and calculates &lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;modifiers for the amount of fuel to be injected into the cylinder. After the burn, there is an O2 sensor that detects the actual A/F ratio from the exhaust. This is then used to adjust the fuel, again, to bring the combustion closer to the desired A/F ratio.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;Now &lt;i&gt;that&lt;/i&gt; sounds complicated...&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;This method is often called the &lt;i&gt;&lt;strike&gt;speed-density&lt;/strike&gt;&amp;nbsp;alpha-N&amp;nbsp;&lt;/i&gt;&lt;/span&gt;method.&amp;nbsp;&lt;span style=&quot;color: red; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;(Note: I was recently informed that my initial assumptions on this topic were incorrect. Please see my post on 4/10/2012 for a reply from EBR on why they didn&#39;t use the MAF method).&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp;This makes it necessary (and very difficult) to tune the engine when major modifications are made, because the maps and modifiers must be changed beyond the bounds that the ECM is capable of compensating for..&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;i&gt;For example:&lt;/i&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;Many people install free(er) flowing exhausts on my bike. This allows more air to flow through the engine. This causes the engine to run lean, which runs hotter, burns worse, and increases&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;tendency for knock. To&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;accommodate&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp;for the increase of air, the maps must be adjusted to give more fuel....how much fuel? We don&#39;t know unless we do data logging without the ECM&#39;s corrections. and see what the O2 sensor says at different RPM and different TPS. Then we make some adjustments and see how much the engine makes adjustments. The less adjustments the better the tune job. So, it becomes a big circle or recording data, making adjustments, and then checking the adjustments.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.aa1car.com/library/maf_sensor_ford.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;226&quot; src=&quot;http://www.aa1car.com/library/maf_sensor_ford.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;None of this would be necessary if the ECM used the &lt;i&gt;mass air flow&lt;/i&gt; method and directly knew the exact amount of air flowing into the engine. Free flowing exhaust? no problem, MAF says this much air going in, ECM calculates how much fuel will make that air the correct A/F ratio. Only small adjustments would be needed that are particular to the engine design and are built into the ECM.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;strike&gt;I do not know why Buell (and many other manufacturers) choose to use the speed-density method. MAF sensors generally cost around $80 and are small and can easily be placed in the intake manifold after (or sometimes before) the throttle body, and save so much work.&lt;/strike&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Please see my blog post on 10 April for EBR&#39;s reply on why they used Alpha-N method.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;b&gt;How does this relate to my project?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;One of the goals for my project is to calculate instant torque and power. &lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;I need to know mass air flow in order to calculate torque and power. There are two ways that I know of right now that I can get mass air flow. I can measure it with a MAF sensor (not currently installed), or I can calculate the air ratio using the A/F reading from a wide-band O2 sensor (also not currently installed). A WB O2 sensor kit is about $200 and would be easy to install. A MAF sensor is $80 and difficult to install. I am very budget limited and it looks like a MAF is the way to go if I can install it properly in the intake manifold in my engine, but I don&#39;t feel confident I can do it right.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;I am still researching my options to see if there is a cheaper, non-intrusive way I can get mass air flow.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/6338241975428790781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/i-was-talking-about-engine-design-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/6338241975428790781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/6338241975428790781'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/i-was-talking-about-engine-design-and.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://i224.photobucket.com/albums/dd1/Mikey394/Buell%201125R/th_20.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-54055769213178218</id><published>2012-03-11T23:52:00.001-04:00</published><updated>2012-03-28T13:44:15.320-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>I am back! Great spring break at North Myrtle Beach.&lt;br /&gt;
&lt;br /&gt;
So I messed with my bike a little bit today. I used the correct checksum 0xFD and got better results, but not quite what I needed. I was supposed to get a 107 byte response from the ECM, but it only sent back a 64 byte response with only the first 59 or so real-time values. On top of that, all of them were doubled what they should be. For example, battery voltage was reading 25 Volts, and Engine temperature was reading 120 degrees F with the engine off. It should have said 12.5 Volts and 60 degrees F.&lt;br /&gt;
&lt;br /&gt;
At least I was able to read the data that I did get in real-time.&lt;br /&gt;
&lt;br /&gt;
Hopefully the Buell forum guys can help me figure this one out. In the mean time I am going to start building an algorithm in C/C++ that will store each value read from the ECM to the correct variable name and correct unit conversions. Then I will be able to start using the values to do the hard calculations.</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/54055769213178218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/i-am-back-great-spring-break-at-north.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/54055769213178218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/54055769213178218'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/i-am-back-great-spring-break-at-north.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-2697009727394975164</id><published>2012-03-05T01:28:00.002-05:00</published><updated>2012-03-28T13:44:31.907-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>Good news. The cause of the problem is from an incorrect checksum that I am using when I send a request to the ECM. The correct checksum I am supposed to use is 0xFD. &amp;nbsp;Hopefully this works.&lt;br /&gt;
&lt;br /&gt;
Msamuels0 over at BadWeB has been a great help so far and had a great explanation of how a checksum works. Here is a copypasta of what he said:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;A checksum, by definition, is going to change if any of the data in the message changes...&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;That table on the ECMSpy website states that the checksum is an XOR of all the preceding data, but doesn&#39;t state that it only includes everything after the first byte (0x01).&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;So, to verify the checksum the following message from the ECMSpy table:&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;0x01&lt;br /&gt; 0x00&lt;br /&gt; 0x42&lt;br /&gt; 0x02&lt;br /&gt; 0xFF&lt;br /&gt; 0x02&lt;br /&gt; 0x56&lt;br /&gt; 0x03&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Take what&#39;s after the 0x01, leaving:&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;0x00&lt;br /&gt; 0x42&lt;br /&gt; 0x02&lt;br /&gt; 0xFF&lt;br /&gt; 0x02&lt;br /&gt; 0x56&lt;br /&gt; 0x03&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;If we do the XOR operation on the first two bytes, then keep XORing the result with the next byte:&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;1. 0x00 ^ 0x42 = 0x42&lt;br /&gt; 2. 0x42 ^ 0x02 = 0x40&lt;br /&gt; 3. 0x40 ^ 0xFF = 0xBF&lt;br /&gt; 4. 0xBF ^ 0x02 = 0xBD&lt;br /&gt; 5. 0xBD ^ 0x56 = 0xEB&lt;br /&gt; 6. 0xEB ^ 0x03 = 0xE8&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;So, 0xE8 is the correct checksum for that specific message.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;To calculate the checksum for the message which requests runtime data:&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;0x01&lt;br /&gt; 0x00&lt;br /&gt; 0x42&lt;br /&gt; 0x02&lt;br /&gt; 0xFF&lt;br /&gt; 0x02&lt;br /&gt; 0x43&lt;br /&gt; 0x03&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Drop the first byte, leaving:&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;0x00&lt;br /&gt; 0x42&lt;br /&gt; 0x02&lt;br /&gt; 0xFF&lt;br /&gt; 0x02&lt;br /&gt; 0x43&lt;br /&gt; 0x03&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Do the byte-by-byte XORing:&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;1. 0x00 ^ 0x42 = 0x42&lt;br /&gt; 2. 0x42 ^ 0x02 = 0x40&lt;br /&gt; 3. 0x40 ^ 0xFF = 0xBF&lt;br /&gt; 4. 0xBF ^ 0x02 = 0xBD&lt;br /&gt; 5. 0xBD ^ 0x43 = 0xFE&lt;br /&gt; 6. 0xFE ^ 0x03 = 0xFD&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;So, the checksum for this specific message is 0xFD.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The point of a checksum is to verify the integrity of the previously received data, so once the ECM receives the complete message, it calculates the checksum byte-by-byte, and if it doesn&#39;t match the checksum that was appended to the end of the data, rejects the whole thing as bad/corrupt, and apparently sends an error response.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Hope that helps explain it. &lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
I am going on Spring Break this week and wont be working on my project during then. I will post the results of the correction next Saturday/Sunday!</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/2697009727394975164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/good-news.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/2697009727394975164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/2697009727394975164'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/good-news.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-2882880441900096063</id><published>2012-03-04T14:33:00.001-05:00</published><updated>2012-03-28T13:44:52.745-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="checksum"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="header"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="program"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;After getting some help from the guys at BadWeB and searching through the Arduino help and forums, I was able to get my Arduino to send a series of Hexadecimal data shown in the table below to the ECM.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; class=&quot;kleiner&quot; rules=&quot;all&quot; style=&quot;background-color: white; color: black; font-size: 0.8em; margin-bottom: 5px; margin-top: 5px; width: 500px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Byte #&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Meaning&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Values (typical)&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Remarks&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;1&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;SOH&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0x01&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Start of Header&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;2&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Emittend&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0x00&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;From PC&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;3&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Recipient&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0x42&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;To ECM&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;4&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Data Size&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0x02&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;2 Bytes&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;5&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;EOH&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0xFF&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;End of Header&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;6&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;SOT&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0x02&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Start of Text&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;7&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Data 1&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;ul style=&quot;margin-bottom: 0px; margin-left: 15px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;font-size: 1em; margin-bottom: 2px; margin-left: 0px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0x56&amp;nbsp;=&amp;nbsp;Get Version&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;font-size: 1em; margin-bottom: 2px; margin-left: 0px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0x43&amp;nbsp;=&amp;nbsp;Get Runtime Data&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Command Code&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;8&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Data 2 (EOT)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0x03&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;End of Text&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;9&lt;/span&gt;&lt;/th&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Checksum&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;0xE8&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;XORed Checksum&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://img827.imageshack.us/img827/6069/img0096da.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://img827.imageshack.us/img827/6069/img0096da.jpg&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Top row: data request sent to ECM&lt;br /&gt;Bottom row: response from the ECM&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;SUCCESS!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Or so I thought...I got the ECM to respond last night and I thought all was good and went to bed. I did some more research this morning and learned how to put the data I got back from the ECM into a 107 byte array saved in the Arduino memory. Everything byte I tried to access was nothing but FFFFFFFF&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;(which translating from Hex pretty much means FFFFFFUUUUUUUUU!). But the data still had a header which looked like normal. After deciphering the good data I realized that it was sending back a 10 byte response indicating an error in it, and the rest of the FFFFFFFF were just blank cells in the array I created.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This is the Hex code I get from the ECM:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;01 //start of header&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;42 //to PC&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;00 //from ECM&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;03 //size of data&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;FF //end of header&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;02 //start of text&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;15 //ERROR (because it isn&#39;t 06 which would mean success)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;41 //the rest of the error?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;03 //end of text&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;EB //checksum&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;So my error code is 1541 in hex. I don&#39;t know what it means and it isn&#39;t mentioned on the ECMSpy website. I posted on the BadWeB forum and also emailed a few people. Hopefully they can help because my project is on hold until I can get the correct 107 byte series from the ECM.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/2882880441900096063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/after-getting-some-help-from-guys-at.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/2882880441900096063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/2882880441900096063'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/after-getting-some-help-from-guys-at.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5701322305614387811.post-3145951576023728238</id><published>2012-03-03T23:57:00.003-05:00</published><updated>2012-03-04T00:52:26.022-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Buell"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="ECM"/><category scheme="http://www.blogger.com/atom/ns#" term="Lightning"/><category scheme="http://www.blogger.com/atom/ns#" term="Motorcycle"/><category scheme="http://www.blogger.com/atom/ns#" term="XB9"/><title type='text'></title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;This blog will follow the progress of my Buell ECM to Arduino project.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; line-height: 1.25em; max-width: 64em;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg22jfjCn3noYZmANZlMAO2Xt7yPyGwjr49mC7icatCf577tD_Zb_9Or9fLYObnkdQLiPcUEAL6ZyvtAqNY8Mj5JSDIQdGdZ7fCVF8EUVnH4OH5kWlTRrif_v_2oeBrr54qv2jBPgJt1iP9/s1600/PICT4797.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg22jfjCn3noYZmANZlMAO2Xt7yPyGwjr49mC7icatCf577tD_Zb_9Or9fLYObnkdQLiPcUEAL6ZyvtAqNY8Mj5JSDIQdGdZ7fCVF8EUVnH4OH5kWlTRrif_v_2oeBrr54qv2jBPgJt1iP9/s320/PICT4797.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This project is for my Advanced Engines Graduate class. The goal of the project is to use an Arduino to interface with the motorcycle&#39;s ECM to calculate and display instantaneous Horsepower, Torque, and a shift indicator, and data-log.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; max-width: 64em;&quot;&gt;
&lt;div style=&quot;line-height: 1.25em;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This will require specific run-time information from the ECM as well as pressure sensors, temperature sensors, and an accelerometer to be connected to the Arduino. Data will be recorded on an SD card and plotted in Excel.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;So far I purchased and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;received&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;&amp;nbsp;my Arduino, 16x2 character LCD screen, and Data-Logger from Adafruit. This is my first time ever using an Arduino, or programming in C/C++. However, it is not my first time learning a new programming language. I have taught myself MatLab, HTML, and Expression 2 (which is from a game called Garry&#39;s Mod), and LabVIEW for college/gaming.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;The Data-Logger came unassembled, which I was not expecting, so I picked up my own soldering iron and built the board, which actually was a lot of fun.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 1.25em;&quot;&gt;I spent about 6-7 hours Wednesday teaching myself (with the help of many open-source tutorials for the Arduino) how to operate the microcontroller and got it to display and scroll through text on the LCD screen.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/425778_10150727963960864_610780863_11520824_1718653027_n.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/425778_10150727963960864_610780863_11520824_1718653027_n.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;Next up: Figuring out how to communicate with the ECM...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arduinobuell.blogspot.com/feeds/3145951576023728238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/this-blog-will-follow-progress-of-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/3145951576023728238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5701322305614387811/posts/default/3145951576023728238'/><link rel='alternate' type='text/html' href='http://arduinobuell.blogspot.com/2012/03/this-blog-will-follow-progress-of-my.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04424096000904392074</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg22jfjCn3noYZmANZlMAO2Xt7yPyGwjr49mC7icatCf577tD_Zb_9Or9fLYObnkdQLiPcUEAL6ZyvtAqNY8Mj5JSDIQdGdZ7fCVF8EUVnH4OH5kWlTRrif_v_2oeBrr54qv2jBPgJt1iP9/s72-c/PICT4797.JPG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>