Does deepsleep work at all
-
@chumelnicu deep sleep works... Can you be more specific around the way your program stops execution? A code example and the REPL output would help us understand your issue. Thanks.
-
@daniel Thx
Was about reading HR-04 Ultrasonic Sensor and send data over lorawan.
First i did connect Echo to Pin11 and Trigger to Pin12I just move it to Pin21 and Pin22 and seems all is ok
Solved ! Thx Daniel
-
@daniel said in Does deepsleep work at all:
@chumelnicu deep sleep works...
Sure? Libs and Lopy updated today. Lopy attached to the DeepSleep board. Not even the first line of the example from Github or documentation works without an error
>>> os.chdir('lib') >>> os.listdir() ['LIS2HH12.py', 'LTR329ALS01.py', 'MPL3115A2.py', 'pysense.py', 'SI7006A20.py', 'dth.py', 'bme280.py', 'deepsleep.py'] >>> >>> from deepsleep import DeepSleep Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name DeepSleep >>> os.uname() (sysname='LoPy', nodename='LoPy', release='1.7.8.b1', version='v1.8.6-724-g2b9ed601 on 2017-07-28', machine='LoPy with E SP32', lorawan='1.0.0') -
@Camot said in Does deepsleep work at all:
ImportError: cannot import name DeepSleep
Do you happen to have another file named deepsleep.py in your LoPy root folder by any chance?
-
@jmarcelino said in Does deepsleep work at all:
@Camot said in Does deepsleep work at all:
ImportError: cannot import name DeepSleep
Do you happen to have another file named deepsleep.py in your LoPy root folder by any chance?
oops, thank you! How embarrassing :/ . It was still there from my pysense experiments. Anyway, still not working
Traceback (most recent call last): File "<stdin>", line 7, in <module> File "/flash/lib/deepsleep.py", line 145, in get_wake_status File "/flash/lib/deepsleep.py", line 76, in peek IndexError: bytes index out of range > MicroPython v1.8.6-724-g2b9ed601 on 2017-07-28; LoPy with ESP32 Type "help()" for more information. -
@Camot
Setting aside the get_wake_status() example for now does a straight upfrom deepsleep import DeepSleep ds = DeepSleep() ds.go_to_sleep(30)put the board into deep sleep for 30 seconds?
-
@Camot do you have anything connected to P10? That's the pin used between the LoPy and the deepsleep shield for communication...
-
@jmarcelino said in Does deepsleep work at all:
@Camot
Setting aside the get_wake_status() example for now does a straight upfrom deepsleep import DeepSleep ds = DeepSleep() ds.go_to_sleep(30)put the board into deep sleep for 30 seconds?
don't think so, the board become unresponsive for 50 seconds but heartbeat continues and then it reports
>>> ds.go_to_sleep(30) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/flash/lib/deepsleep.py", line 156, in go_to_sleep File "/flash/lib/deepsleep.py", line 105, in calibrate IndexError: list index out of rangeRepeated it 3 times with ds.go_to_sleep(30), alway 50 seconds unresponsive :/
@daniel
no, only the Lopy, the deepsleep shield, the antenna and power with a 3.3V Step-Up/Down Regulator on the Lopy 3.3V pin. -
@Camot said in Does deepsleep work at all:
no, only the Lopy, the deepsleep shield, the antenna and power with a 3.3V Step-Up/Down Regulator on the Lopy 3.3V pin.
That's the problem then, the deep sleep shield only controls - and is powered by - the Vin (labelled 5V) pin not the 3.3V.
Try applying your 3.3V to the Vin pin instead, the LoPy regulator should enter bypass mode and hopefully the PIC10 and extra circuitry shouldn't be affected too much.
-
@jmarcelino said in Does deepsleep work at all:
@Camot said in Does deepsleep work at all:
no, only the Lopy, the deepsleep shield, the antenna and power with a 3.3V Step-Up/Down Regulator on the Lopy 3.3V pin.
That's the problem then, the deep sleep shield only controls - and is powered by - the Vin (labelled 5V) pin not the 3.3V.
Try applying your 3.3V to the Vin pin instead, the LoPy regulator should enter bypass mode and hopefully the PIC10 and extra circuitry shouldn't be affected too much.
Oh, I have not read it anywhere yet. Thank you @jmarcelino
It works with 3.3V on the 5V pin at the DS shield. The power consumption goes down to 0.4mA during deep sleep....but more than I have expected. Besides the high deep sleep current, I found something else that's odd. If I put 5v to the 5v pin, the Lopy does nothing. If I put in 3.3v at the same 5v pin, it is starting. And yes, I am using the 5v pin ....first pin right to the heartbeat. -
@Camot said in Does deepsleep work at all:
If I put 5v to the 5v pin, the Lopy does nothing. If I put in 3.3v at the same 5v pin, it is starting. And yes, I am using the 5v pin ....first pin right to the heartbeat.
Can you explain it a bit better please? Where are you supplying 5V from? Is this with the LoPy inserted into the Deep Sleep shield?
-
This post is deleted! -
@Camot the deepsleep shield has a battery protection mechanism (LiPo batteries get damaged if you discharge them completely), therefore when the input voltage falls close to 3.3V, the deepsleep shield will disconnect power to protect the battery. This threshold voltage can be increased with the
set_min_voltage_limit()andenable_auto_poweroff()methods from the deepsleep library. In any case trying to power it with a voltage that is too low won't damage anything.What do you mean with so many hardware bugs? Besides the deepsleep problem that we already acknowledged, and we did our best to compensate with the deepsleep shield, what other hardware issues have you found?
Cheers,
Daniel -
Hi all!
I recognized a similar behaviour with my Lopy. The DS-shields arrived yesterdayand I start to work with them. My hardware setup is pretty simple: Expansionboard V2.1A, DS shield V1.0, LoPy, 2000mAh LiPo, attached to the Expansionboard and powered by USB.
I start with upgrading a OTAA LoRaWAN node. It work for a while, then it stopped working with:
Joined yet!!!
Traceback (most recent call last):
File "main.py", line 75, in <module>
File "deepsleep.py", line 156, in go_to_sleep
File "deepsleep.py", line 105, in calibrate
IndexError: list index out of range
MicroPython v1.8.6-724-g2b9ed601 on 2017-07-28; LoPy with ESP32Cheers,
Thomas -
Lopy + DeepSleep Shield after 10-12 cicles of 10 minites deepsleep stop working to0
I use deepsleep.py library
I really think is one bug with deepsleep function
-
Hi @Thosch42,
Could you please share which version on the deepsleep.py library you are using? I think myou might be on an older version of the library.
You can find the latest version, here - https://github.com/pycom/pycom-libraries/tree/master/deepsleep
Let me know if this helps,
Thanks!
-
@bucknall It's Version 1.0.0
-
@bucknall My last pull was yesterday, at app. 9.00 MEST, right after I held my Air Mail Bag from Pycom in my hand ;-)
-
@bucknall that from your link library i use too.
The question is ..Why deepsleep is working 10-12 cycles ..and after that lopy program is stop.
I use Lopy+deepsleep sheeld, powered from USB -
The relevant lines are:
pulses = pycom.pulses_get(COMM_PIN, 50000) self.uart = UART(1, baudrate=10000, pins=(COMM_PIN, )) self.clk_cal_factor = (pulses[3][1] - pulses[1][1]) / EXP_RTC_PERIODobviously
pycom.pulses_getreturned a list not compatible with the indexes inpulses[3][1] - pulses[1][1]
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login