1
\$\begingroup\$

I am working on a Data Acquisition project using Arduino Due for petrol scooters where I am trying to collect 6 types of data - acceleration, location, brake, throttle, horn and RPM of the wheel. I'm using the BNO055 9 axes IMU shield to collect acceleration data, GPS shield to get location, and a 44E hall effect sensor + magnet to collect RPM data. I am pulling the hall effect sensor using INPUT_PULLUP command in the IDE and not using an external resistor (I hope that's okay). The throttle data is directly given to an analog pin on the Due (I'm using an electronic throttle which has a hall effect sensor inside it). For the brake and horn (it's a mechanical horn), I am using a potential divider that gives an output of 3.3V, to give it to the digital pins (I am recording the instances at which the brake and horn is pressed). The Due is being powered by the 12V lead acid battery on the scooter. The throttle and the hall effect sensor that I'm using for RPM is powered by the 3.3V onboard regulator on the Due. All the data is logged on the SD card at a frequency of 5Hz. I am facing a certain issue with the horn and RPM data, and here it is -

Every time I press the horn, the RPM data goes boink. Even pressing the indicators corrupts the RPM data which is weird, as I am not even collecting indicator data. The more I press the horn, the more crazy the RPM data goes; sometimes it touches 1000-2000 RPM which is absolutely wrong. But when I dont press the horn, I get the correct RPM data. Why is this happening? Why does the horn affect only RPM data? Is it because, the hall effect sensor works on magnetic field and the horn is an inductor which generates a huge amount of magnetic field? Or, because the Arduino and the horn are powered from the same source and hence have a common ground? Is there a way to isolate or filter the noise from the horn?

\$\endgroup\$
  • \$\begingroup\$ You can improve your question be including a schematic (the site includes a handy schematic editor tool), to get more feedback. Have you tried using an external pull-up? The internal one may be too weak to overcome EM noise from the horn. It could also be magentic. If you can put a scope on your power supply to the chip and Hall effect it might be useful. \$\endgroup\$ – AngeloQ Mar 6 '17 at 12:38
  • 1
    \$\begingroup\$ Possible duplicate of Horn disturbs controller and lcd on common power source \$\endgroup\$ – Enric Blanco Mar 6 '17 at 12:38
  • \$\begingroup\$ Hey @AngeloQ, thanks a lot. I will put a schematic soon. Also, I will try with an external pullup resistor to see what happens. I think I had tried doing that before, but to no avail. I can arrange for a scope, but this will take a few days. \$\endgroup\$ – Sohil Mehta Mar 6 '17 at 12:51
  • \$\begingroup\$ @Enric, before posting the question I searched a lot for similar problems, but I dint come across this particular link. Don't know why. I will check this out. Thanks a lot! \$\endgroup\$ – Sohil Mehta Mar 6 '17 at 12:52
  • \$\begingroup\$ SKetch out your Grounds, in detail. And sketch out your Power, in detail. Look for shared wiring, where sensistive circuits share wires with fast-high-current circuits. \$\endgroup\$ – analogsystemsrf Mar 6 '17 at 16:06
0
\$\begingroup\$

Is it because, the hall effect sensor works on magnetic field and the horn is an inductor which generates a huge amount of magnetic field?

Possible. However you say the problem also occurs with the indicators, which should not produce large magnetic fields.

First suspect would be the wiring to your RPM hall effect sensor. Make sure it is shielded, use a stronger pullup, and of course a small filter capacitor at the receiving end to kill HF noise spikes.

Since your hall sensor is powered, a small decoupling capacitor right next to it could help.

It would be a good idea to post scope waveforms from the output of the sensor when the problem occurs.

I presume you don't have any ground loops in your wiring, which might force currents through your pcb?

\$\endgroup\$
  • \$\begingroup\$ Thanks for these ideas. I am more of a software person. I am trying to improve my hardware knowledge. I will definitely add these caps that you suggested. I haven't shielded my hall sensor. What kind of shields are you talking about? Snubbers ? Ferrite shields? \$\endgroup\$ – Sohil Mehta Mar 6 '17 at 13:04
  • 1
    \$\begingroup\$ Your signal is slow, but your micro's inputs are fast enough to detect HF noise and spikes. If you expect your sensor to output, say, maximum 50 Hz (ie, 3000 rpm), then putting a RC filter with cutoff at, say, 1 kHz will remove most of the high-frequency spikes which could couple into your wires. \$\endgroup\$ – peufeu Mar 6 '17 at 13:10
0
\$\begingroup\$

It could be a microphonic effect from ceramic components (capacitors), picking up the vibration produced by the horn's sound pressure level and converting it into voltage variations.

Try to mechanically/acoustically isolate your circuit from the horn and see whether the effect is mitigated or not.

EDIT:

How to mitigate microphonics?

  1. First, try to isolate the horn as the culprit of your interferences before anything else. Detach the horn from the bike and mute it (padding it with foam, clothes, whatever). This way you will be able to horn in order to crosscheck whether its sound pressure level and vibrations are the cause of the interference. However, keep it at a similar distance of your PCB just to be able to see if it's a EM interference.

  2. Acoustically/mechanically isolate/decouple the PCB from the horn. Don't attach the PCB to a stiff surface that can couple to it the vibrations caused by the horn. Use mechanical mounts (both for the horn and your circuit that damp vibrations). Also, use acoustic foam around PCB to reduce SPL levels, put it inside a box, use potting, etc.

  3. Replace ceramics with equivalent electrolytic and film capacitor when possible and convenient.

\$\endgroup\$
  • \$\begingroup\$ Can you give me ideas to mechanically/acoustically isolate the circuit? Sorry I haven't really worked much on hardware before in my career. I am noob to electronics. Meanwhile, I will google that too. Gosh! you guys are amazing. \$\endgroup\$ – Sohil Mehta Mar 6 '17 at 13:07
  • \$\begingroup\$ I've edited the answer to add that. \$\endgroup\$ – Enric Blanco Mar 6 '17 at 16:33
  • \$\begingroup\$ Thanks @Enric. These ideas are so interesting. I have completely understood what you are saying. I will get back to you guys after a bit of testing for the next few days. \$\endgroup\$ – Sohil Mehta Mar 7 '17 at 7:20
  • \$\begingroup\$ I'd bet a lot of money it's just the crappy electrical system of the average scooter. Most of them the headlamp brightness varies proportionally with engine RPM. \$\endgroup\$ – John U May 10 '17 at 9:09
  • \$\begingroup\$ This problem has been solved. After analysing waves on a CRO, I added a stronger pullup resistor, and decoupling caps at the input and output of the hall-effect sensor, and this problem was taken care of. Thank you guys for all the help. \$\endgroup\$ – Sohil Mehta Aug 7 '17 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.