1
\$\begingroup\$

I am working on a device i can strap on to an expensive electronics instrument, and when someone moves the instrument, the device detects it and sends its position from a GPS to a server, via WiFi, where people can do a look-up on the instruments last known location.

The device will need to run on a battery, so the whole setup needs to be as power efficient as possible.

The WiFi chip i am using is the ESP8266. Not a big surprise, i know, but it has a decent range, doesn't consume much power in sleep mode (around 20uA if memory serves me right) and is cheap as wood.

Next challenge. I need a way to detect movement in a "as low power as possible" way, so i went digging, and found a couple of ways. There is a kind of switches that can detect movement, either by rolling a ball to make contact or by moving a spring to make contact (Spring switch), but i want it to be omni directional, so no "rolling ball switch", and i want it to be sensitive enough to detect when the instrument is moved, and i haven't been able to find a "spring switch" with enough sensitivity.

There is also the possibility to use an accelerometer to detect movement, but that consumes a lot of power. At least, that's what i believe.

But! I found an accelerometer which i think gives a power saving way to wake the ESP8266 when movement is detected. The accelerometer is a MMA7660FC, made by NXP (Datasheet). In the datasheet on page 13, under "Auto-Wake/Sleep", i interpret what they write as the accelerometer can sleep until a directional change is detected and provide an interrupt signal, which i can use to wake up the ESP8266!

So, here comes the two questions i have:

  1. Is what i am saying about the MMA7660FC true? Its not the ideal solution because of the current it will draw, even if it is sleeping, but it is better having to change the battery a little more than having a failed project.
  2. Is there a way to detect movement that i have missed and is useful for my application?

Thanks in advance :)

\$\endgroup\$
  • \$\begingroup\$ but i want it to be uni directional That can be done with these switches as well, just use 3 for X,Y and Z direction. I once build a prototype like this just for fun and indeed it detects almost any movement. There are also spring (coil) based switches which detect acceleration. These are used in automatic bicycle lights. \$\endgroup\$ – Bimpelrekkie Aug 17 '17 at 11:40
  • \$\begingroup\$ Hmm, never thought about it that way. If one could buy a "rolling ball switch" with all three axis included, that would be really useful in this situation. But i am trying to keep the footprint to a minimum as well, so if i can do it without three ball switches, that would be best. I did try with the spring based switch, as i wrote, but the ones i could find wasn't sensitive enough, so i left that idea again. \$\endgroup\$ – Fiskelord Aug 17 '17 at 11:44
  • \$\begingroup\$ You did say "its position from a GPS". So, wake up periodically (say, every hour, or vary according to your power budget and needs) and check the GPS position. If it's different, it's moved. \$\endgroup\$ – Brian Drummond Aug 17 '17 at 11:45
  • 1
    \$\begingroup\$ Personally I think the GPS position might give issues as GPS by itself is not that accurate to reliably detect movement of a few meters or tens of meters. Also, accurate positioning with GPS requires the GPS to be on for some time and that eats batteries. Besides that it is often so that GPS reception inside a building is very bad and unreliable. \$\endgroup\$ – Bimpelrekkie Aug 17 '17 at 11:47
  • 1
    \$\begingroup\$ You could use a ST LIS2DE12 motion sensor. It can be configured to generate an interrupt on movement larger than a configurable threshold. It consumes a couple of uA. \$\endgroup\$ – Peter Karlsen Aug 17 '17 at 11:58
0
\$\begingroup\$
  1. Your assumption about the MMA7660FC is correct. It can generate an interrupt for your controller in its "Active Mode". In this configuration the device draws 47 μA.
  2. A better solution would be using this 3-axis accelerometer from ST LIS3DH. It does exactly the same thing, but using 2 μA instead.

I would say this is the most low-power solution for what you are describing. Hope it helps you.

\$\endgroup\$
  • \$\begingroup\$ Thanks, exactly what i was looking for. It really is hard to find a suitable component, no central place to look it up, so i really appreciate it! \$\endgroup\$ – Fiskelord Aug 20 '17 at 17:17
  • \$\begingroup\$ @Fiskelord I frequently use www.digikey.com to look up parts in scenarios where I don't know where to start. \$\endgroup\$ – Martin Aug 20 '17 at 18:04
  • \$\begingroup\$ @Fiskelord would you be able to share your solution with LIS3DH? I am looking to build something similar and would love to use your solution. \$\endgroup\$ – rams Oct 12 '17 at 11:23
  • \$\begingroup\$ @rams I would love to, but the project is intellectual property of the place i work at, so i would get in trouble if anyone finds out that i shared the project. I can say, however, that the LIS3DH works terrific when used like this. Easy to recommend \$\endgroup\$ – Fiskelord Oct 13 '17 at 12:02
  • \$\begingroup\$ @Fiskelord I understand. Just wanted to know how LIS3DH interrupt was being used to reset the ESP without going into endless reset cycles when LIS is in motion. Any chance you would be able to share clues about that part? \$\endgroup\$ – rams Oct 13 '17 at 12:38
0
\$\begingroup\$

This isn't a direct answer to your question, but a reaction to your statement:

i want it to be omni directional, so no "rolling ball switch"

This makes no sense. Rolling ball switches are omni-directional. Their orientation doesn't matter. When their orientation changes or they are jarred, the state of the switch will change.

The switch state change can be used to wake up a microcontroller. Or, the micro can wake up periodically, turn on the pullup for the switch, test the switch, then go back to sleep if there is no change. Waking up every 50 ms or so for a few µs at a time is still very low average current draw.

\$\endgroup\$

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.