You are on page 1of 2

2/26/2017 Interfacingof8VhalleffectsensorwithmicrocontrollertomeasureRPMElectricalEngineeringStackExchange

signup login tour help

_
ElectricalEngineeringStackExchange Here'showitworks:
isaquestionandanswersitefor
electronicsandelectricalengineering
professionals,students,and
enthusiasts.Jointhemitonlytakesa
minute:
Anybodycanask Anybodycan Thebestanswersarevoted
aquestion answer upandrisetothetop
Signup

Interfacingof8VhalleffectsensorwithmicrocontrollertomeasureRPM

IamusingahalleffectsensorformeasuringtheRPMoftheengine.TheoutputofthissensorneedstobefedintotheECU
(forenginecontrol)andMicrocontroller(Iamcontrollingalinearmotorbasedonengine'sRPM).TheECUisprovidingthehall
effectsensor8Vsupply,thereforetheoutputofsensorwillbeeither0V(LOW)or~8V(HIGH)butformymicrocontroller
digitalinput,Ineed05V(IwillmeasurethefrequencyofdigitalinputusingmymicrocontrollertogetsenseofRPM).

SobasicallyIneedtocovert0~8Vto05V,what'sthebestmethodofdoingthis?

microcontroller

editedFeb2'14at18:44 askedFeb2'14at7:56
JYelton user36524
14.3k 24 70 135 21 3

1 Voltagedivider,andperhapsaddazenerforsafety.Pleasesearchthroughthissite,thereareseveral
variantsofthisquestionoutthere.AnindoGhoshFeb2'14at7:59

2Answers

Asthepurposeofreadingthesignalatthemicrocontrolleristoobtainthepulse
rate,andnotactualdetailedwaveforms,allthatisneededisforthesignalatthe
GPIOtobenearzerofor0Voltinput,andreasonablyhigherthantheGPIO's"High"
thresholdfor~8Voltinput.

Theschematicbelowwillprovidea0to~4.7Voltsignalthatcanbeusedforthe
GPIO.FeelfreetouseothercombinationsofR1andR2totweakthedesired
voltage.ThezenerprotectstheGPIOagainstspikesfromtheECU,ifany.

simulatethiscircuitSchematiccreatedusingCircuitLab

answeredFeb2'14at8:08
AnindoGhosh
43.5k 7 72 153

ThesimplestmethodyoucanuseiswithasingleSchottkydiodeinaconfiguration
likebelow:

http://electronics.stackexchange.com/questions/98512/interfacingof8vhalleffectsensorwithmicrocontrollertomeasurerpm 1/2
2/26/2017 Interfacingof8VhalleffectsensorwithmicrocontrollertomeasureRPMElectricalEngineeringStackExchange

simulatethiscircuitSchematiccreatedusingCircuitLab

Themcucanhaveawidesupplyrange,theconfigurationwillworkwitheither3.3v
or5vetc.
Ifthemcudoesn'thaveaninternalpullupyoucanuseanexternalresistorpulling
theinputtoVcc.

Whentheoutputofthehallsensoris8vthenthediodedoesn'tconduct(reverse
biased)andthemcuinputstateissetbythepullupresistortohigh(Vcclevel).
Whentheoutputofthehallsensoris0vthenthediodeconductsandpullsthe
mcuinputlowtoabout0.3vwhichrepresentslowlogicstate.

answeredFeb2'14at12:06
alexan_e
8,962 1 12 37

http://electronics.stackexchange.com/questions/98512/interfacingof8vhalleffectsensorwithmicrocontrollertomeasurerpm 2/2

You might also like