Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Your chance to introduce yourself and your vehicle
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

AndreyB wrote:
Fri Aug 14, 2020 3:36 pm
tmbryhn wrote:
Wed Aug 12, 2020 3:46 pm
USB:
I've planned to use an FTDI FT232RL as the USB/UART adapter, primarily because it's well supported by TunerStudio.
Which STM32 pins are suggested for TX/RX? Any other approaches that are considered to be better with the STM32F427ZGT6?
This is a very worrisome statement.

My preference is to be blunt here: this concludes my availability for guidance for this this project. I have very limited resources and a large new board would not help me in any way while drain too much of those limited resources. I am happy to join the party once the party would be adding something on top of the existing foundation. See you on Slack!
Hey, that's very understandable. I'm btw often direct myself, and can at times come across as blunt too - no time for bullshit, eh? ;)

I glanced rather quickly over the Proteus sch and STM32 datasheet, so i found out about the Native USB at a later point after spilling the beans, lol. Direct USB is already implemented into the design. I guess it was too quick to assume the FTDI alternative given the TS support through the D2XX driver option..

I completely understand, but hopefully I won't require much of the communitys (or your) time/effort while doing the actual board design.
I would probably ask for a few nudges in the right direction once I'm ready to upload the firmware for the first time though, unless I'm able to execute based on the info that's already on this forum in various threads - I'll sure give it a try. Hopefully, it wont be more complicated than using the already existing Proteus firmware package and adhere to procedure on the first revision due to the fact that I'm going for the same MCU pinout.

The only new stuff I'm adding to "our" table is the non-CJ125 WBO2 controller which might be beneficial for some to incorporate into the RusEFi firmware and in time their own designs. I'll start wrapping my head around that once the hardware is done and ready for testing/tweaking.
I'm also planning on doing a separate thread on that with schematics and maybe a "how to"-kinda' approach implementing the firmware side of things. Hopefully that could be a team effort with someone in the community who's up to speed with coding on this plattform, and might also be of help for those like me that have some experience in general coding, but lack the specific skills and find it a bit daunting to start coding on a new plattform. After all, that's one of my goals for this project; to make the step from 8-bit C on Microchip MCUs to the 32-bit C/C++ STM plattform.
If such threads already exist, I'm happy for a heads-up.

I'll keep things to this thread onwards, but might make another one once the hardware is finished and ready.
Hopefully, someone can chime in along the way with some quick hints if I have questions or get stuck.

Thanks for the feedback :)
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

mck1117 wrote:
Fri Aug 14, 2020 2:02 pm
I ask whether an adapter is reasonable because there is nonzero cost required to maintain additional board configurations. Keeping the compatibility matrix as small as possible is good for everyone :)
It's a valid point, but to me it's about having a nice and more or less complete plattform to start testing on without too much adapter boards and "half-assed" solutions. That's why I'm also implementing the WBO2 and Knock on-board right away too - to actually be able to test something new.
I mean, I'd have to do some PCB design anyway making that adapter - why not do it properly the first time?
It also has to do with the wiring in my VW Beetle. The ECU and DBW module that I've already designed uses the same pins as the new one I'm working on (Chinese FCI knock-off automotive connectors). De-pinning the already existing connectors from the bulkhead-harness behind the back seat and setting up for the new ECU should be a quick effort. I'ts also a more or less daily driver, so I feel more comfortable having one single solid piece of hardware instead of multiple adapters.

I believe I can do the hardware relatively straight forward without too much questions - I'm already making good progress on the routing side of things.
Once that's done, it's all about that firmware anyway, which in all essence starts out being identical to the Proteus. In my head, that means we're playing the same game when it comes to implementing features and improving on the firmware side of things.
Btw, I appreciate your technical input along the way - it's very helpful to get that kind of confirmation. I hope I can keep ask for some hints along the way if I'm stuck at some point :)
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by mck1117 »

The thing that will make onboarding the easiest is to use an identical pinout to proteus - all inputs/outputs on the same MCU pins. If so, the firmware should "just work".
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

mck1117 wrote:
Fri Aug 14, 2020 8:32 pm
The thing that will make onboarding the easiest is to use an identical pinout to proteus - all inputs/outputs on the same MCU pins. If so, the firmware should "just work".
Word, that's what I'm going for 🤙🏼
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

