I made a mistake programming the LIS3DH accelerometer. The INT1 duration register was not addressed properly, so the accelerometer would not delay the interrupt output when detecting a free-fall event. I discovered the error and made changes to the PIC code to change the free-fall duration to 320ms, along with increasing the free-fall threshold to 320mg (from about 100mg).
Results:
- Previously, when Lucy dropped her toy from a few inches off the floor the toy would beep. Now, the toy does not beep until it is dropped about 3 feet in height. It also does not beep when she shakes it or a human shakes it.
- You still must be careful tossing the toy so that is doesn't rotate (revolve?) or the accelerometer won't generate an interrupt. Lucy has a lot of trouble locating the toy now if it doesn't beep.
The PIC code is very close to complete. My wife thinks it should be able to discriminate between a rotating toy and a non-rotating toy, but perfection is hard to achieve and I'm satisfied with the performance so far.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.