Page 1 of 1

Swapping over to RUSefi, 5v tolerance?

Posted: Thu Nov 19, 2020 11:40 pm
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.

Re: Swapping over to RUSefi, 5v tolerance?

Posted: Fri Nov 20, 2020 2:11 am
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.

Re: Swapping over to RUSefi, 5v tolerance?

Posted: Fri Nov 20, 2020 2:40 am
by mck1117
is that the same plug as microRusEfi? What's the case look like?

Re: Swapping over to RUSefi, 5v tolerance?

Posted: Fri Nov 20, 2020 10:54 am
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

Re: Swapping over to RUSefi, 5v tolerance?

Posted: Fri Nov 20, 2020 2:43 pm
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.

Re: Swapping over to RUSefi, 5v tolerance?

Posted: Fri Nov 20, 2020 5:24 pm
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 ?

Re: Swapping over to RUSefi, 5v tolerance?

Posted: Fri Nov 20, 2020 5:57 pm
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

Re: Swapping over to RUSefi, 5v tolerance?

Posted: Fri Nov 20, 2020 6:59 pm
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.

Re: Swapping over to RUSefi, 5v tolerance?

Posted: Fri Nov 20, 2020 7:18 pm
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