I'm trying to make a wireless system that detects if someone is sitting on the toilet or not.
The idea is using a NodeMCU connected to a wifi-network, updating a database with info about the state of the toiled, "busy" or "not busy".
I would like to know if NodeMCU supports low power mode via interrupts so that I could maintain the system with a battery.
Thank you in advance, :)
In low power mode nodemcu cannot be waken up via an internal event.
You have to trig it externally via a button, a sensor interrupt, etc.
So, I assume that you'll need to use a sensor like PIR for motion detection, if you got a battery friendly sensor, you can wake it up with trigging GPIO16 when it lays in deep sleep.
Related
Has anyone tried recell laptop battery and replace onboard controller board (ie: bq8050) with simple cheap bms? Obviously there would be no smbus communication therefore no information are being reported back to OS. Now, we can get the battery to power the laptop and run until its drained, however since there is no way to measure battery voltage within OS by means of typeperf command(or is it ??) and as a result laptop cannot trigger charging procedure. Any solutions?
I've combed through the SDK and haven't found anything promising. I'd like to keep a Mavic Air on a "standby" mode, if at all possible. I see that I can power off the motors, but I'm not sure how significantly that will drop the current consumption. Has anyone tried to sleep a DJI programatically with the SDK?
As far as I know, the drones from DJI do not have a "standby" mode.
I'm working with a Mavic Pro and after some tedious research on the internet I've come to the conclusion that the only way to keep a DJI drone powered an arbitrary amount of time is to use an autonomous charging platform.
From my experience with Mavic Pro, the battery of the drone lasts ~1.5-2h when not flying and the motors are kept off. The remote Controller discharged faster while being kept on (~1.5h).
The Mavic Pro Remote Controller has two USB outputs, which enables connecting to the smartphone and charging simultaneously.
A related question can be found here:
Programming a complete autonomous dji drone? take off - follow a flight path - land
I have an AOSP tree compiled on my board. I bought a wireless keyboard and connected it to my board via usb port. I expect when the board is in the suspend state, it will wakeup by pressing a key on keyboard. But it is not so.
I tried several ways in my bootloader (uboot), kernel, etc. But no effect. Additionally I made an experiment and found out that in the sleep state, my usb port (which has a dongle in it) has just 1-5 mA. But it should be higher for the dongle to work!
Has anyone experienced this? How to enable remote wakeup for usb in android?
Thanks
More info:
The uboot supports usb host controller interface. I tweaked kernel build options. but these two actions has no effect.
EDIT : I work on p212 reference board of amlogic. Its SoC is Amlogic S905X.
EDIT 2 : I tested the board (which is a tv box actually) using my phone and its charger and I found that when the box goes to sleep, the charging is stopped!! So I can deduce that the dongle has not enough power to stay alive! (yet to send wake signal to SoC !)
Then I carried out a second experiment: I connected the phone using a USB charger which only has two pin instead of four. (Just voltage supply; differential pins (signal pins) are disconnected). The result: my phone is charging now!! It seems when the SoC is suspending, it sends a signal to USB peripherals telling them to not draw power. Am I correct? How can I configure my AOSP tree and Linux kernel and uboot bootloader to avoid happening this?
Please guide me how to fix it in kernel or other parts of stack!
EDIT 3 :
I have pasted my kernel config here. I configured these options to y but has no effect:
CONFIG_PM_RUNTIME=y
CONFIG_PM_AUTOSLEEP=y
CONFIG_PM_DEBUG=y
CONFIG_USB_OTG_WAKELOCK=y
CONFIG_USB_DEBUG=y
CONFIG_USB_OTG=y
Also this link is my device tree files. (in kernel. NOT uboot)
I am using the Onboard-SDK for DJI M100 on ROS.
I developed a code for controlling the position of the M100 to certain target position.
However, it doesn't reach the specified target.
For that reason I checked the published control signals with ROS, and as I saw, in some experiments the frequency of the control signal is not "constant" at all. For example, sometimes I have 50Hz, some others 5Hz, 10Hz etc.
I would like to know what is the actual reason behind this.
Assuming you 3.3V FTDI works and have perfect working hardware, I would guess some 1 changed the DJI assistant2 SDK setting for you. Otherwise, it will not changes. I had some simar problem before, but the problem is I burn the API port by using 5V FTDI
Besides, you control should be sent to the drone in a fixed time loop by running a ros loop rate and ros sleep routing. not send at each callback. The reason being that you need to control your drone position with PID or other control methods which is time depended.
while developing for the new Microsoft Surface Dial I noticed the device going to sleep after a few minutes and taking about 1-2 seconds to wake up again after an interaction with the device. This is insufficient for my specific use case, where the application has to give immediate feedback.
I've tried turning off the energy settings for the bluetooth device in the device manager, but the problem persists. Is there a way to turn this off, either in code or in some other way?
Unfortunately there is no way to solve the issue without a Microsoft firmware update.
The unit use a Nordic Semiconductor nRF52832 Bluetooth Low Energy SoC, is possible change that on the chip, but with a firmware update. Really sorry but is the only way.