Getting somewhere.
Progress.jpg
Progress.jpg (192.06 KiB) Viewed 18804 times
Remaining to-do list:
- Routing analog inputs
- Laying down PWR and GND planes
- USB connector and pressure sensors placement
- Figuring out Knock circuit pinout and routing

Will hopefully be ready to upload Gerber files and order the components that aren't already in stock within the end of this week :)
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

Ready for the board house!
Did some reading up on the lates Proteus v.03 and decided to follow the same track and went for the current direct ADC sampling knock input solution.
The components are already in stock, so I guess I'm just around the corner :)
Top.png
Top.png (510.89 KiB) Viewed 18593 times
Bottom.png
Bottom.png (238.69 KiB) Viewed 18593 times
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by mck1117 »

Want anybody to do a review before you send it off?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by AndreyB »

Is that 2x45 or 90 pin connector? What connector is that - is it OEM for any vehicle?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

Yes please! That would've been nice.
I can compile the schematics into one pdf.

How do you suggest I upload them though?
I'm not familiar with github or such.
Last edited by tmbryhn on Tue Sep 29, 2020 4:13 pm, edited 1 time in total.
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

AndreyB wrote:
Tue Sep 29, 2020 11:27 am
Is that 2x45 or 90 pin connector? What connector is that - is it OEM for any vehicle?
It's part of the FCI China knock-off lineup. You also get them in 24, 39 and 56 types.
Here's my enclosure of choice:
HTB1nt.nlwnH8KJjSspcq6z3QFXaA.jpg
HTB1nt.nlwnH8KJjSspcq6z3QFXaA.jpg (75.3 KiB) Viewed 18574 times
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by mck1117 »

tmbryhn wrote:
Tue Sep 29, 2020 4:06 pm
Yes please! That would've been nice.
I can compile the schematics into one pdf.

How do you suggest I upload them though?
I'm not familiar with github or such.
You can just upload them here on the forum as an attachment, if you want.
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

Attached schematics:
sch.PDF
(1.22 MiB) Downloaded 291 times
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by mck1117 »

Looks pretty good! Just a few notes:

1. I think you want the internal MAP/baro jumpers before the input RC filter:
image.png
image.png (23.28 KiB) Viewed 18546 times
2. I noticed you have no clamp diodes on the analog inputs - unless you've switched the input opamps (U6-U9) to something that tolerates overvoltage (the MCP6004 does not), those are required to prevent destruction of the buffers in case an analog input is connected to +12v, or even if you touch the pin and dump some ESD in to it.

3. Analog volt inputs also don't have any weak pulldowns - floating opamp inputs can result in chaotic behavior which consumes power and makes noise. It also makes it hard to detect a broken sensor or wiring harness - the floating behavior of the pin should be predictable.

Here are #2 and #3 as implemented on Proteus:
image.png
image.png (54.97 KiB) Viewed 18546 times
4. Any reason you used discrete transistors with a clamp zener for the lowside outputs instead of integrated drivers from ST/Infineon? They both make DPAK package parts that are a direct swap for a normal n-channel MOSFET.

4b. 100k for a pulldown resistor is probably too weak - the stm32 defaults to a weak pullup resistor under reset, on the order of 20-50k, which could be enough to turn on those mosfets while under reset (very bad!). 1k series + 1k pulldown has been bulletproof for us in the past.

5. Similar with the ignition outputs - any reason those aren't IGBTs? MOSFETs don't provide the same high voltage clamping action as an IGBT, and are difficult to find in a high enough voltage rating. A few people here have successfully used the FGD3040G2 without any other components.

6. Same question as #2 about clamp diodes for digital inputs - some sensors pull up internally to 12v, but maybe your transistors are tolerant of that already.

Ok, that wasn't a few things, but I hope that's helpful!
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

Thanks for good and thorough feedback!

1: No, I don't want the MAP/BARO inputs pre R/C-filters.
The sensor outputs have their own filters per datasheet recommendation, and I prefer maximum response on those signals.

2: Clamping on analog inputs:
Great point. I decided against it on this prototype. If it'll ever get commercialized, I will definitely implement a higher level of ruggedness and try to make the design more idiot proof by adding more "safety circuits" :)

3: Weak pull-downs, analog signal fault sensing etc.: Great input! I will definitely implement those. Thanks ;)

4a: Because I'm a tight ass and prefer my current SOIC8 FET's and active Zener clamping circuit as it is :lol:
They're dual FETs with relatively low R_on values that allow for a compact design and a lot of output channels per board surface area.

