I'm looking into the best component(s) to be fitted to something which will detect if the subject is turned upside down (or at least 90 degrees on it's side) and also detect which side it's lying on.
The priority is being small, lightweight and low-power.
My two thoughts were, either using an IMU like the Adafruit LSM6DS33, which would obviously give me all the data I'd require, but is likely going to be pretty power hungry if in constant use, or alternatively, using tilt switches.
However, with tilt switches, I'm struggling to see an orientation where it'll be accurate enough and where I'll be able to tell which side the subject is lying on without using quite a few switches.
If anyone has any suggestions it'd be greatly appreciated. Thanks
Do define "small", "light weight" and "low power" with numbers and units.
Your run-of-the-mill accelerometer/IMU is small enough and light weight enough and low power enough for use in a mobile phone, yet it's for some reason not good enough for you.
While the LSM6D33S will certainly do the task, to sense static vertical orientation, one really only requires a 3D accelerometer. Adafruit's LIS3DH is one such sensor with lower power requirements.
Oi! Even a bit better have the 45 degree tilt switches wake the unit from sleep, or put the wake up tilts at 22.5. Either way the beginning of the tilt wakes the thingy.
wvmarle:
Do define "small", "light weight" and "low power" with numbers and units.
The idea is for an automated self-righting mechanism for someone's tortoise that's always flipping himself over. He's free to roam around the house and tends to walk up the side of walls often causing him to roll over and get stuck on his back.
I'm looking to strap a sensor to him that can detect if he's on his back or side for more than x amount of time, then activate one of two arms fitted to servos (one each side) to push him back over.
As such the whole unit (including power) needs to be small and lightweight enough to not be cumbersome for him to carry. It just needs to be as light as possible. I'm not worried about the sensor adding to this, just the battery, but ideally the battery would last long enough to run the sensor for a day (including 1-2 uses of the servos).
MrMark:
While the LSM6D33S will certainly do the task, to sense static vertical orientation, one really only requires a 3D accelerometer. Adafruit's LIS3DH is one such sensor with lower power requirements.
This looks like a good shout. Presumably, it would need to be powered up when already fitted to the tortoise at which point it would calibrate the accelerometer?
Start with a Pro Mini & tilt switch. Lightest in the Arduino arsenal, though just today I ran into a lilypad form factor which may actually be even smaller and thus lighter. There's a ATmega32U4 lilypad thingy as well, looks even smaller. I think the weights are available as part of their specs, or just put it on a scale. A Pro Mini (or lilypad) can be sleeping, only to wake by the tilt switch (triggered as the thing rolls over).
Find a servo that's strong enough to right your tortoise. You have to know the force needed to right it, and based on your construction you can calculate the required torque.Most servos have the weight given as part of the specifications.
Finally of course a battery. A small LiPo cell is probably your best bet considering the weight. So the servo should provide that torque at 3.7V. A 3.3V, 8 MHz Pro Mini will be perfectly happy with this voltage, no regulation needed. A 32U4 probably likewise as long as it's running at 8 MHz. Again the weight is likely part of the specifications.
Don't forget to add the weight of the buckles and straps to attach the thing to your tortoise's shell, that's probably the lightest weight option short of glueing it on which doesn't sound like a preferred method of attachment to me.
An even more lightweight option would be to not let your tortoise walk on such slippery floors... which is no doubt what prevents it from righting itself. Tortoises normally can right themselves just fine, though it may take some effort.
Thanks, I'll look into all of this, sounds like some great suggestions.
Regarding the tortoise itself, it's not mine. It's a friend of a friend of a friends and thought it would be a fun little project.
If precision orientation were a concern you'd want to calibrate the sensor and installation, but the difference between right side up and laying on the side or upside down shouldn't require calibration. That is, given that using a handful of tilt switches is a viable alternative, the resolution possible with a 3D accelerometer is technological overkill, but they're cheap and convenient enough that it doesn't matter.
ByteSlinger:
While the LSM6D33S will certainly do the task, to sense static vertical orientation, one really only requires a 3D accelerometer. Adafruit's LIS3DH is one such sensor with lower power requirements.
This looks like a good shout. Presumably, it would need to be powered up when already fitted to the tortoise at which point it would calibrate the accelerometer?