1
\$\begingroup\$

Sorry if this has been asked before, but I searched for a while and didn't find anything that exactly answered my question.

I would like to sense the "dummy lights"(oil, neutral, etc.) in my motorcycle with my mBed. The bike runs of a 12v battery and the mBed senses at 3.3v. Now I know I can use a step-down to sense the output, but because it's a noisy system don't I want to use a optoisolator?

\$\endgroup\$
3
\$\begingroup\$

If everything is at a common ground, then a simple resistor divider might be good enough. However, there can be nasty spikes on the 12 V power. If these spikes can get to the 12 V signals you are trying to detect, then you should include some additional clamping circuitry.

All around, a opto-isolator might be a good idea, especially if this is a one-off where you're not worried about volume production costs. You probably don't need the common mode isolation the opto provides, but it is a simple way to just not have to worry about ground bounce and the nasty power spikes. I'd go with the opto solution to play it safe. It's really not that much more complicated or expensive.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ You could filter the spikes with just a large bypass cap so the RC rolls off at 5Hz or so. For example a 10K ohm in series with 10uF will give you about 1.5Hz. Then just pick the shunt so 14V gives you ~3.3V (most batteries will be at 14.0-14.2V when charging). \$\endgroup\$ – user6972 Jun 24 '13 at 16:59
  • \$\begingroup\$ @user: Then you have a very slow digital edge, so make sure this only goes into a schmidt trigger input. If you're going to go so far as clamping or low pass filtering, you can just as well use a resistor divider feeding the base of a NPN. Then you don't need clamping or filtering at all. Then again, a single resistor and opto-isolator isn't any more complicated. \$\endgroup\$ – Olin Lathrop Jun 24 '13 at 17:07
  • \$\begingroup\$ you will also want a diode across the opto input to clamp the maximum reverse voltage, which could be as much as -90V, far exceeding the maximum reverse voltage of most optoisolators. \$\endgroup\$ – Phil Frost Jun 24 '13 at 17:18
  • \$\begingroup\$ Is the supply really that bad? If the pulse duration is short enough it might be filtered out. Sounds like it will fry the mBed system too. How is that going to be powered? And since he's using software to sample the signal he can just just debounce the slow RC filtered input in software. \$\endgroup\$ – user6972 Jun 24 '13 at 17:48
  • \$\begingroup\$ Most signals are slow, but hall effect sensors for RPM and speed will be much faster (upwards of 4/6 pulses per rotation, which could be 20K RPM) \$\endgroup\$ – Eric Fossum Jun 24 '13 at 18:22

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.