Oct 06

Choosing a water temperature sensor for MicroSquirt




Another of the challenges associated with fuel injecting an old motorbike is that none of the existing sensors were ever intended for connection to a modern engine management system. In particular, the coolant temperature sensor in the radiator has a single signal wire coming out of it and the ground return is through the chassis of the bike.

The problem with having the sensor grounded to the chassis is that it will have lots of induced noise from other high-current parts such as the fuel injectors, ignition coils, starter motor, etc due to voltage drop in the ground path. I think this diagram borrowed from the MicroSquirt hardware manual, page 13 is a good illustration of this problem:

MicroSquirt Sensor Grounding

MicroSquirt Sensor Grounding

The solution is to install a “two-wire” sensor with a signal wire and a ground wire that can be connected directly back to the ECU and avoid effectively all of that voltage drop and noise.

I settled on a GM LS1/2 coolant temperature sensor since it (almost) fits nicely in the existing location and the MicroSquirt engine management system already knows the calibration values for this sensor so it’s pretty much plug and play.

The small problem with this sensor is that it has a larger thread than the original sensor so here is what i did about it:

I set up the new GM sensor in my metal lathe and turned down the thread to the major diameter of the old single wire sensor and then cut the correct thread onto the GM sensor. It was a metric M10x1.25 thread, and now it screws nicely into the radiator and talks to the MicroSquirt once I selected the correct sensor in the configuration.

Here are a few pics or the work in progress:

CLT Sensor Before

CLT Sensor Before

CLT Sensor in lathe

CLT Sensor in lathe

CLT Sensor After

CLT Sensor After

CLT Sensor Installed

CLT Sensor Installed

Oh and while I was working on the lathe, I realised that one of the radiator mount bushings was missing so i quickly made another one, gotta say a metal lathe has quickly become the most useful machine in my workshop…

Radiator Bushing

Radiator Bushing

Oct 05

Calibrating a MAP sensor with MicroSquirt




I was faced with the challenge of installing a Manifold Absolute Pressure (MAP) sensor on my Kawasaki GPZ900R fuel injection project. This sensor, together with an intake air temperature sensor is used in calculating the density of air entering the engine, and therefore how much fuel to inject using the Speed-Density algorithm.

The challenge is that the Yamaha FJR1300 throttle bodies that I have chosen for the project come with a neat little MAP sensor, mounted in a perfect location but I couldn’t find any specifications or calibration data for the sensor so I have no way to tell the MicroSquirt engine management system how to use the sensor.

Yamaha FJR1300 MAP Sensor 5jw-82380-00

Yamaha FJR1300 MAP Sensor 5jw-82380-00

The first solution would be to obtain a sensor with known calibration values such as the GM 1-bar MAP sensor from General Motors and just use that, so this is what I did.. the problem is that when it arrived, it was much larger than i was expecting and i couldn’t find a neat place to mount the sensor. After a bit of digging around on the internet, I couldn’t find any smaller sensor that met my size requirements.. back to square one.

GM MAP Sensor

GM MAP Sensor

But then it occurred to me that I could possibly use the GM sensor as a reference to calibrate the Yamaha sensor. Here is the process that I used to obtain the calibration values that the MicroSquirt expects in order to use the sensor:

Summary:

  1. Join the two sensors together with a T-piece so that they are at the same pressure
  2. Measure the voltage of both sensors and record it
  3. Use a vacuum pump (powered or hand-pump) to reduce pressure to both sensors and once again measure and record the voltages
  4. Use a linear equation to extrapolate the calibration values that the MicroSquirt needs
  5. Set the calibration in the MicroSquirt and confirm that the Yamaha sensor reads the same as the GM sensor

 

Read on if you want the details of how this is all done:

Firstly, I connected the GM MAP sensor to the MicroSquirt and selected that sensors configuration in TunerStudioMS and verified that the sensor is reporting expected pressure of about 94kPa. Next I joined the two sensors together with a T-piece as pictured below, the blue line runs to my vacuum pump.

MAP Sensors connected with T-piece

MAP Sensors connected with T-piece

Without the vacuum pump switched on, I measured the voltage on the new sensor with a multi meter and recorded the pressure that the MicroSquirt is reporting for the GM sensor. This happened to be about 3.708V @ 94.6kPa (atmospheric pressure at the time), now we have a single known voltage on the new sensor for a known pressure.

Vacuum Pump

Vacuum Pump

