Infineon controller and MXUS regen hall sensor disturbance

elt93

10 mW
Joined
Jul 21, 2016
Messages
33
Hi Guys,
I have deactivated slip regen and am now having it only on the brakes. I am using the digital signal from the hall sensors on the cycle analyst plug to feed a MCU which then estimates velocity based on the time period between each pulse. However, for some reason, every time I brake and therefore activate regen braking, the digital signal gets completely disturbed and I get very high irrelevant velocity values. What is this due to and how can I solve it?
Thank you!
 
It might help if you show a complete wiring diagram, so we can see how signals and grounds are laid out, and pics of the wiring on the bike to see how it's physically set up.
 
I will produce a diagram but the setup is very classic. 14S battery plugged to an INFINEON 12fet controller which is connected to a throttle, ebrakes, phase motor wires and a main power switch. I am taking the digital motor hall sensor signal out of the cycle analyst plug of the controller and plugging it directly into one of the digital pins of the MCU which counts the time between each pulse to output a velocity based on the wheel diameter and the fact that there are 23 pulses per revolution. Everything works perfectly but when and only when regenerative breaking kicks in.
 
Probably noise on the hall signal line then; you'd need to use an oscilloscope to see the actual issue.

If you're using an analog input on the MCU you could use some form of software filter to ignore anything other than full-range signals.

If you're using a digital input on the MCU then you could use an RC filter on the signal line before it reaches the MCU, calculated to filter out anything above the frequency of the max RPM you'd see on the line.
 
Thanks amberwolf, you are right, it was noise! I tried using a RC filter but it wasn't good enough so I'm using a sampling filter on the digital input of my MCU which is now doing the job fine!
 
Back
Top