4b: That's a great input I wasn't aware of (the relatively low 20-50k figure).
I'll definitely lower those pull-down values. I already have 5k6 and 2k7 arrays in my design that will fit the purpose perfectly.

5: Ign IGBTs: These are indeed ignition IGBTs with proper active clamping voltage circuits biult-in.
I'm just too lazy with my own schematic symbols since I'm the only one reading them (up until now ;) )

6: Yeah, my 3906s have a -5V Emitter-Base breakdown voltage, so for those sensors that would include an internal 12V pullup, they're not sufficient.
I'm gonna leave it for now though, but make a design note for another revision if I ever get to release the design for more testers/users.

Thanks again for your time and feedback ;)
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by kb1gtt »

Are you familiar with the MAX9926's 85mS watch dog? You may want your layout to allow for the option of different modes. That watch dog has been a thorn when cranking.

The 5V7 on the 5V is likely to allow more like 6 or 6.5V before it starts to really clamp. This can be catastrophic for many chips on your design. You may want to consider a lower clamping diode. Often the 5.7V is at 10mA, it can be much higher when at something like 1mA.
Welcome to the friendlier side of internet crazy :)
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

I'm indeed familiar with the 85ms WD.
It hasn't been an issue in a long time though; just been a few 4-1 setups that had this issue in the past.
But it's a good point I can only assume not everyone's aware of.
On a similar note; has anyone experimented with the firmware intervening with the MAX992x through some external circuitry to adapt the mode on the fly?

I'll check out that 5V6 Zener. It might be completely redundant, and it's probably better to have a suitable TVS in place - if anything.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by kb1gtt »

I think the 5V7 is absolutely critical and not very redundant. I expect you'll find 5V1 is what you really need, which will probably partly conduct during normal operation. I'm assuming you understand the 7805 is not the only thing that can dump energy into the 5V rail and that is why this diode is critical for keeping the 5V rail from exceeding the 5V upper limits.
Welcome to the friendlier side of internet crazy :)
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by mck1117 »

kb1gtt wrote:
Wed Sep 30, 2020 5:54 pm
I think the 5V7 is absolutely critical and not very redundant. I expect you'll find 5V1 is what you really need, which will probably partly conduct during normal operation. I'm assuming you understand the 7805 is not the only thing that can dump energy into the 5V rail and that is why this diode is critical for keeping the 5V rail from exceeding the 5V upper limits.
The other option is to use a separate regulator for the external supply - one that's either tolerant of the output being pulled up, or is capable of operation in the second quadrant (positive voltage, negative current). The sensor supply regulator on Proteus is of the former type - the TLS115 is tolerant of -5 to 45 volts applied to the output pin, and is short circuit/overtemp protected (no polyfuse required!).
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by mck1117 »

tmbryhn wrote:
Wed Sep 30, 2020 4:18 am
Thanks for good and thorough feedback!

... snip ...

Thanks again for your time and feedback ;)
1. What are the baro/map sensors? I agree, you want maximum response on those sensors, but the RC filter actually isn't primarily to filter out noise - it's to filter out real signal that's faster than the Nyquist frequency for our ADC sampling. This is the case even with an onboard sensor that doesn't have to deal with noise that makes it in thru the wiring harness.

4a. There are fully protected soic8 dual FETs :) The VNLD5090/5160/5300 used on Proteus are exactly that, with three different options of Rds_on and corresponding current limit.

2, 3, 4b, 5, 6: sounds good!
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

mck1117 wrote:
Wed Sep 30, 2020 6:21 pm
1. What are the baro/map sensors? I agree, you want maximum response on those sensors, but the RC filter actually isn't primarily to filter out noise - it's to filter out real signal that's faster than the Nyquist frequency for our ADC sampling. This is the case even with an onboard sensor that doesn't have to deal with noise that makes it in thru the wiring harness.

4a. There are fully protected soic8 dual FETs :) The VNLD5090/5160/5300 used on Proteus are exactly that, with three different options of Rds_on and corresponding current limit.

2, 3, 4b, 5, 6: sounds good!
These are MPXH6400 sensors.
That's a good point I didn't think about. That would, if I understand this right, imply that I should revise the R/C filter to 10k + 0,1uF to get the same frequency response as intended?

Just added the weak pull-downs on the analog inputs :) I think I'm ready to go then...
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