Next, I switched on the vacuum pump and reduced the pressure down to as close to zero kPa as i could get it. Theoretically this could be done with any two points of reference but it will yield a more accurate calibration with a larger gap between values. Now I measured the voltage of the Yamaha sensor and recorded it with the pressure that the GM sensor was reporting, this was about 0.413V @ 10.4kPa. I did this for a couple of different points so that I could plot them on a graph to ensure that the sensor had a linear output.

MAP Sensor calibration graph

MAP Sensor calibration graph

Now I have two points of reference and can use a linear equation in slope intercept form to extrapolate the pressure values for 0V and 5V that we need for the MicroSquirt configuration. The next part involves some simple secondary school math, don’t get scared off it’s quite easy! you can either do in a spreadsheet or on paper but it’s nice to plot the points on a graph just for an extra sanity check. The two points that I measured and that are needed for the following equations are:

(x1,y1) = (0.413V, 10.4kPa)

(x2,y2) = (3.708V, 94.6kPa)

Line Equations

Line Equations

 

The linear equation I used is the “slope-intercept form”:

y = m x + b

This is called the slope-intercept form because m is the slope of the line and b is the y-intercept. In my case, the y axis is pressure in kPa and the x axis is voltage from the sensor. Basically I want to know the pressure (y) for 0V (x) and I also want to know it for 5V since this is what the MicroSquirt expects. But first I need to calculate the slope of the line which is simply “the difference in the y values divided by the difference in the x values” or more commonly known as the “rise over run”

m = rise / run

m = (y2 – y1) / (x2 – x1)

m = (94.6 – 10.4) / (3.708 – 0.413)

m = 25.5539

 

The y-intercept (b), can be determined by simply re-arranging the equation to solve for b for any pair of x and y (choose either of the points, it doesn’t matter). In this case, i’m using the point (x2,y2) = (3.708V, 94.6kPa):

y = m x + b

b = y – m x

b = 94.6 – 25.5539 * 3.708

b = -0.15375

And now that I have the slope and the y-intercept, I can solve for the two values that the MicroSquirt wants (pressure at 0V and pressure at 5V):

y = m x + b

y (5V) = 25.5539 * 5 + (-0.15375)

y (5V) = 127.616kPa

 

y (0V) = 25.5539 * 0 + (-0.15375)

y (0V) = -0.15375kPa

So now I know that when the sensor reads 5V, the pressure is 127.616kPa and when it is at 0V, the pressure is -0.15375kPa but theoretically you can’t have a pressure value less than 0kPa since a complete vacuum is zero pascals thus the error in this calibration can be assumed to be only 0.12% which is excellent! This is well within the tolerances needed for engine fuel control and we can safely call the 0V reading 0kPa in the MicroSquirt configuration. Now I just need to plug these values into TunerStudioMS under “Calibrate MAP/Baro” and confirm that it works.

TunerStudioMS MAP Calibration

TunerStudioMS MAP Calibration

For testing, I configured the Yamaha sensor as the MAP sensor and I setup the GM sensor as a secondary Barometric correction sensor so that I could see them both on the gauges. The GM sensor and the Yamaha sensor output the same value over the entire range that I tested so the calibration was successful! I know this post is a bit detailed but if you are stuck on calibrating a MAP sensor you should be able to follow this step by step, it’s pretty straightforward once you understand the method. Leave me a comment if you have any questions!

Nov 06

ImaxRC X350 Overcharging FIXED!



The Fix:

  • Use a high quality power supply with very low ripple/noise.
  • clean the lacquer off all terminals with a wire brush or fibreglass pen
  • replace the crappy deans connector with a genuine deans connector
  • replace the internal 10A discharge fuse if you have exceeded the rated 40W discharge and have the “Connect Break” issue

The Backstory:

After hunting around for hours on the internet to try and find the perfect LiPo charger, I purchased what looked like a winner from HobbyKing. The ImaxRC X350 Charger:

ImaxRC X350 Charger

It has a whopping 350W charge rating, 40W discharge, touch screen, multiple battery chemistries, etc.

The 2 days that it took to arrive were painful, I was way too excited about this charger… So when it turned up, naturally I fired it up immediately and started charging a LiPo! I watched the nice pretty graph climb to full charge at a rapid pace BUT… it didn’t stop at the typical 4.2V/cell that I was expecting, actually it climbed closer to 4.34V per cell which is a recipe for fire/explosion with Lithium Polymer batteries. The charge cycle terminated at around 4.34V/cell with an “Out Voltage Too High” error.

x350 voltage error

The next thing I tried was discharging the battery to bring it back within a safe voltage range but the discharge cycle only lasted a few seconds and then an internal fuse blew and the display reported “Connection Break” (read on for the fix).

