Вопрос

This is most likely a very dumb question, so my apologies in advance.

I have a potential client that has had others make the claim that the values we receive from certain Android devices' magnetic sensor can be put through a formula (using Time) to actually calculate nearby voltage. The idea is to test fairly small voltage amounts (around 5-7v) using the device when held near it.

I have looked through documentation after documentation, and we have played around with existing calculations that some people have offered, but nothing seems to solidly work. It does seem interesting that the X/Y/Z values do indeed change dramatically when held close to the voltage-producer (they seem to go into the negative for the most part), but there doesn't seem to be a solid way to convert the values to voltage, when I take into account what those x/y/z values are when held away from the source of voltage (they stay around the same, but only positive).

I understand that the actual magnetic field can be found via the formula SQRT(x^2+y^2+z^2), but I have not found a solid algorithm for converting that to voltage.

Sorry again for the dumb question, but is something like this even possible? I figured this was the right place to ask. Thanks so much in advance!

Это было полезно?

Решение

This isn't a programming question. It's physics. You CANNOT measure voltage indirectly using Android sensors. You can measure a magnetic field but you cannot derive a voltage from that without other information, which you cannot measure. For example, I can charge something to a million volts, and have a very large electric field but a very small magnetic field. Equally, I can push 10 amps at 12v through a coil and get a huge magnetic field.

When you say "close to a voltage-producer", I assume that you mean a mains cable or a generator? What you're measuring there is magnetic field, not voltage. As an example, do your test near to a mains cable supplying a large load, say 10A. Now turn off the appliance (not at the wall outlet, at the appliance) and do your test again. You will see a much smaller value but the cable is still at 240v (or 115v or whatever it is in your country). It's just that there is no current flowing, perhaps some small residual leakage, but the whole cable is still at the same potential voltage (for purists reading, I'm ignoring the insignificant reduction in voltage when the device is on....)

Start off by reading "Maxwells' Equations".

PS. There are sensors that can measure voltage remotely, but they don't come in phones!

Cheers

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top