SX1262 LoRa Node Module for Raspberry Pi Pico, LoRaWAN (CE08628)

Glad to hear you got it working!

Hi Guys,
I’m trying to minimise the amount of power the SX1262 uses while my Pico is in light sleep.
Is there a way to shut down the radio when it’s not needed?

I notice this detail in the specification but not sure what it means.

  1. RF switch control
    A: controlled by high level
    B: controlled by GPIO22

Does this mean if I connect the pad marked “B” the SX1262 will only be powered if GPIO22 is high?

I wish to turn the SX1262 to the lowest power mode possible say from 8:00pm to 8:00am
I have a RTC connected and working so that bit is sorted.

As a side note I notice that the SX1262 will wake up the pico from light sleep automatically when an incoming signal is received. This is a handy feature which will allow me to save a lot of power during the day. Luckily I’m in an area where there is not much activity on this frequency at least at the moment, If it wakes up I can read the signal perform an action and put it straight back to sleep.

My setup at present can take a 7AH battery from 13.02v to 11.4v in about 2 weeks.
I was hoping to achieve months of run time rather than weeks.
Unfortunately at it’s intended destination a solar panel isn’t possible.
Any input much appricated

Thanks
David

The RF Switch referred to in that part of the specification is the PE4259 module, so it is not associated with power to the SX1262. GPIO22 in conjunction with DIO2 operates the switch in SPDT mode to select between receive and transmit.

1 Like

Hi Jeff,
Thanks for that, it would have taken me ages to figure that out (if ever).
I guess my only option is to un stack the devices and put a relay on the power pin for the sx1262 so I can cut the power to it.
Unless someone has a better idea?
Thanks
David

Hi @David191372,

If you were after periodic power control the Makerverse Nano Power Timer may be a good option to keep everything together in one piece.

1 Like

That sounds like a good idea. I’m currently powering the device from the 12v battery that I’m monitoring using one of these.

So I’m not quite sure how I’d connect it in this situation?

1 Like

Hi @David191372,

The Makerverse Nano Power Timer that Aaron recommended is expecting power through a JST PH connector on the board. you could connect your power supply module to it using a connector like this JST PH 2-Pin Cable – Male Header 200mm or really any other JST PH connector that would work best in your setup.

This module looks like it is only designed to cycle power every few hours so you may need to add some checks in your software to make sure the correct sleep time has been achieved if you are aiming for 2 or more hours.

Hope this helps!

Hi Samuel,
That does help. I’ll have to check how much power my current configuration actually uses while it’s in light sleep mode.
The two hour maximum sleep time shouldn’t matter. When it wakes up I can just check if the current time of day is within the time range I want the device to be listening for incoming requests and if not I’ll just put it back to sleep. I’ll post again when I have some results.
Thanks
David

1 Like

Sounds good David!

Keep us posted, I would love to see what you end up with for this project. :grinning:

OK,
Silly coders mistake from me.
I had forgotten to turn my “Low Power Mode” back on, so the device ran for 14 days without going to sleep at all. Still useful information though.

The reason behind turning off lightsleep() while testing my code with the terminal connected is that lightsleep() seems to muck up the connection with Thonny when the Pico wakes back up.
When lightsleep() is enabled and the Pico is in lightsleep() the power consumption drops from ~40mA to around 10mA. So this should change my expected run time from around 2 weeks up to 8 weeks which is getting closer. Now if I use the above Nano Power Timer to disable the device for say 12 hours per 24 hours I could double that again to 16 weeks or 4 months which is up there with what I was hoping for. They could charge the battery 3 times per year. :slight_smile:

Now I may have been tricking my self with the way lightsleep() is functioning.
It appeared as though the incoming message was on my LoRa device was waking the Pico out of lightsleep() but I’m thinking now it was simply running full power all of the time.
So my plan to use lightsleep() is now looking shaky.

