DIY Hall input board

Hardware inside and outside of the ECU
Post Reply
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

DIY Hall input board

Post by AndreyB »

Let's put together a simplest board.

The simplest board would be a board for Hall type wire sniffing - the board would have an LED to blink together with the signal in the wire and it would let us connect the discovery board to the wire running from the Hall sensor to the ECU without disruption.

For this project, we will need:
1) a breadboard
2) some jumper wires: three male-male wires and four male-female wires
3) a LED
4) a resistor to keep the LED alive. LEDs do not like too much current, a typical 5mm led needs 150 Ohm resistor if we are running at 5 volts.
5) a single-supply, rail-to-rail operational amplifier (op-amp). I have used OPA2340 - that's Digikey part no OPA2340PA-ND. Someone should use MCP6002-I/P-ND just to try it, this one is much cheaper.

We will be using only channel B of this dual-channel amplifier.

On the picture, the black wire is ground - that's pin 4 of the chip (pins are counted anti-clockwise starting from the circle mark on the plastic)
The green wire is input, it's where the hall sensor wire is connected. This green wire is connected to pin 5 of the op-amp chip.
One of the yellow wires goes from pin 6 on the op-amp to the PC6 pin on the discovery board. Another yellow wire connects pin 5 to pin 6, that's the voodoo magic of op-amps.
The red wire supplies the op-amp though pin 8.

The resistor goes from pin 7 to the longer lead of the LED. The longer lead of the LED is called anode but that's not really important :)
The short lead of the LED is ground.

We are expecting the LED to blink with the signal - it should be obvious blinking at idle and faster blinking if you rev it.

Image

Tomorrow I will draw the schematic and that would make everything much more simple :) That's in case no one would publish this schematic before I do.
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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: DIY Hall input board

Post by AndreyB »

There is a number of great reference sheets at http://www.akafugu.jp/resources/
Worth posting here I think

Image
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
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: DIY Hall input board

Post by AndreyB »

Here is how it should look when you get everything together

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
skeeters_keeper
Posts: 44
Joined: Fri Nov 08, 2013 3:18 am

Re: DIY Hall input board

Post by skeeters_keeper »

OPA2340 - that's Digikey part no OPA2340PA-ND. Someone should use MCP6002-I/P-ND just to try it, this one is much cheaper.
The MCP6002 is 1Mhz and the OPA is 5.5Mhz - is the MCP going to be fast enough? There are a few other differences too (input current etc) - and I don't know enough about how its being used yet to know if that's going to matter. If these should work I'm going to order a few, and probably 1-2 of the OPA2340s as well just incase they end up not working.
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: DIY Hall input board

Post by AndreyB »

skeeters_keeper wrote:The MCP6002 is 1Mhz and the OPA is 5.5Mhz
Our engine is 1Khz tops. I think 1Mhz or 5Mhz would not do the difference, especially for slower applications like coolant temp and even throttle position.

If would be great if you can order a couple of both, compare and tell us if you have noticed any difference.
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
skeeters_keeper
Posts: 44
Joined: Fri Nov 08, 2013 3:18 am

Re: DIY Hall input board

Post by skeeters_keeper »

OK. I ordered 10 of the MCP6002 and one of the others so I have something to compare against.
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: DIY Hall input board

Post by AndreyB »

Finally the schematic

Image

There is a bit of flexibility on the resistor - while 1K is recommended, 150Ohm and anything in between would work also.
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
hasse.69
donator
donator
Posts: 77
Joined: Wed Dec 04, 2013 3:34 pm
Location: Sweden Linkoping/Vadstena

Re: DIY Hall input board

Post by hasse.69 »

"Electronically challenged of the world, unite!"
Yaban
Posts: 12
Joined: Thu Jul 12, 2018 8:35 pm

Re: DIY Hall input board

Post by Yaban »

Maybe it's newbie question but why you need a opamp to enter a hall sensor in a ecu io pin ? A pullup resistor is not enough with rusefi ?
Can you explain the reason.
Thank you
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: DIY Hall input board

Post by kb1gtt »

Op-amp circuit is a generic input buffer. You can do it with out the op-amp. However the Frankenso's inputs allow far more than just a hall sensor.
Welcome to the friendlier side of internet crazy :)
Yaban
Posts: 12
Joined: Thu Jul 12, 2018 8:35 pm

Re: DIY Hall input board

Post by Yaban »

Basically im megasquirt experienced that's why I don't understand well what is the philosophy of rusefi hardware. An io pin for trigger input need two informations basically. 1 or 0. Hall sensor mostly switch to the ground need a pull up resistor.....
Vr sensor the most easily way I've find is lm1815 vr conditioner.... That also switch to the ground with a pullup resistor....
I hardly understand why you use all the places opamp for dealing with sensor that mostly are just variable resistor or 1-0 switch signals.
Noise filtering or just to adapt 5v circuit with 3.3v mcu ?
User avatar
Zeiss
Posts: 110
Joined: Tue Oct 05, 2021 6:32 pm
Location: Germany
Github Username: HeinrichG-V12

Re: DIY Hall input board

Post by Zeiss »

What you see on Andrey's circuit is a so-called "voltage follower". The sensors are normally not able to supply current, they only supply level (0 or 1, with TTL 0v or 5v). This means that input from MCU / ECU must be very high impedance, otherwise the voltage will breakdown. An ideal OpAmp has an infinite input resistance and does not load (current) the sensors. The output of the OpAmp can deliver current (OP2340 up to 10mA) and with this you can drive the LED at the output.

This is a standard circuit, which is very often used as an input stage.
Regards,
Heinrich

My GitHub
gurov
Posts: 29
Joined: Wed Feb 07, 2024 10:43 pm
Location: nj
Github Username: ggurov
Slack: ggurov
Contact:

Re: DIY Hall input board

Post by gurov »

https://www.amazon.com/gp/product/B0BC7FM7FD/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

i've used these boards with pretty good success for hall input/AC request shield against whatever the dash decides to send my way. can probably use it for other stuff as well.

it's a 4 channel TLP281 optocoupler with an npn transistor at output to correct inversion and be able to drive a different voltage level.

neat package.
1994 6speed supra turbo [ single turbo/1000cc ID/twin fuel pumps/bc2 262 cams ]. J&S safeguard knock control , UAEFI
/ AEM EMS v2 / MS3pro PNP / Speeduino (mega2560)
2020 BMW X3m - bootmod3 stage1
Post Reply