A different approach.

It's all about the code!
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: A different approach.

Post by roflcopter »

The RPM signal will be isolated from the injector circuitry, but to begin with I'm not going to be doing PWM on the injectors, just turn it on and leave it on while I check all the values, then put it on like a 50% duty cycle and see what the voltage tops out at. I can also wire it to a pullup input pin on the board and monitor the voltage that way, I think it would work without interfering with the circuit as a whole.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: A different approach.

Post by kb1gtt »

Diodes to 5V rail will only protect after the MCU IO pin has gone beyond 5V which means the MCU pin exceeds the ratings, so fail. The diode really does want to go to the MCU +V pin, your saving grace is that it shouldn't ever need to conduct.

You are correct the MOSFET should prevent these issues from coming back up the wires to the MCU, however the MOSFET gate is a single barrier from the over-voltage protection(OVP). As well the OVP is a zener style diode that dumps some current to the gate to turn it on when you hit the clamping voltage. If either this zener like diode or the gate get a small crack in them, then you'll have a high risk of the injector energy crossing over into the gate of the MOSFET. If that happens then you want some additional protection to the MCU as it's often an expensive-ish part and often is kind of hard to replace.

I would suggest you start with an LED and resistor to simulate the injector. Make it blink first. Use a resistor above or equal to 1k for a 12V supply voltage. Once you now that works, then try the injector.
Welcome to the friendlier side of internet crazy :)
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: A different approach.

Post by roflcopter »

Thanks for the explanation, I'm kind of learning as I go. If I have the diode going to the 3.3V pin off the board, then even if it somehow manages to conduct, it will be putting voltage onto a 5V tolerant pin(one of them at least, no clue if the 3.3Vout pin on the board is 5V tolerant), I think.

Anyways, I'll test it with a LED and resistor first and make sure it seems correct. If it is, I won't be able to mess with anything on the car until next week... although... I do have a Volvo sitting in the garage I could try to slap it on...
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: A different approach.

Post by kb1gtt »

Also with some luck, you'll only dump say 2mA and the MCU will consume say 3mA. if that happens, then all is good. However if the transient dumps say 10mA, and the MCU only consumes 3mA, that's bad, but better than blowing a pin directly.

No problems with learning as you go. I've been there and I'm willing to help those that are putting in a good effort.
Welcome to the friendlier side of internet crazy :)
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: A different approach.

Post by roflcopter »

Thank you for putting up with my questions and (probably wrong) assertions along the way. I really do read and try to understand everything people tell me, but my communication style sometimes puts people off when I restate things wrongly.

At this point I am just in need of a working system, which I'm going to test my friends setup and see what happens, but as far as your schematics go.. what exactly do I need to do? I saw the 6-channel board that is in the other thread, and i saw that it could be purchased through some site, but is there a way to make it easily?
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: A different approach.

Post by AndreyB »

roflcopter wrote:I saw the 6-channel board that is in the other thread, and i saw that it could be purchased through some site, but is there a way to make it easily?
My plan is to solder it myself. $5 worth of solder paste from http://kd5ssj.com/solderpaste/smt-tools-and-process makes soldering this size pretty manageable.
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
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: A different approach.

Post by roflcopter »

That's a 2-layer board that it needs to go on though right? Are you buying it printed then just soldering your components on?
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: A different approach.

Post by AndreyB »

roflcopter wrote:That's a 2-layer board that it needs to go on though right? Are you buying it printed then just soldering your components on?
Are we talking about http://oshpark.com/shared_projects/IIL9xWih ? Yes it's a 2-layer board. I have ordered a set of three yesterday, you can either order yourself or wait till I get mine because I probably would not need three pieces. I am expecting to get them around Dec 2nd.

Yes the plan is to get the boards in the mail and solder the needed components on them.
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
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: A different approach.

Post by roflcopter »