Finally ready to order! ... But, I reckoned it would be wise to confirm all the PCB dimensions and most critical components with respect to enclosure fitment, so I decided to 3D-print a model with the tallest components included to confirm and make eventual corrections if required.
PCB-3D-rpint.JPG
PCB-3D-rpint.JPG (1.51 MiB) Viewed 18376 times
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

This should work 👍🏼
Made the final overview and adjustments this morning, and sent the Gerbers to JLC. Terribly exciting!
IMG_20201006_111042.jpg
IMG_20201006_111042.jpg (3.31 MiB) Viewed 17712 times

I'll start bench testing on this unit before I re-wire the old Beetle:
IMG_20201006_111611.jpg
IMG_20201006_111611.jpg (3.36 MiB) Viewed 17712 times

I'm currently covering a lot of distance on a daily basis, and both the engine and 3D printed intakes are holding up nicely and has delivered hassle free driving pleasure around 4000km since initial startup in June 🥰
IMG_20201005_212935.jpg
IMG_20201005_212935.jpg (2.69 MiB) Viewed 17712 times
IMG_20201005_212914.jpg
IMG_20201005_212914.jpg (2.91 MiB) Viewed 17712 times

Hopefully I'll find time for the implementation and some proper testing before the snow arrives, but I have a rather busy schedule ahead, and will be going away to the Faroe Islands for two months from the end of November... Thought I'd bring a stimulator, ECU and my computer; maybe I can start sinking my teeth into some firmware? ☺️
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by AndreyB »

Wow, very cool stuff!
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

Ok, here we go! 🤓😅🤞🏼
IMG_20201013_220912.jpg
IMG_20201013_220912.jpg (2.96 MiB) Viewed 17440 times
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by mck1117 »

No JLC assembly? I'm never soldering another LQFP again!
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

I like doing my prototypes in-house. Never had any particular struggles with QFP 😅
IMG_20201013_232302.jpg
IMG_20201013_232302.jpg (2.32 MiB) Viewed 17435 times
Guess it turned out ok 😊
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

But now it's like; "Sooo, ehh... What now?"
😂
IMG_20201013_233032.jpg
IMG_20201013_233032.jpg (3.34 MiB) Viewed 17434 times
I'll start by soldering on a 12V and GND connection just to make sure nothing blows up. If all is good, I'll solder the USB and ECU main connector, and start reading up on how to get some firmware loaded into this thing 😅

A small nudge in the right direction is greatly appreciated 🙏🏼☺️ I'm a complete noob to all things STM32, ChibiOS and what not considered...
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by AndreyB »

First order of business to turn on stm32 while holding "program" button and see Windows recognize stm32 DFU device based on stm32 hardcoded bootloader.

Alternatively run St-Link utility and have your chip recognized via ST-LINK when you hit "Connect"
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by tmbryhn »

Right! Everything looks good so far. No magic smoke, no shorts, and no excessive current consumption... But! I screwed up while ordering the 3V3 regulator, and even though Mouser states "3V3" on "Output voltage" for the particular PN on their listing, I just realized I got the adjustable one that goes from 1.22 - 20V after verifying the datasheet.
IFX54441EJ V33 vs. IFX54441EJ V

A "trap for young players" right there :lol:

My 3V3 rail is currently at 1.22V, which is, all hings considered, the better of a bad situation :)
I'll proceed by removing the regulator, order the right one, and see if I can start powering the 3V3 rail just to make som initial confirmation with the ST-Link.
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Hello from Norway! VW Beetle w. 3D printed intakes, 2x DBW and staged injection

Post by mck1117 »

tmbryhn wrote:
Wed Oct 14, 2020 8:41 am
Right! Everything looks good so far. No magic smoke, no shorts, and no excessive current consumption... But! I screwed up while ordering the 3V3 regulator, and even though Mouser states "3V3" on "Output voltage" for the particular PN on their listing, I just realized I got the adjustable one that goes from 1.22 - 20V after verifying the datasheet.
IFX54441EJ V33 vs. IFX54441EJ V

A "trap for young players" right there :lol:

My 3V3 rail is currently at 1.22V, which is, all hings considered, the better of a bad situation :)
I'll proceed by removing the regulator, order the right one, and see if I can start powering the 3V3 rail just to make som initial confirmation with the ST-Link.
Hehe, could be worse, could be a 5v regulator, and you'd get 4.7 volts on the 3.3v rail!
Post Reply