Tuesday, January 21, 2014

Electronic boost controller

This is a brief overview of a project I named EBC2013.

About a year ago I started working on one of my longer and more serious projects. Me and my dad share a project car which we like to take to the track. The car has a turbo charger installed and we wanted an electronic boost controller for it.  However there was a problem; they go for about ~250$ and up.. But how hard could it be to just build one?

First I set some goals for this project:
    - Electronics are controlled by Arduino microcontroller platform
    - Finished looks
    - Intuitive and simple user interface
    - Open and closed loop modes for boost control
    - Over boost protection / boost cut
    - < 100$ budget

I started by doing some research since I had no experience on electronic boost controllers (EBC). I read through couple user manuals to get an idea of what features they might have. This also gave me a rough idea on how I wanted the GUI to operate. I also gained an understanding for how the device as a while should work. Basically it has a pressure sensor that monitors the MAP (manifold air pressure) in the engine and drives a solenoid with a varying PWM signal. The solenoid opens and closes the air to a pneumatic actuator on the waste gate of the turbo charger thus controlling the boost. For a better explanation please turn to google, as it could be a blog post on itself.

Interface

Inspired by an off the shelf controller I decided to use only three 7-segment displays and two push buttons for the interface. This would provide some challenge in communication, but benefit from compact size. The user would shift up and down menus with the two buttons and proceed by pressing both buttons simultaneously. The menus can be thought as trees that have branches, but at the end the interface always returns to main screen.

Here's a video showing an early experiment with the menus and closed loop control. The potentiometer simulates the MAP sensor.



The code

Before I received any of the parts for this build I had time to work on the code. It quickly expanded to over 1000 lines, which is by far the longest single program I had ever written. When I finally had the chance to burn the program to the finished hardware it had only minor tweaking left.

The commented code is available here: EBC2013. I am more than happy to help if some part is hard to understand. Also NOTE that the PID closed loop control portion is highly experimental!

Hardware

The EBC consists of two parts; the main unit located near the driver and the solenoid located near the engine. The main unit can be separated to eight blocks.
     - The Arduino Nano; controls and is connected to everything
     - Voltage regulator, everything works with 5V except the solenoid
     - MAP sensor, MPX4250AP
     - The display and push buttons
     - Chips driving the display, 3x TPIC6B595
     - Buzzer speaker
     - FET driving the solenoid, IRLZ44N
     - Connector for power, solenoid and possible auxiliary accessories

All of these are distinguishable in the final circuit board:

Those heatsinks are probably unnecessary, but I didn't want to take any chances as the case is not ventilated.

I would like to point out that I had no previous experience in using 7-segment displays or shift registers, but didn't want to use existing libraries. Each display is driven by its own high power TPIC6B595 shift register and all the digits in the code are created by me painstakingly slow one by one. In the end this was very rewarding as I had the chance to design my own letters and figure out which symbols are possible and which are not. I wrote brief instructions on how to add more symbols to the code.

With the layout I wen't after simplicity as well as robust design. The hardware has to work reliably and withstand shocks and vibration.

The Case

The circuit board was created to fit an aluminum case that has mounting grooves for it. When I received the case I was happy to find the dimension given by the seller correct and the board fit perfectly.



In this photo the hole for the 8-pin connector was not yet cut.

Further development

After finishing this build I started to play around with an idea of manufactured PCB. I also changed the Arduino nano to embedded ATMega328 chip and replaced the three shift registers with a single smd MAX7219 chip that can handle up to eight seven segment displays and already has a good Arduino library written for it. The Eagle files for the layout and schematics can be found in the github repository here. I apologize that I don't have an updated code for this board, but I never got around ordering any. The schematic will however help to build your own controller.




Testing and conclusion

Installing the EBC was straight forward. I mounted the device under the dash with velcro and ran wires to switched power and to the solenoid. The pressure line I spliced from the ECU with an Y-connector.

First test I did was with open loop mode, in which the controller feeds the solenoid with a constant predetermined PWM signal that can be changed in the menu on the go. This was simple and worked like expected, but the closed loop was tricky and showed severe hysteresis. Later I tried PID control. It was easy to implement but very hard to tune. (This was not helped by a jamming wastegate that went unnoticed for quite a while.)

I put the closed loop development to a halt, as it was taking way too much time, but showing very little results. After all the open loop mode works reliably and is fast and easy to alter while driving. I also hit every other goal on my initial list.

I have added all sorts of little tweaks on the way like display brightness, maximum detected boost, atmospheric pressure compensation and "added boost" mode in which the driver can momentarily raise the boost limit with a press of an auxiliary button.

I am very happy with the EBC at the moment, and don't regret going DIY. After all this is a product designed by me for me and open for me to change anything if ever needed.

For those who are interested here is a picture of the engine bay. The solenoid can be seen right above the air filter, installed away from the heat.

6 comments:

  1. Hi! Is it possible to Buy an ebc of you? Please contact me on da_posth (@) Hotmail(dot)com
    Thanx

    ReplyDelete
  2. Thank you for posting the great content…I was looking for something like this…I found it quiet interesting, hopefully you will keep posting such blogs… cell phone detection

    ReplyDelete
  3. Hi! I'm trying to tackle this project and would like to as =k you some questions. Please, if you still visit I'd like to get those answers questioned.

    ReplyDelete
  4. "If you ever wondered who are the most sophisticated players in the IT outsourcing industry, I'd highly recommend checking out this article to learn more about outsourced product development.
    "

    ReplyDelete
  5. Maby have you more pictures on mainboard?

    ReplyDelete