russian wrote:Are we talking about http://oshpark.com/shared_projects/IIL9xWih ? Yes it's a 2-layer board. I have ordered a set of three yesterday, you can either order yourself or wait till I get mine because I probably would not need three pieces. I am expecting to get them around Dec 2nd.

Yes the plan is to get the boards in the mail and solder the needed components on them.
That's the board I was looking at, which is @'s design right? Let me know what all you end up using and I could be interested in one of them for sure.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: A different approach.

Post by kb1gtt »

I did the general design work and PCB layout, @ had a bunch of input along they way so it should work well for his test bench setup. The goal with it was low costs, DIY friendly soldering, and fits the STM32F4 nicely. I plan to make a similar board that can be snapped onto this board, which will probably include 2 more low side drives, and some high side drives.

What's your general application and goal? What other circuits do you need?
Welcome to the friendlier side of internet crazy :)
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: A different approach.

Post by roflcopter »

kb1gtt wrote:What's your general application and goal? What other circuits do you need?
Basically, I just need to be able to drive injectors(4 for now, but functionality for more later would be good) in a lowside configuration(seems most injectors are set up this way) and down the road I will need a way to drive COP ignition coils. The inputs should be able to connect straight to the board, all of the sensors will be my own(not the stock ECU ones) and will all be 3.3V running from the board back to analog inputs on the board.
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: A different approach.

Post by roflcopter »

Image

And we have lift-off!!

...or at least an injector that cycles when I tell it.
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: A different approach.

Post by AndreyB »

Love the table surface, you can see it has some history...

Oh, and congrats on the lift-off! :)
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
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: A different approach.

Post by kb1gtt »

Nice. Also as an FYI, have you seen the OLIMEXINO-STM32? It has several automotive friendly options, like the power regulator and CAN via screw terminal.

Congrats, and what's the next step?
Welcome to the friendlier side of internet crazy :)
jedediah_frey
contributor
contributor
Posts: 51
Joined: Tue Nov 05, 2013 1:43 pm

Re: A different approach.

Post by jedediah_frey »

kb1gtt wrote:Nice. Also as an FYI, have you seen the OLIMEXINO-STM32? It has several automotive friendly options, like the power regulator and CAN via screw terminal.
That's quite the little board: https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/

> DCDC power supply allows power input voltage from 9 to 30V DC thus making it possible to take virtually any power supply adapter on the market, and to enable applications which are in the industrial power supply of 24VDC.

> Li-Ion rechargeable battery power supply option with a BUILD-IN on board charger, so that when you attach a battery, it is automatically charged and kept in this state until the other power source (USB or external adapter) is removed and then it will AUTOMATICALLY power the board - no jumpers, no switches!

> Separate voltage regulator for the Analog part, which allow the ADC to be read correctly without the digital noise pickup.

It would be a nice intermediary between a full custom board and the Discovery.
CAN via screw terminal.
Have you had an opportunity to look at the CAN ports on the Discovery yet? Are they wide voltage compatible or am I going to need to build a buffer them/level shift? A side project of mine is to decode my wife's Leaf and my VW Golf's CAN. (Another reason I independently came up with the STM32F4xx series to work with.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: A different approach.

Post by kb1gtt »

I believe a buffer is required, but don't quote me. The above noted Olimex board schematic shows a MCP2551-I/SN used for CAN buffering. I seem to recall the CAN buffer can be obtained on a small board for low $.
Welcome to the friendlier side of internet crazy :)
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: A different approach.

Post by roflcopter »

That board looks pretty nifty, and the fact that it uses the same IDE, and by assumption OS, then that means that all my code should be more or less a direct port. The built in microsd storage and beefier voltage regulator are definitely big pluses. Who wants to pick one up and give it a whirl? chibios/rt also can be run on the maple, so it should work on this board, which means that all of the rusEFI stuff should work just fine too.

The next step for me is duplicating the circuit and hooking it up to a car to truly test my scheduling and fuel delivery assumptions. Hopefully I can at least get it to fire, then idle with some tweaking.
Post Reply