wake on shake problem

Hi

I just bought the wake-on-shake and,

I do have the exact same comment that the first person made on this post:

https://www.sparkfun.com/products/11447 … 1614800128

I would like to have “a remote control that sleeps until you pick it up, and stays powered until you put it down”.

And of course, your board does not do this,

" what they actually do is wake up for a preset period of time when accelerated, and then remove power after this time has passed".

As suggested in the post,

the solution proposed is to include a check in my main coding body but, this is not very elegant and simply don’t apply to my case. (I am lopping endlessly, meaning that it would be always on…)

And

I simply don’t understand why by default you board does not do this!

This objective of the board is to stay “wake” as long as there are movements.

Anyway

Would it be possible to have a full coding example that implement the “AWAKE flag” byte 6 check to leave my projet “On” untill that are no movement (and not based on a “preset time”)?

There is a nice person that did this (in the post in “c” language) but only a portion of this solution is in the post, it is incomplete

and

this implenattion is not for Arduino developers like me?

Thank in advance.

Ref;
ISR(TIMER1_OVF_vect)
{
// Check if accelerometer is still awake
uint8_t statusByte = (uint8_t)ADXLReadByte((uint8_t)XL362_STATUS);
if ((statusByte & (1 << 6))) {
TCNT1 = t1Offset; // Reset the timer
} else {
sleepyTime = TRUE;
}
}

I’m afraid we can’t custom make a board or code especially for your application, that’s something you would either need to do yourself or adapt your project to work around what you’re seeing as limitations in the Wake On Shake.

Here are your options as I see them:

  • - You could modify the firmware in the Wake On Shake to make it work the way you want it too. (it is open source)
  • - You can setup your remote to stay awake for a while and tell the WOS to stay powered on.
  • - You could skip the WOS all together and just put an accelerometer in your remote and program the remote to check the accelerometer periodically, keeping things alive while it senses movement.
  • I’m betting options 1 and 3 are more work than you want to do. Option 2 is covered in the hookup guide and is probably the easiest way to go, it just needs you to be a little creative in your remote control code.

    Do you have some documentation (with an example) on how to connect (hockup) and arduino to it so we could sent command.

    A diagram on what to wire would be good? :slight_smile:

    Yes, check the ‘Documents’ tab on the [product page for tutorials and more.](https://www.sparkfun.com/products/11447)

    Hello-

    I’m using a WOS in a hand-held device in this way:

    DEVICE (30 mA standby, occasional 200 mA bursts) <= WOS <= [4400 mAH lipo] <= [500 mA lipo charger] <= usb

    The charger is built into the device. I have modified the WOS firmware as suggested by another user so that before going to sleep, it checks to see if it’s still accelerating. If so, it stays awake. That way I get the ‘on only when somebody’s holding the device’ effect that I’m looking for. So far so good.

    The problem is that when I tried charging the battery, some weird damage was done to the WOS and I can’t figure out why. By weird I mean that the (device unconnected) WOS now puts out 4.1V when sleeping, and 1.3V when awakened! I’m pretty sure that either the PMOS or the NMOS transistor got trashed, though the general behavior indicates that the uC seems to be running. The big question is: why did charging screw up the WOS? I have very high hopes of using the WOS in this way, and I cannot afford to buy a whole bag of them to try a variety of tests, so I’m hoping you have some suggestions.

    Some particulars:

    the charger is an Adafruit micro-lipo (#1904)

    the battery is a matched pair of 2200 mAH lipos (Adafruit #354) I could get by with a single cell lipo, in case some battery mismatch is causing a problem (the pack has been working fine for a couple of years in other settings).

    I could charge at 100 mA instead.

    I could switch to one of your lipo chargers (like your #10217, gotta be small!)

    Basically I would love to hear that either: a) a particular combination of charger + WOS is known to work, or b) I did some silly thing that can be avoided going forward!

    Thanks,

    Patrick