Tried using with ESP8266 weather station. The timer toggles power after set period, but does not turn it off completely. It does reset after program sets DONE pin high.
Nano Timer ESP8266 (NodeMCU)
Out + ----> Vin
Out- ----> Gnd
Dne ----> Do (Pin 16)
This means it appears to be working as I remove my timing code from the Weather Station and it reboots on toggle meaning a new reading is uploaded. There is probably a small energy saving because there is no code running, but it is still connected to WiFi.
I could put it to sleep, but would rather it be off completely.
Could you attach a photo with all your hardware connected? This seems strange! When you say “doesn’t turn off completely” what is it doing?
Keen to get to the bottom of this one!
I have it inside at present to debug, so there would normally be a solar panel, Sunflower manager and Fuel gauge connected. This is the basic setup.
The nano timer toggles the power off/on. This reboots the ESP8226, it runs the code, sends DONE signal and nano resets.
Tried using nano timer with Rpi Pica as in the guide example (but flashing the onboard LED) code below.
from machine import Pin from time import sleep led = Pin(25, Pin.OUT) DONE = Pin(15, machine.Pin.OUT) # DONE = Pin(15, Pin.OUT) DONE.off() for i in range(10): led.value(1) sleep(2) led.value(0) sleep(2) i += 1 DONE.on() # Assert DONE signal; powers down Pico```
Continuation of previous post.
I get this error
File “flasher.py”, line 6, in
NameError: name ‘machine’ isn’t defined
Getting rid of “machine” from “machine.Pin” makes it work and code runs turning on DONE Pin, but this does not turn off the power to the Rpi Pico!
Thanks for pointing that out! We’ll get the guide updated
What was that white wire connected to? If it’s holding that line low then the DONE pin can never switch off the power timer.
EDIT: Also note that the LED on the power timer indicates if the device is being powered through Vin - if the LED is on then the power timer will be feeding power.
If your ESP is trying to go to sleep and activate the power at the same time - the capacitor onboard might be able to keep it powered for a bit longer
Attached to voltmeter so I could watch the transition.
Hi John, are you referring to this question from Liam?
Note with the photos you just uploaded: To get the power timer to work correctly you’ll have to disconnect the USB (there’s a protection diode in place to stop your battery overcharging).
Be sure to have your code saved as
main.py so that it runs on startup.
If its attached to a voltmeter that should be all good - the low impedance shouldn’t be affecting the signal although the duration of the pulse might be in the realm of milliseconds, much too fast for a multimeter to pickup.
Re: your ESP setup, what method were you using to confirm that the WiFi was still connected? The router I use at home can take upto about a minute before the devices list updates as being online
The same applies with the USB connection.
Sorry, forgot to mention it was not connected to computer.
main.py imports flasher.
I was pinging from Mac and also Thonny was showing WebREPL conected.
Just a few coveralls for the Pico to confirm that the module is working:
- Ensure the following code is saved as main.py on the Pico (In Thonny your
from machine import Pin, ADC DONE = Pin(15, Pin.OUT) adc = ADC(0) # Pin 26 x = adc.read_u16() # Opening with "a" for appending with open("log.txt", "a") as logFile: logFile.write(str(x)) logFile.write('\n') # New line logFile.flush() # Ensure data is written logFile.close() # Really ensure data is written DONE.on() # Assert DONE signal; powers down Pico
Note the square brackets, this is a check that the code is saved to the Pico
- Ensure your LiPo is charged and plugged into the Power Timer
- Ensure that you have disconnected power via the USB
I’d also try a test where the multimeter is disconnected - using the same setup as Brenton’s guide would be best.
OK, so I setup exactly the same as in the video. LED on timer stayed ON except it went OFF approximately every 2 seconds.
This prompted me to look at my soldering and it looks like I may have a dry join on the DNE pin. Will confirm if this is the problem or not.
Pretty sure that was the problem. Looks like I had destroyed the solder pad when I had previously desoldered. Will need to order a new one.
Hey I think I know what the problem was that John was running into. I have just received my MKRVRS Nano Timer and may have come across a similar problem.
If DELAY is pulled low rather than left floating, the Nano Timer turns on for about 2 seconds, turns off for a fraction of a second and then turns on again for 2 seconds, off for a fraction etc etc.
I made the mistake of thinking that when I did not want to activate the Nano Timer by pulling DELAY HIGH, I would leave it pulled LOW. And that causes the problem.
Once I left DELAY floating rather than pulled LOW, the Nano Timer works as expected.
Looking at the schematic, I see that pulling DELAY LOW must affect the TPL5110 timing circuit somehow and perhaps put it in an undefined (or just undesirable) state perhaps? Haven’t looked at the TPL5110 data sheet but its probably all explained there.
The Nano Power Timer board has a pull-down resistor on the DONE pin - the circuit behaviour when pulled low or left floating should be identical.
The TPL5110 device has a built-in “watchdog timer” behaviour: if the DONE pin is not pulled HIGH before the timer runs out it will power cycle the connected device by turning off the output power for a short time before starting the next timer interval.
It’s the DELAY pin, not the DONE pin. I mistakenly treated it like a regular logic pin, which it definitely is not.
My mistake, sorry!
The DELAY pin is provided to allow for an external reset: shorting it to Vdd will reset the TPL5110. The onboard reset switch does exactly this.
It should otherwise be left floating.
Absolutely not a problem @Brenton.
Might be good to put a note in the guide to be clear about use of the DELAY pin, it was an easy trap to fall into.