X350 connect break error

I tried several other cells with the same results, different cell counts, capacities, etc and every now and then it would terminate at the correct 4.2V/cell but not often. After trawling the darkest corners of the internet and trying to contact the manufacturer and HobbyKing plus a few other distributors, I was getting nowhere. HobbyKing said that it is a known issue with that charger yet they are still selling them, not even a warning on the website. There were a few suggested fixes by other users on youtube and the hobbyking forums. Theuns Oosthuizen AKA “TheUnsie” in particular was very helpful in determining the cause of the “Connect Break” error but the problem with my charger was still not resolved.

Please see TheUnsie’s youtube videos to repair the “Connect Break” error which consists of replacing an internal fuse:


The other day I decided to take the charger with me to where I would be flying and charged up a few cells from my car battery and quickly realised that the batteries were charging to the correct voltage and not a millivolt higher! consistently, every pack. weird…

So that my car battery didn’t go flat, I started the engine for a while but realised that the batteries were now overcharging again… I thought this had to be something to do with noise from the alternator on the car while it was running.

To test this theory I plugged the charger into my very nice laboratory power supply which has a very clean output and it charged fine compared to my usual modified server power supply. I decided to measure the noise from each power supply and discovered that the server power supply was around 580mV peak to peak whereas the lab supply was around 8mV peak to peak.

The comparison looks something like this:
X350 Noise

Problem solved!

Now that this charger is working as it should, it is exactly the awesome product I was looking for!

Next I just have to find a high-current, low-noise power supply.. Any suggestions? Let me know in the comments below.

Dec 22

How to make a fibreglass subwoofer box

Aug 20

Water Cooled Raspberry Pi

Water-cooled raspberry pi?!?!

