Swapping over to RUSefi, 5v tolerance?

Hardware inside and outside of the ECU
Post Reply
Joey120373
donator
donator
Posts: 61
Joined: Sun May 17, 2020 8:46 am

Swapping over to RUSefi, 5v tolerance?

Post by Joey120373 »

I have a board build as a piggy back controller for my ATV.
1000cc 80 degree Vtwin .

The board is a 2 piece design, where the analog signals, 2 injector drivers and 2 coil igbts are on the main board, and the daughter board basically is just a carrier for the teensy 3.5 that’s running speeduino.

All the signals except the crank trigger are 3.3v.

I just got a small little STM32F407 board in the mail yesterday, and I used an STlink to load the latest firmware on it, and it is small enough to use on my little piggyback unit. So I couldn’t resist soldering it up ( it’s only about a dozen wires since I’m just concerned with controlling 2 injectors and 2 coils.

I did a search on the internet to see what/if the stm32f407 pins are 5v tollerant, and got mixed results. So I thought I would ask here? Probably a safer bet just to tie a resistor to ground on that pin though. Using the max9926 as the VR interface with a 10k pull-up, so a 20k to ground should keep it happy.

Kind of excited to try RUSEfi on something, the problem with this ATV is there is just no room.
Attachments
BA955E50-68B2-4835-9B82-913F29968F92.jpeg
BA955E50-68B2-4835-9B82-913F29968F92.jpeg (95.62 KiB) Viewed 290 times
F0C797A2-4D8A-446C-8D06-D7828E4D3E1D.jpeg
F0C797A2-4D8A-446C-8D06-D7828E4D3E1D.jpeg (143.74 KiB) Viewed 290 times
204A9A8F-CCE4-4428-8AC9-1B6F83473C21.jpeg
204A9A8F-CCE4-4428-8AC9-1B6F83473C21.jpeg (86.11 KiB) Viewed 290 times

User avatar
AndreyB
Site Admin
Posts: 10873
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: Swapping over to RUSefi, 5v tolerance?

Post by AndreyB »

I am very confused. There are three kinds of signals:
analog inputs - totally not 5v tolerant
digital inputs - kind of OK to feed 5v
digital outputs - you would only output 3v

so which of those do you need when and why?

reminder that we have two non stm32 platforms available on rusEFI - Kinetis and Cypress.

Not sure what is the big picture so not sure if I am helping or not.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

mck1117
running engine in first post
running engine in first post
Posts: 629
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Swapping over to RUSefi, 5v tolerance?

Post by mck1117 »

is that the same plug as microRusEfi? What's the case look like?

Joey120373
donator
donator
Posts: 61
Joined: Sun May 17, 2020 8:46 am

Re: Swapping over to RUSefi, 5v tolerance?

Post by Joey120373 »

so which of those do you need when and why
I should have explained better, the analog input signals are buffered through voltage deviders and op amps, 3.3v max on those.

The digital outputs ( all 4, 2 injector drivers, and 2 coil drivers ) are 3.3v ( teensy 3.5 is a 3.3v micro ).

I only have the one digital input. The teensy 3.5 is 5v tolerant on most pins, any digital capable pin is 5v tollerant.

This board is mounted between the stock ECU and harness ( yes, it is exactly the same connector as the micro rus EFI )

Most all of the 44-46 or so wires that go to the factory ECM Simply pass through. I am reading all the analog signals, IAT,CLT,TPS,MAP and battery voltage with a voltage divider - opamp circuit.

There are 4, 3 pin jumpers on board that allow me to choose between letting the factory ECU controller control the 2 injectors and 2 coils, or letting the speeduino/RUSEfi take control of them.

The only 5v signal on the board is the primary tach. It’s a VR sensor. I am using a max9926 to read the VR sensor. The max9926 is configured to output a 5v signal.

Because I had to keep this small, it’s all built with very small SMD packages and 0603 sized passives, so modding the board is not particularly easy.

The STM32F407 board pictured is small enough that it doesn’t increase the footprint size of the board at all. So I simply ran a dozen or so jumper wires from the daughter board (that would normally have a teensy 3.5 soldered to it) to the STM32 dev board.

The code loaded onto the board just fine, and on the bench it’s talking to tuner studio and everything looks great. So next step is to put it on the ATV And see if I g can get the RUSEFI to fire the injectors/coils.

If the default STM32f407 tach input pin is 5 v tollerant then as it sits, the board is ready to go, it it is not I will just put a devider resistor to ground on that pin to cut the voltage down.

Hope that explained it well enough.

The reason I went with this pass through/piggyback approach is that on this machine, everything is controlled by the factory ECU, the electronic power steering, dash and 4 wheel drive system to name a few. I don’t care about trying to control any of that, I just want to tune the engine.

I’ll try to post a pic later today of the jumpered daughter board I built to use the STM32 board.

Much to do about very little at this point since a single resistor should make it safe. But I am curious to see how well the RUSEFI handles an odd fire angle Vtwin.

Thanks

Joey120373
donator
donator
Posts: 61
Joined: Sun May 17, 2020 8:46 am

Re: Swapping over to RUSefi, 5v tolerance?

Post by Joey120373 »

Ok, so I am no longer concerned with weather or not the tach input pin ( PC6 ) is 5v tolerant , as I am doing some trouble shooting on the VR circuit and adding a resistor is a no brain-er. Probably close this thread, as it’s probably not the correct place for where this project is headed. But I thought I would post some pics just to clear up any confusion, hopefully, about how this thing works.
Attachments
E65C90E2-5825-4FFB-BCB4-7A8DA69FD57F.jpeg
E65C90E2-5825-4FFB-BCB4-7A8DA69FD57F.jpeg (141.47 KiB) Viewed 256 times
5B053685-0142-4AE3-852B-34BFFEECF5C0.jpeg
5B053685-0142-4AE3-852B-34BFFEECF5C0.jpeg (122.71 KiB) Viewed 256 times
37531FC1-FEC4-4249-95BD-CE49A80C71CA.jpeg
37531FC1-FEC4-4249-95BD-CE49A80C71CA.jpeg (122.55 KiB) Viewed 256 times
B6938452-07C4-4812-945D-FD7EF32B7150.jpeg
B6938452-07C4-4812-945D-FD7EF32B7150.jpeg (119.65 KiB) Viewed 256 times
6FECF58D-36C6-4E64-8113-0ECC9030B99B.jpeg
6FECF58D-36C6-4E64-8113-0ECC9030B99B.jpeg (115.25 KiB) Viewed 256 times
7483B0E5-DEB7-47FC-9578-49CAD3052FBE.jpeg
7483B0E5-DEB7-47FC-9578-49CAD3052FBE.jpeg (128.61 KiB) Viewed 256 times

Gepro
Posts: 60
Joined: Sun Nov 01, 2020 2:15 pm
Location: France

Re: Swapping over to RUSefi, 5v tolerance?

Post by Gepro »

AndreyB wrote:
Fri Nov 20, 2020 2:11 am
I am very confused. There are three kinds of signals:
analog inputs - totally not 5v tolerant
digital inputs - kind of OK to feed 5v
digital outputs - you would only output 3v

so which of those do you need when and why?

reminder that we have two non stm32 platforms available on rusEFI - Kinetis and Cypress.

Not sure what is the big picture so not sure if I am helping or not.
I am very confused too !
Is there any problem to put 5v in analog inputs ? I was thinking that over 3.3v the stm is no more capable to read value but can handle the 5v.

Joey, the STM can handle 5V ONLY if it had 3.3v or 3.6v voltage on it. With your board it's probably, 3.3v, so no problem. But, between 1.8 and 3.3v, it's a problem.

For information, there is STM32 for industrial use, it has a better temperature range.
from datasheet :
"Temperature range
6 = Industrial temperature range, –40 to 85 °C.
7 = Industrial temperature range, –40 to 105 °C"

Why do you use it like a Piggyback ?! Can't you go for standalone ?
Last edited by Gepro on Fri Nov 20, 2020 7:01 pm, edited 1 time in total.

User avatar
AndreyB
Site Admin
Posts: 10873
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: Swapping over to RUSefi, 5v tolerance?

Post by AndreyB »

Gepro wrote:
Fri Nov 20, 2020 5:24 pm
Is there any problem to put 5v in analog inputs ? I was thinking that over 3.3v the stm is no more capable to read value but can handle the 5v.
5v into analog input would destroy stm32f4
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Joey120373
donator
donator
Posts: 61
Joined: Sun May 17, 2020 8:46 am

Re: Swapping over to RUSefi, 5v tolerance?

Post by Joey120373 »

Why do you use it like a Piggyback ?! Can't you go for standalone ?
Mainly because I just want to tune fuel and spark. The stock ECU on this ATV also controls the electronic power steering, feeds info to the dash and controls thw 4wd system to some degree. All thing that i have no desire to reverse engineer. I just want to tune fuel and spark, and with that in mind it just takes a very small board to monitor all the analog signals, crank sensor and a handfull of drivers to tke over control of the injectors and coils.
its pretty plug and play. I could take over control of the idle air control valve if i wanted to but there really isn't a need to.

The analog inputs are all filtered, voltage divided and fed through op-amps, then there are some TVS diodes to protect the analog inputs.
Realy just a simple, small and easy design.

Gepro
Posts: 60
Joined: Sun Nov 01, 2020 2:15 pm
Location: France

Re: Swapping over to RUSefi, 5v tolerance?

Post by Gepro »

OK :) I was curious about it.

So it's more a standalone than a piggyback for the engine control part.
It's a really cool project.

Thanks, AndreyB for answer :D

Post Reply