As described in the first post in this series, I’m working on converting the NC30 to fuel injection. That post was 2 months ago, since then I’ve mostly been working on a box of electronics that aren’t exactly required but that I think will make things a lot better.
When designing the whole Microsquirt system, there are a couple of loose ends that need to get tied up:
- Pressure sensors for barometric and manifold pressure need wiring up, with dedicated analog lines. You can use automotive sensors for this, but they’re a lot more expensive than the ones you can get from Mouser.
- For tuning, you need to connect the ECU to a computer. Normally this is done over RS232, but I wasn’t psyched about having a serial connector somewhere on the bike exposed to the weather. Instead, you can use a Bluetooth serial bridge and connect to the bluetooth on the laptop. However, you need to put the Bluetooth modem in some protected location.
- Finally, you need to hook up wideband oxygen sensors. Most consumer-grade ones output an analog voltage, which means you have to be very careful about signal interference. However, there’s a DIY one you can buy as a kit from 14point7 that can also be read digitally over I2C. You can then send this data to the Microsquirt over the CAN-bus connection, eliminating any analog part from this very important signal. This seemed like an obvious use for an Arduino…
At first, I meant to accomplish this in an as simple as possible way, using a breadboard and breakout boards and DIP chips. However, it quickly became clear that this would not be much easier and would be really clunky. Instead, I decided to design a small breakout board with surface-mount Atmega microcontroller and the CAN-bus controller/transceiver. I’ve never used any of the on-demand circuit board businesses, but it turns out that small boards are really cheap. I used OshPark, and the small double-sided board ended up costing $6 for 3, including shipping! And they’re purple!
I had already tested this with an Arduino and DIP versions of the CAN-bus components, so I knew I could send data to the Microsquirt and have it show up as fuel/air ratios.
With the complicated circuiry out of the way, I just needed a simple board to mount the pressure sensors, the Bluetooth modem, and connect to the wideband controllers. This was sufficiently simple that I decided to make a single-sided board myself using toner transfer.
I haven’t done any etching since the wine refrigerator project back at the beginning of this blog, so it took a while to remember all the subtleties. And while this worked fine, when you take into account time spent doing transfers, etching, drilling, etc, it’s not at all clear that it’s cost effective compared to ordering from OshPark. This board has a lot of area, so it would have been about $30, but it also took me quite a few hours to do by hand.
The plan was to stack this board and the two wideband controller boards and mount them in a weatherproof enclosure. The stacking worked out quite well and everything fit perfectly into the Hammond enclosure.
Getting the boards into the enclosure turned out to be a bit more work than expected. The problem is that the enclosure is quite deep, and the Ampseal connector quite large.
After careful filing I managed to make a hole large enough that the connector can be jammed through, with only a little flexing of the circuit board, while keeping it smaller than the seal on the flange. As you can see in the picture above, I failed a bit on locating the screw holes, but they are all on the “external” side of the seal so it’s only a cosmetic matter.
In the end, the enclosure is quite large, so there’s really only one place on the bike where it fits: in the tail along with the other electronics. There’s not really any extra space, but it works.
So that’s where it’s at right now. I’m currently in the process of welding bungs for the oxygen sensors onto the exhaust pipes, once that’s done and I know how long those wires need to be, I can mount this box permanently and start the job of wiring everything up.
You definitely have the skills necessary to make this project happen. I will thoroughly enjoy watching as you work.
Greg
Pingback: Microsquirting the NC30, part #3: Mounting the Oxygen sensors | Patrik's projects
Pingback: Microsquirting the NC30, part #3: Mounting the Oxygen sensors – Patrik's projects