Thinking of simpler scenarios I could use with the Nano Power Timer, I might simply have my device listen for requests for the first 10 minutes of every hour then have the timer put the device to sleep for 50 minutes and repeat that from say 10:00am to 8:00pm.
So my back of envelope calculations.
That would be 11 x 10 minutes = 110 minutes per day of on time.
In my previous test the device ran for 14 days x 24 hours x 60 minutes = 20,160 minutes.
21,160 / 110 = 183 days.
183 / 30 = ~ Six Months.
Over the 14 days I checked the voltage at least every day so the read and transmit power usage is included.

Now for those who have read from the beginning of this thread you may recall that this device is to monitor a BBQ starter battery that should be in range of the Pub!
I’m sure the person assigned the monitoring task will find something to do if they turn up at the pub and say “Shit I missed it by 2 minutes” :slight_smile:
I’ll put an order in for that little Nano Timer.
If I can make it look anything less than super ugly I’ll post some photos when it’s done.

I see bread board wiring diagrams around the place describing how things are wired up.
Does anyone know how those diagrams are done?
Thanks
David

2 Likes

Hi David,

What an absolute deep dive. I look forward to seeing how it works out in practice.

There are a few ways. The most simple are drawn up in programs like MS Paint as its easy and convenient. Fritzing is another one that I haven’t used but am aware of. If you want to produce some schematics you could use PCB design software like KiCAD.

Hi Jack,
Thanks for responding. Yes the further I dig into the project the more complicated it gets. But its also a learning project and a brain challenge for me.
I reckon I’m getting close now.
I’ll check out KiCad but with a download of 1.2 GB it’s probably going to be complete overkill and come with a learning curve I don’t really care to climb :slight_smile:
I’m getting a new internet connection on Monday so that should solve all my download quota problems.

David

1 Like

Hi David,

It likely will be a bit over the top but unless you are designing PCBs you can safely ignore half of it. It’s schematic editor is quite user friendly and it’s symbol editor is also quite intuitive.

Hi Samuel,
This cable doesn’t fit. It’s Male to Male.

No big deal I just have to find the right one now and wait for the post man again :frowning:
I just post here in case someone else is building the same thing.

I’d say this is the correct one.

Which product is the JST connector for? The maker-verse products should be using JST-PH so I can certainly have a look to confirm what it actually is.

It’s ok Jack, I obviously need the opposite one to the one I have.
It’s to connect to the Nano Timer mentioned above.
I just placed an order.
Thanks
David

1 Like

Hi David,

No worries, keep us posted when your new cable comes in.

Actually the new cable still didn’t fit. it was the correct gender but the plug was slightly to large for the socket. I gave up and soldered wires directly on to the contacts at the back of the socket.
I suppose a better solution would have been to de-solder the socket and solder the wires directly onto the board.

More than one way to skin a cat I guess :slight_smile:
I’m getting into the final testing now and my early guess is that it will run for 3 to 6 months without a recharge by which time the battery will likely go flat from general use which is what its meant to detect anyway.

I’ll either submit this to Core Electronics as a project or just do a write up on it in a separate post.
Thanks
David.

Hi @David191372,

Thanks for the update :slight_smile:

Definitely keep us updated on how the final testing goes!

For those who are interested in my progress.
I have the power usage down to < 0.05 V per day.
If the batteries usable voltage range are from around 13.4v to say 11.0v
(13.4 - 11.0) / 0.05 = 48 days. I’d be happier if I can stretch it out to 60 days.
I have also just disabled debug logging to file so that should save more power.
I came up with some wiring diagrams using Easy EDA https://pro.easyeda.com
This was a bit of a steep learning curve for me but I found a demo on YouTube and I just followed along creating the same project as his example and it started to make sense.


I had to create some of my own devices so not sure if I have done that correctly but at least it is readable.

Now the interesting thing is if I can get it exactly right I can use Easy EDA to create a circuit board from this design and tidy up my horrible tangle of jumper wires that fall out of there holes at the drop of a hat.


I think next in Easy EDA I will have to enter the physical layout for the hardware I created. So far I have just created the logical / electronic layout. I’m feeling a bit like an old dog with a new trick. :slight_smile:
I know how hard it is to deal with programming errors no matter how careful you are. I wonder how many versions of the PCB I’ll end up doing :slight_smile:

Thanks for your interest
David

2 Likes