Some of you might think “awesome!”, others may think “why bother?” I did it for several reasons:

  • Because I can!
  • It looks cool on my desk
  • I want to overclock it so that I have the fastest raspberry pi on the internet! (also falls into “Because I can!”
water cooled raspberry pi

water cooled raspberry pi

water cooled raspberry pi

water cooled raspberry pi

Fittings

Fittings

CNC Pi Logo

CNC Pi Logo

Leak testing

Leak testing

Micropump

Micropump

Jan 10

How to make Vanilla Essence

The smell of vanilla essence is one of the my favourites… It’s an essential in the kitchen and if you bake often then you probably go through loads of vanilla extract, Vanilla ice-cream, vanilla cake… I’m getting hungry just thinking about it!

Vanilla Essence

Vanilla Essence

Here i will show you how to make your own exceptionally nice vanilla extract for much less than store-bought vanilla.

Vanilla essence is made by macerating vanilla beans in a high-proof alcohol. I’d suggest using a nice bourbon or plain vodka (absolut works well). If you don’t want to use a lot of your precious booze on the vanilla essence, you could grab a few of those small sample bottles like you get in hotels or on a plane. Grab a few different spirits to experiment with.

Split vanilla beans lengthwise stopping about an inch from the end and pop them in the alcohol. For a stronger essence, i find it useful to scrape out the seeds from the vanilla pod and drop them in the alcohol too. The general rule of thumb is 3 vanilla beans to a cup of spirit.

Split Vanilla Beans

Split Vanilla Beans – Courtesy At Home On Paradise Cove

Now you have to wait, about 3 weeks minimum. Give the bottle/jar a shake every few days and then open it for a sniff to see how the extract is progressing. I find after the first day, the extract smells very sharp like high-proof spirit and raw vanilla but as time progresses, the subtle complexity of the whiskey blends with the sweet, warm aroma of the vanilla to make something purely delightful. As with most alcohol macerations, it just gets better with age…

If you choose to leave the vanilla beans in the essence (highly recommended!) you can simply top it up with more alcohol as you use it up. Don’t forget, there are many different types of vanilla beans, try experimenting with different varieties to see what you can come up with!

Dec 12

Cinnamon & Honey Soap

I’ve been eagerly creating batch after batch of home-made soap, trying new things and experimenting with different methods! I thought the result of this batch was worth a blog!

I chose to try something different this time and added Honey to the batch to take hold of all the wonderful natural benefits that honey provides, it is GREAT for your skin.

I won’t bother re-iterating the process because you can find that in my Lemon Myrtle Soap Recipe but here is my recipe for this batch:

Ingredients:

  • 400g Solidified Oil (Beef Tallow)
  • 200g Refined Coconut Oil
  • 100g Rice Bran Oil
  • 200g Olive Oil
  • 270g water
  • 126.8g Sodium Hydroxide (caustic soda/lye)
  • 1/2 cup Oatmeal
  • 2tbsp Honey
  • 15g Cinnamon Essential Oil

Differences from my normal Method:

  • I heard someone mention that if you preheat your oven to about 70 Degrees Celcius and then turn it off and place the soap in and let it cool down slowly that it will make the soap enter the “gel phase” quicker and therefore set faster, the side effect is that the soap turns a dark brown colour… Being the experimental type of person i thought i might like to use this side effect to my advantage to colour the soap. I gave it a go and checked on the soap every 10 minutes until it was a nice “cinnamon” colour, it worked perfectly!
  • I added honey to the soap at light trace because both honey and cinnamon are very sweet, i thought they would go well together, and they really do! The batch smells like a fresh baked cinnamon cake!
  • This point isn’t really a “method” change, it’s more of a “post-processing” change. I have been playing with different ideas on how to make the soap look a little more professional, using different molds, etc but the thing that made a difference for this batch was that i used a vegetable peeler to chamfer all edges of the soap, now it looks nice and feels good to hold!

Nov 15

Excel Series Rally Car

This will be one big introductory post about my new rally car! I hope to keep a progress log about the car here on my blog.

So after hours of trudging through forums and asking everyone i could find about rally cars, i decided to buy a (mostly) ready-to-race rally car, i settled on a Hyundai Excel.

The excel won my affection for many reasons but mostly because it is a cheap(er) way to get into rallying. They are really reliable, readily available and parts (or even whole cars) are a dime-a-dozen!

The excel makes really good power for a 4cylinder engine and is quite competitive on the track. This particular car has had the standard single cam engine replaced with a twin cam engine for a bit more power.

The list of mods goes on and on for this car but the main features are:

  • MECHANICAL:
    • DOHC engine
    • New Exedy heavy duty clutch
    • Project U front brakes
    • Braided brake lines
    • Lightweight sump guard
    • Reinforced exhaust
  • SUSPENSION:
    • Drummond Motor Sports (DMS) adjustable rally coilover suspension
    • Pillow ball rear suspension mounds
    • Front strut brace
    • Seam welded
  • EXTERIOR:
    • Light pod with 4 x Cibie Oscars with HID conversion kits
    • Excel series mag wheels painted toxic green to match the car
    • Toxic green/black paint job
  • INTERIOR:
    • Lightweight dry cell battery mounted behind seats
    • Extensive weight reduction
    • Zero offset satin black autotechnica steering wheel
    • Very comprehensive cold rolled double walled roll cage painted toxic green to match the car
    • Sparco Pro 2000 seats
    • SAAS 5-point harnesses
    • Brantz Laser 3 trip computer (soon to have a foot switch)
    • Stillo WRC noise cancelling intercom
    • Custom Taco dash with white gauges
    • 2 x 1KG fire extinguishers

The car was weighed at Rally Vic last year with mud and ½ fuel at 972kg, (minimum weight 960kg for Excel series)

I picked up the car for $8500 from Victoria, looking at the work that has been done to the car, i saved a hell of a lot of money getting one that was already built!

Nov 15

MSP430 on Fedora 16 Linux – eZ430-F2013

A few months ago, i came across a deal from Texas Instruments that let me get a free eZ430-F2013 development stick. Since i couldn’t resist the temptation of free gadgets, i immediately ordered one and then waited for it to turn up.. a month later…

If you haven’t seen the neat little proto kit, it comes as a USB dongle, not much bigger than a flash drive which consists of a USB debugger (the big bit) and a removable board that holds the F2013 micro controller, each pin broken out to a standard pitch header.

eZ430-F2013

eZ430-F2013

So when this thing finally arrived, (I’d forgotten all about it) I had a quick look and put it aside since i didn’t feel like installing yet another proprietary software package to be able to work with the device.

Having re-discovered the gadget the other day in a box from moving house, i decided to give it another go. Much to my satisfaction MSP-GCC came to the rescue!

eZ430-F2013

eZ430-F2013

Here are the steps i followed to get this thing working under Fedora 16 without the IAR embedded workbench stuff

    • Kernel Support – Under fedora 16, the device should show up as a USB serial device like /dev/ttyUSBx. Double check that the kernel module ti_usb_3410_5052 is loaded with lsmod. In the past, there were a few source changes that needed to be made for this module to recognise the eZ430-F2013 but Fedora 16 works out of the box.
    • MSP-GCC and GDB– Next, we have to install MSP-GCC (the compiler) and gdbproxy (the debugging software) mspdebug is a modern replacement for gdbproxy, with good support for the eZ430 system.

Important!

yum install msp430-libc mspdebug
    • Hello World – Now we get to create a simple embedded version of a hello world application. create led-on.c and paste in the following source:

Important!

#include <msp430x20x3.h>
int main (void) {
// Set P1.0 as an output
P1DIR = 1;
// Turn on the LED
P1OUT = 1;
return 0;
}

    • Compilation – Compile the test code using the following command:

Important!

msp430-gcc -g led-on.c -o led-on.elf
    • Programming – Now we use mspdebug to load the program into flash on the MSP430 microcontroller and run it. You can either run up mspdebug and then issue the commands to load flash and run the app using mspdebug’s command line interface as follows:

Important!

[root@Optimus msp430]# mspdebug uif MSPDebug version 0.19 - debugging tool for MSP430 MCUs Copyright (C) 2009-2012 Daniel Beer <dlbeer@gmail.com> This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ti3410: warning: can't detach kernel driver: No such file or directory TI3410 device is in boot config, setting active Initializing FET... FET protocol version is 10002000 Configured for Spy-Bi-Wire Set Vcc: 3000 mV Device: MSP430F20x3 Code memory starts at 0xf800 Number of breakpoints: 2 Available commands:     =         delbreak  gdb       load      opt       reset     simio          alias     dis       help      locka     prog      run       step           break     erase     hexout    md        read      set       sym            cgraph    exit      isearch   mw        regs      setbreak   Available options:     color           gdb_loop        iradix               fet_block_size  gdbc_xfer_size  quiet            Type "help <topic>" for more information. Press Ctrl+D to quit. (mspdebug) prog slowtimer.elf Erasing... Programming... Writing  130 bytes to fc00 [section: .text]... Writing   32 bytes to ffe0 [section: .vectors]... Done, 162 bytes written (mspdebug) run Running. Press Ctrl+C to interrupt...

OR:you can tell mspdebug to program and run the code without having to enter the command line interface:

Important!

mspdebug uif 'prog slowtimer.elf'
  • Done! how easy was that ;D – Now go and make your LED blink!

Nov 01

Sugru – Make your own – DIY

Someone mentioned the words “Sugru” and “Group Buy” the other day at work which got me thinking about Sugru and what it is exactly, which then lead to “How do i make it?”

If you don’t know what Sugru is, check out their website: Sugru.com It is a “self-setting rubber for fixing, modifying and improving your stuff” and can be used for many many useful things such as repairing broken cables/adding strain relief, making custom grips for your bike handlebars, making mounts for cameras and even repairing shoes.

I wanted to be able to make up something similar to Sugru any time i need any rather than ordering it from the UK and waiting for it to arrive. After a quick google, i found an instructable for making “OoGoo” which pretty much covers what i needed 🙂 Here is my attempt at making my own Sugru:

OoGoo

OoGoo

Here is a brief run down on how to make the stuff, for more detail refer to the Original Instructable:

 

How it works:

Normal silicon takes forever to set, the thicker it is, the longer it takes. Silicon sets by drawing in moisture from the air. The way the Sugru substitute works is by using moisture that the cornflour has absorbed and distributing it evenly through the compound so that it dries from the inside out and much faster than normal.

What you need:

  • 100% Silicon (Acetic cure silicon, it smells like vinegar… the cheapest stuff you can find!)
  • Cornflour/corn starch
  • Oil paint for colouring
  • Plastic disposable cups and something to stir with (i used a chopstick)

How to make it:

  • Mix about a pea sized amount of oil paint with 2 teaspoons of silicon, stir it together well until it is an even colour
  • mix in 2 teaspoons of cornflour (1:1 ratio i found is the best.. it sets in about 10 minutes which is long enough to work it into shape)
  • Stir it together until it is well blended. I found that when it was ready to handle, it would start peeling off the walls of the plastic cup easier and it wasn’t so sticky. At this stage, i took it out and rolled it up into a ball in my hands then started forming it into the shape i want.

This stuff sticks to most things really well, it sticks to already cured oogoo very well but doesn’t bond with plastic or metal very well. You can add a small amount of super glue (cyanacrylate adhesive) to the mix to make it stick better.

By changing the ratio of cornflour to silicon, you can vary the time it takes to set and the final strength of the compound. More corn flour will make it set quicker since there is more moisture in the mix. Less cornflour gives you longer to work the stuff into shape. a 1:5 cornflour:silicon mix will give you about a 1hr working time.

Now that you have your own moldable silicon, have fun and see what creative ideas you come up with!

Older posts «