The DriveByWire Controller (DBWX2)

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

Post Reply
petski3
Experienced MS/Extra'er
Posts: 167
Joined: Thu Jan 21, 2016 2:10 am
Location: Finland
Contact:

The DriveByWire Controller (DBWX2)

Post by petski3 »

So here it is. The MS compatible Drive By Wire controller. This has been a few years in the making, and finally it is at the point that we can show it off.
Image

The idea to make a DBW controller has been with me for quite some time now, and this is the second iteration of the DBW controller. The first DBW controller was made by me for my bachelor's thesis (2015), and that controller was in my car for quite some time. Current DBW controller addresses the problems found in the first one, and has more powerful hardware.
The reasoning behind this project was to finally make possible full engine control with automatic downshift blips and all sorts of torque management and engine protection schemes found in top dollar systems. The MS3 controller is probably the most cost effective solution for really good engine control, but it has the limitation of no DBW control. That is what we want to change. As I saw that the MS3 1.5 firmware had the added DBW controls, this project was taken out from hibernation.

Specs
Dual DBW throttlebody capability on one controller. Both dbw throttles can be controlled independently. Also the pid / frequency settings are independent on each channel. Maximum frequency is 20kHz, so you won't be hearing that high pitched whine from the throttlebody.
Maximum current for each DBW channel is 10Amps, so it can control most of the dbw throttlebodies. The dual throttlebody capability gives the possibility to run dual plenum intakemanifolds on V engines, like the Holley sniper manifold. And you don’t have to setup a complicated throttle linkage that is prone to failure if done incorrectly. If you do not need both throttlebodies to control the actual intake, you can use the other channel as a dbw blowoff valve or a supercharger bypass valve. We can program the system to do almost anything with software updates.

Image

Controller has 2 modes of operation, Standalone and the 11bit ms dbw can messaging. This can be set independently for both throttlebodies. When selected to operate via MS can messaging, complete control of the throttlebody is given to the megasquirt. Only exception is the user settable safety table that can be setup to reject out of bounds requests. This table is Maximum allowed opening as the Y-axis and throttle pedal position as the X axis.
Image

Safety
Safety has been handled by using dual microcontrollers on the controller. Both "tps" signals (main / secondary) from the pedal and throttlebodies are constantly monitored by both CPU's independently, and in the case of malfuntion or sensor missmatch the throttles are closed / powered off.
Both CPU's have independent ability to shut down the throttles in case of malfuntion. Both CPU's also process the information independetly. This arrangement makes the hardware completely fault tolerant if one of the CPU's have a critical error/harwarefault.
As the main CPU is a ARM Cortex 32bit core, we wanted to use a more proven/rugged CPU as the secondary. So we chose the 8Bit AVR as the secondary microcontroller. The AVR is a old but proven cpu architecture, and the electrical specifications of the mature microcontrollers are generally more robust than the newer parts.

Tuning the controller
My favourite part on this controller is that it can be tuned via Tunerstudio. Big thanks to Efi Analytics for making it possible. Tunerstudio is a powerful tuning software with exceptionally good logging capabilities. You probably knew all this but anyways... The idea is that you can tune/setup this DBW controller via the MS can passthrough. However this is still a work in progress because of a small issue regarding the communication endianness on the can passthrough, but the issue is being worked on.
The controller can also be configured via USB. USB is also the preferred connection method if you are tuning the PID controller. USB connection provides the fastest logging speed of the controllers parameters, and you really want the fastest possible speed in communication when tuning the PID controller. I will try to make a video on how to tune the PID controller for a throttlebody so that you can see yourself how hard/easy it is.
Our plan is to get the most popular throttlebodies and provide the calibrations/PID settings for them so that most users don’t have to deal with the pid tuning.

As you will see on the following short video, the controller is capable of excellent performance on controlling the throttle blade position. On the video you will see a Tunerstudio live log trace that has on the upper trace the "target" and "actual" positions off the throttlebody. You can see that most of the time the traces are identical, and on rapid movements when the mechanical mass of the throttlebody can't keep up you can see small differences on the traces.

See the video here:
https://youtu.be/Cf0ir3W05cg

I am thinking of setting up a kickstarer/alternative to fund the first manufacturing batch if there is interest. As these controllers are actually quite expensive to make in small quantity, it would be ideal to make a bach of 100 or more to keep the unit cost reasonable. If we could get 100 pieces manufactured, the retail pricing should be in the 300-400usd range depending on how good of a deal we can get with the manufacturing side of things.

Looking forward on hearing your thoughts!

Edit:

Order here: http://www.dbwx2.com/
Last edited by petski3 on Mon Jul 01, 2019 8:06 am, edited 1 time in total.
https://www.dbwx2.com/ - Dual DBW Controller
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: The DriveByWire Controller

Post by racingmini_mtl »

This looks like a well thought and designed project and I think it would fill a need. And using kickstarter or some other crowd funding platform sounds like a good idea to get that starting at an attractive price point.

Having said that, it would be a very good idea to introduce yourself and where your located. Having this type of post from someone with only 2 posts on the forum raises a few flags especially for hardware that could lead to serious consequences in case of failures or other issues. You seem to address them in your post but knowing about your background would be useful.

As an aside and concerning your other post, I'm curious to know if this is the device with the FT230XS which had the same issue with TunerStudio I had and if you've had some positive feedback from Phil.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
petski3
Experienced MS/Extra'er
Posts: 167
Joined: Thu Jan 21, 2016 2:10 am
Location: Finland
Contact:

Re: The DriveByWire Controller

Post by petski3 »

Thanks,

So as my post might suggest, I am a long time follower of the MS community but have not really posted anything. So let’s start with introductions.

My background is in embedded design. For the last 6 years I have been designing mainly embedded electronics in a hi-tech design/engineering company. These projects have ranged from electrical grid flashover protection systems to agricultural gps devices (https://www.risutec.fi/en/asta-documentation-system/) <- For reference I designed that device.

My passion really lies in motorsport. I really enjoy tuning vehicles and and really enjoy the faces of people when their project car starts up for the first time. In that sense it is quite rewarding. As most of the cars that i touch and tune are limited in budget, they mostly use the MS platform as the ECU. As the engine power increases in these project cars it becomes more and more important to get good torque mapping from the high powered engines to maintain driveability.

As for the safeties in the controller, it is not like I got them from thin air. I did actively research the conversations regarding the subject of drive by wire and took the main points from there. This resulted in a design that was focused on the reliability.

This is a project that I wanted to release much sooner, but I was quite busy with the job side of life and could not complete this project until now.

As for your question about the 230XS, yes it it this device. I did scratch my head for quite some time and finally came to the conclusion that tunerstudio does not like the 230XS chip with the D2XX drivers. Im hoping that the issue would be fixed by Phil in the future. This is not a dealbreaker with this device because it is unlikely that both usb’s (for the ecu and dbw controller) are connected at the same time.

Petteri Antila
Finland
https://www.dbwx2.com/ - Dual DBW Controller
JoseMiguel
Master MS/Extra'er
Posts: 652
Joined: Thu Dec 09, 2010 3:48 pm

Re: The DriveByWire Controller

Post by JoseMiguel »

Wow! way to go. Very impressed on what you have done

Any info on price/avaliability?

regards
Suprazz
Master MS/Extra'er
Posts: 500
Joined: Mon Jan 22, 2007 7:58 pm
Contact:

Re: The DriveByWire Controller

Post by Suprazz »

I'm really interested and I have customer looking for something like that. I would really like to try it.
Maybe I can help you with the production of this unit.

Thanks!
Best looking and most advanced CAN-bus gauge
Toyota Supra 7MGE, 7M-GTE and 1JZ-GTE Plug and play ECUs: http://www.perfecttuning.net
Serial to Bluetooth or Serial to WiFi
DIYAutotune Canadian, EFI Source and ECUMaster reseller!
jsiedlicki
Master MS/Extra'er
Posts: 687
Joined: Sun Jun 23, 2013 3:52 pm

Re: The DriveByWire Controller

Post by jsiedlicki »

I've been waiting for something like this to get developed. Please keep us posted on production!
MS3-Pro 1st Gen | Honda K24 Supercharged
MS3/MS3X | SB Ford 347 stroker
Paul_VR6
Super MS/Extra'er
Posts: 1978
Joined: Wed Apr 15, 2009 11:31 am
Location: Oxford, PA
Contact:

Re: The DriveByWire Controller

Post by Paul_VR6 »

Keep us posted on details. Would sign up for a few via kickstarter.
-Paul
1992 Corrado SLC 3.6 VR6 11.38@120 - MS3 Pro Ultimate - Microsquirt I/O - Can EGT - Racepak IQ3s
kptuned.com - Megasquirting the World! Megasquirt Sales, Service, Tuning and More!
Image
Rusty
MS/Extra Newbie
Posts: 14
Joined: Sat Jun 09, 2012 4:03 am

Re: The DriveByWire Controller

Post by Rusty »

I could certainly use One. Any chance of producing one? PM me if there is.

Rusty
petski3
Experienced MS/Extra'er
Posts: 167
Joined: Thu Jan 21, 2016 2:10 am
Location: Finland
Contact:

Re: The DriveByWire Controller

Post by petski3 »

Thanks for all the interest! For the last week I have been working on the bootloader(s).
It gets quite complicated when you have 2 microcontrollers/cpus on the board, and the second cpu has to be updated by the primary cpu via spi bus. Got it working though, but it still needs a couple days of testing to make sure that there are no issues.
I thought of making a fancy application for the software update but the inner geek in me says that the firmware updater should stay as a console program.

Image

I have also received some pm:s asking for the controller:
I am really excited about your interest in this, but please wait for the release. This is a device that i cannot supply to individuals before everything is ready, and the "beta" state has been lifted.
Stay tuned!

Petteri
https://www.dbwx2.com/ - Dual DBW Controller
romano
MS/Extra Newbie
Posts: 27
Joined: Tue Oct 06, 2009 1:03 am

Re: The DriveByWire Controller

Post by romano »

Hi to all,

Very good news!
I always think that it's the missing hardware brick in the world of ms3.
Very impatient of the release of this dbw controller compatible with ms3 and setupable with TS!

Any idea/estimation of the price?

R.
Manu
Master MS/Extra'er
Posts: 723
Joined: Mon Feb 15, 2010 4:57 am
Location: Alès - France
Contact:

Re: The DriveByWire Controller

Post by Manu »

petski3 wrote:If we could get 100 pieces manufactured, the retail pricing should be in the 300-400usd range depending on how good of a deal we can get with the manufacturing side of things.
JoseMiguel wrote:Any info on price/avaliability?regards
romano wrote:Any idea/estimation of the price?
Blind ?
I can supply, repair or upgrade Megasquirts in FRANCE.

Image
https://www.megasquirt.fr
jacky4566
Helpful MS/Extra'er
Posts: 112
Joined: Mon Aug 31, 2015 10:05 am

Re: The DriveByWire Controller

Post by jacky4566 »

I've been working on a controller myself and this looks great on paper. Couple questions from a fellow EE :)
Why did you combine ARM and AVR instead of just using identical processors? Even the ATTiny series can handle the IO and computing involved here.
How flexible is the throttle pedal input? Could it accept a Hall Effect sensor or frequency input found on some of the fancier cars.
Is there any limp modes? Not trying to judge your work but if it decides there is a mismatch are you limited to ~30% throttle or just completely shutdown?
Was there any consideration for cruise control inputs? *cough* for offroad use *cough*
Is the CAN bus controller future proofed for CAN-FD?

Great work! Would love to help out if you need code, schematic, or BOM reviews.

Subscribed!
petski3
Experienced MS/Extra'er
Posts: 167
Joined: Thu Jan 21, 2016 2:10 am
Location: Finland
Contact:

Re: The DriveByWire Controller

Post by petski3 »

Great questions, I’ll try to answer.
The idea of different kind of processors came from redundancy. I thought that if the first CPU would have problems related to maybe electrical interference (emc, radiated, emi) then the second CPU would have the same problems if they were the same kind.

I must disagree on the computing requirements comment as there is lots of overhead from interpolating, validating inputs, etc. And much of the code consists of checking that everything went as is should. Then add the serial comms processing and canbus processing and it gets quite heavy. So while the attiny could 100% do a dbw pid loop, there is little chance that it could compute the overall system requirements.
The dbw throttlebodies that I have tested can all move from 0% to 100% in less than 0.1second. This means that the controller must have a pid loop speed of 0.001seconds (1kHz) so that it can process every 1% of the dbw movement. Computing speed must be even greater to achieve control in the 0.1% range. To control the throttlebody in the 0.1% range at full speed, your calculating speed should be over 10kHz. This would be a true challenge with a lower end cpu. And while these speeds are not an absolute requirement and most controllers doesn’t do the calculus anywhere near the speeds mentioned, the faster calculation speeds does help with ease of tuning and overall control.

The throttle pedal input circuit has lowpass filter on the input, so maybe if the frequency is not too high it could potentially read the frequency output from a pedal. The cpu can read frequency from any pin with hardware timer, so that is not a problem. However the secondary cpu witch is ATTINY1616 cannot read frequency from those pins. So that rules out non voltage based pedals.

Limp modes are present, if the can communication is broken user has the option to close throttles or choose from two user configurable maps. If there is a sensor problem let’s say in the gaspedal, there is no limp mode for that as the controller doesn’t know which one of the signals is valid and will default to shutting throttles.

Cruise control is not something that this controller can implement by itself as there are no spare inputs, but it could be implemented by the ecu (as it knows vehicle speed etc) via canbus.

The main cpu supports CAN-FD.

Thanks, Petteri
https://www.dbwx2.com/ - Dual DBW Controller
jsiedlicki
Master MS/Extra'er
Posts: 687
Joined: Sun Jun 23, 2013 3:52 pm

Re: The DriveByWire Controller

Post by jsiedlicki »

I must be missing something here. Looking at the available settings in the latest firmware (1.5.2 beta 2), how is idle control achieved when using the MS3 Throttle control (DBW)?

Since there is no IAC valve in a DBW throttle body, setting the Idle Valve Type to None in the Idle Control dialog grays out all the options for open loop or closed loop idle steps/targets. Don't we need a DBW option in the Idle Valve Type drop down so we can set the idle control parameters?
MS3-Pro 1st Gen | Honda K24 Supercharged
MS3/MS3X | SB Ford 347 stroker
romano
MS/Extra Newbie
Posts: 27
Joined: Tue Oct 06, 2009 1:03 am

Re: The DriveByWire Controller

Post by romano »

Manu wrote:
Blind ?
amabilité:
Politesse affable et prévenante ; courtoisie : Un accueil plein d'amabilité.
slyrye
Experienced MS/Extra'er
Posts: 255
Joined: Sun Aug 12, 2007 2:41 pm
Location: Philippines
Contact:

Re: The DriveByWire Controller

Post by slyrye »

jsiedlicki wrote:I must be missing something here. Looking at the available settings in the latest firmware (1.5.2 beta 2), how is idle control achieved when using the MS3 Throttle control (DBW)?

Since there is no IAC valve in a DBW throttle body, setting the Idle Valve Type to None in the Idle Control dialog grays out all the options for open loop or closed loop idle steps/targets. Don't we need a DBW option in the Idle Valve Type drop down so we can set the idle control parameters?
My theory is since it's using CAN communication protocol, your megasquirt idle just needs to be configured as PWM and the DBW module will interpret it...!
MSnS'n'4G15
jsiedlicki
Master MS/Extra'er
Posts: 687
Joined: Sun Jun 23, 2013 3:52 pm

Re: The DriveByWire Controller

Post by jsiedlicki »

You must assign an output to select PWM and what if you have none available? Not a very good solution if that is the case. Any input from the OP or the developers on how idle control works with DBW?
MS3-Pro 1st Gen | Honda K24 Supercharged
MS3/MS3X | SB Ford 347 stroker
slyrye
Experienced MS/Extra'er
Posts: 255
Joined: Sun Aug 12, 2007 2:41 pm
Location: Philippines
Contact:

Re: The DriveByWire Controller

Post by slyrye »

racingmini_mtl wrote:This looks like a well thought and designed project and I think it would fill a need. And using kickstarter or some other crowd funding platform sounds like a good idea to get that starting at an attractive price point.

Having said that, it would be a very good idea to introduce yourself and where your located. Having this type of post from someone with only 2 posts on the forum raises a few flags especially for hardware that could lead to serious consequences in case of failures or other issues. You seem to address them in your post but knowing about your background would be useful.

As an aside and concerning your other post, I'm curious to know if this is the device with the FT230XS which had the same issue with TunerStudio I had and if you've had some positive feedback from Phil.

Jean
At last someone with the courage to move forward with innovation...! :D Thanks very much Petski3...! I have always adored and admire the Fins as I used to worked in Scandinavia particularly in Norge...! they are awesome people...!
MSnS'n'4G15
petski3
Experienced MS/Extra'er
Posts: 167
Joined: Thu Jan 21, 2016 2:10 am
Location: Finland
Contact:

Re: The DriveByWire Controller

Post by petski3 »

As there has not been a DBW controller before, the ms options for DBW are limited.
I did check the MS3 menus, and did come to the same conclusion that you will need to select a physical output for the idle control. Maybe next release will have a DBW option in it.
https://www.dbwx2.com/ - Dual DBW Controller
jsiedlicki
Master MS/Extra'er
Posts: 687
Joined: Sun Jun 23, 2013 3:52 pm

Re: The DriveByWire Controller

Post by jsiedlicki »

petski3 wrote:As there has not been a DBW controller before, the ms options for DBW are limited.
I did check the MS3 menus, and did come to the same conclusion that you will need to select a physical output for the idle control. Maybe next release will have a DBW option in it.
Have you tested to see if idle control works with your controller if you select a physical output?
MS3-Pro 1st Gen | Honda K24 Supercharged
MS3/MS3X | SB Ford 347 stroker
Post Reply