0

Need tiny Chip to create a portable WLAN that uses very litt
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Need tiny Chip to create a portable WLAN that uses very litt

by straykat on Tue Jun 01, 2021 12:52 pm

Hi, I am looking for help. I need a portable wlan without needing access to the internet, that uses very little power and is as small and portable as possible.
I need this to log into a different chip that’s running a Linux program, and it’s for use in remote backpacking and hiking situations.

Imagine a 1 -2 week trip into the internet-free backcountry, and limited ability recharge batteries - all the power is carried in your backpack as power blocks. Solar is not an option.

I normally Bluetooth-tether the chip to my iPhone, but that only works when the iPhone has internet at the beginning, and doing so also costs too much iPhone battery because I can’t go into airplane mode if it’s used as a hotspot without it dropping the connection, and with no ability to reestablish it in the backcountry. Eventually - either because of the phone dropping the tether, or the chip rebooting, the connection will get lost, and only reestablished when the phone gets internet.

I have used an Edison chip to create an access point for this before, but it seemed to use a lot of power to create the wlan.

I am thinking of using a more modern chip that is very power efficient - the wlan does not need to reach farther than 1-2 meters, even 12 inches would be sufficient if necessary. All I need is it to be the source of the Wlan - nothing else.

In the past I have used a Hootoo tripmate titan for this, but they are now off the market :-(

I would really appreciate your help with this - I have been trying to figure this out for a while, and every time I go on a trip that’s more than 4 days, this becomes a pressing issue again …

Thank you!!!

straykat
 
Posts: 9
Joined: Tue Jan 12, 2021 7:06 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by mikeysklar on Tue Jun 01, 2021 3:22 pm

This is a really cool idea. As a trail runner who goes out on multiday adventures I can see why such a device would be valuable.

What is the Linux program you need to run?

The RPI Zero W seems like the right device to hack away at and get the power consumption down. I've seen examples down to 80mA. Is that still way over your power budget?

https://www.jeffgeerling.com/blogs/jeff ... rve-energy

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by straykat on Wed Jun 02, 2021 11:33 am

Hi Jeff, thank you. I want the access point to log into my „Artificial Pancreas System“ (OpenAPS), that runs on an Edison chip :-).

I have used a second Edison chip for this before, and it ran exclusively the soft access point. For some reason it went through power quickly - I did not measure it because I don’t have the tools, but I was surprised that the batteries did not last longer on only a 4 day trip.

I did not use any special program - it’s part of the Linux tool box … let me find a link. (hostapd).

Here’s a link to one of several write ups how to set it up: https://www.shellvoide.com/wifi/setup-w ... asq-linux/

I think the pi0 uses more power than I want to carry - it uses more than the Edison.

I have to already bring with me power for the phone, power for the Edison, and power for the watch, which i use to see my Bloodsugar easily on my wrist. Going into “airplane mode” significantly extends the battery life of both iPhone and AppleWatch (yay!), but it also kicks the Edison off the Bluetooth tether right away, with no way to return it until the phone has internet again. However, I can have both iPhone and Edison on the same wifi network - and ONLY when I want to interact with the Edison - and that solves several problems at once.

I could also host the wifi network on the same Edison that runs OpenAPS, but honestly, i find this is not ideal for several reasons. (The thing runs best focussing on one thing only, and it does a good job controlling my bloodsugar even if I cannot log into it and directly interact with it while offline …), so I want to preserve its power and “brain capacity” to focus on OpenAPS, for a lack of better words.

Update since I posted this: I’ve ordered a feather chip. Wish me luck! :-)

Adafruit Feather M0 WiFi - ATSAMD21 + ATWINC1500[ID:3010]

straykat
 
Posts: 9
Joined: Tue Jan 12, 2021 7:06 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by mikeysklar on Wed Jun 02, 2021 12:15 pm

We have written a lot of short blog posts on OpenAPS. That is awesome that you are using it and doing long hikes.

I hope the M0 + WINC1500 can be a viable AP for you. The ESP32-S2 might be interesting due to it's ability to go into and out of super deep sleep mode. It also has a MagTag version with low power eINK screen that might be useful to controller the device.

https://learn.adafruit.com/deep-sleep-w ... onsumption
https://www.adafruit.com/product/4800

https://randomnerdtutorials.com/esp32-a ... eb-server/

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by straykat on Wed Jun 02, 2021 2:47 pm

Thank you for adding the links!

Also, I got your name wrong :-), and I kind of answered the wrong question - LOL - concerning hostapd. Oops.

Thanks again!

straykat
 
Posts: 9
Joined: Tue Jan 12, 2021 7:06 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by straykat on Wed Jun 02, 2021 2:56 pm

mikeysklar wrote:
I hope the M0 + WINC1500 can be a viable AP for you. The ESP32-S2 might be interesting due to it's ability to go into and out of super deep sleep mode. It also has a MagTag version with low power eINK screen that might be useful to controller the device./


Oooh - eINK screen … hmmm. Thank you for giving me ideas. How do you input text, though?
I use Termius to communicate with the Edison. But having a device that would make it possible to talk to the Edison without the phone would be a nice feature, in case phone breaks/is lost, or is out of power.

straykat
 
Posts: 9
Joined: Tue Jan 12, 2021 7:06 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by mikeysklar on Wed Jun 02, 2021 4:30 pm

I've run hostapd before on my Pi OS boxes. I found it pretty unstable.

What kind of text do you need to enter? Maybe some of it could be condensed down to a button press. For example if you needed to enter in glucose or insulin levels parameters maybe that could be simplified to +/- buttons?

I use termius all the time myself, but backpacking I would prefer to have a few "dummy buttons" to do things on the move.

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by straykat on Wed Jun 02, 2021 6:57 pm

Buttons, yes. That would work.
Reboot, and several different temporary targets to set, and to cancel.
I already have most of the ones I normally use as Iphone shortcuts, and Termius snippets.

I just have to figure out how to create those buttons. :-o

straykat
 
Posts: 9
Joined: Tue Jan 12, 2021 7:06 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by mikeysklar on Thu Jun 03, 2021 4:48 pm

Example of button press with light trigger and eINK update on MagTag using CircuitPython.

https://learn.adafruit.com/creating-mag ... e-examples

Code: Select all | TOGGLE FULL SIZE
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
import time
from adafruit_magtag.magtag import MagTag

magtag = MagTag()

magtag.add_text(
    text_position=(
        50,
        (magtag.graphics.display.height // 2) - 1,
    ),
    text_scale=3,
)

magtag.set_text("Hello World")

button_colors = ((255, 0, 0), (255, 150, 0), (0, 255, 255), (180, 0, 255))
button_tones = (1047, 1318, 1568, 2093)

while True:
    for i, b in enumerate(magtag.peripherals.buttons):
        if not b.value:
            print("Button %c pressed" % chr((ord("A") + i)))
            magtag.peripherals.neopixel_disable = False
            magtag.peripherals.neopixels.fill(button_colors[i])
            magtag.peripherals.play_tone(button_tones[i], 0.25)
            break
    else:
        magtag.peripherals.neopixel_disable = True
    time.sleep(0.01)


mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by plutonic on Fri Jun 04, 2021 1:34 am

I think the Nordic, ESP32, SAMD Feather and similar devices use less power than the rpi 0w. They can also run on 3.3v instead of having to boost to 5v. You still might have to limit activity with the setup rather than run it 24/7.

That's unfortunate about not being able to use solar since there is starting to be reasonably priced stuff that is portable.

I guess it would help if you said your expected energy requirements, carrying capacity, etc. There are energy dense lipo packs out there for sure, though.

If it were me I'd be going into the backcountry to escape from computers rather than to bring them with me, but it sounds like you have some kind of purpose in mind, so fine.

Added: I see you ordered a Feather. Nice hardware but it may take some effort to get everything working the way you want it to.

plutonic
 
Posts: 68
Joined: Wed Jan 06, 2016 3:21 am

Re: Need tiny Chip to create a portable WLAN that uses very

by straykat on Fri Jun 04, 2021 11:52 pm

Thank you.
Ah, re: Solar - I’ve spent a week on the PCT, with 6 days of rain :-).
Yeah, I need the thing to work, and I want it as light as possible - using a small LiPo battery. I’ll only turn it on for like 2 minutes at a time, about 10 times a day, to communicate with the Edison chip that runs a medical application which makes it easier for me to escape I to the backcountry and not think a whole lot about insulin, food, day of the week, the constellation of the moon and the stars; whether Mercury is in Retrograde, and how much the next 3 miles are going to affect my bloodsugar 10 hours on - in short, an artificial pancreas system. (That last part is for comic relief, but only barely hyperbole, btw.)

Thank you :-)
Hope I can get the feather chip to work and do “this one thing” - provide an ad-hoc soft access point.

straykat
 
Posts: 9
Joined: Tue Jan 12, 2021 7:06 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by plutonic on Sat Jun 05, 2021 6:10 am

I'm still confused about what you're trying to do: if you are only using this setup 2 minutes a day, can't you just power off the iphone when you're not using it? Is the idea to upload some data from the watch to the edison system through the iphone? The edison is a tiny x86 thing that's no longer made, right? Anyway it sounds like a straightforward matter of powering everything off when not in use.

Anyway, I'd suggest figuring out the energy requirement before doing anything else. What equipment do you need to use, how many minutes a day does it have to run, how much power does it use while in operation. If it's a phone + portable computer at a few minutes per day, plus the watch running 24/7 and needing a daily recharge of 100mAH or some small amount like that, then you are probably ok carrying a small usb power bank to charge the watch, and using it to add a little more juice to the phone if necessary. There are things you can do to save a few more grams of weight but it doesn't seem worth it for so little gain.

plutonic
 
Posts: 68
Joined: Wed Jan 06, 2016 3:21 am

Re: Need tiny Chip to create a portable WLAN that uses very

by straykat on Sat Jun 05, 2021 5:21 pm

Thank you. I thought I described the issue in the original post - concerning power usage of the iPhone when serving as hotspot for the Edison, and its inability to initiate a WIFI network when it does not get internet.
if you really want to know - the Edison runs a software that calculates every 5 minutes the amount of insulin needed to be given by my insulin pump, based on Blood sugar readings, and a large list of criteria, and I want to be able to reliably interact with the Edison. The Edison goes through a 2500 mAmph LIPO in about 15 hours, and when I recharge it with a power brick, it takes a lot of the power - depending on external temperature. It's challenging to keep the items warm while charging - it's not safe to have it in my sleeping bag in a tent, and it gets cold at night in the mountains.

Additionally, the phone, and Watch also need power - and a lot more when I keep the phone off Airplane mode. (all described in the OP)... I can tell you I ran out of power on my weeklong trip in a rainy Cascade Mountain Range, and I carried multiple Power bricks, and multiple charged LiPos.

Thank you for caring and trying to help.

straykat
 
Posts: 9
Joined: Tue Jan 12, 2021 7:06 pm

Re: Need tiny Chip to create a portable WLAN that uses very

by plutonic on Sat Jun 05, 2021 5:38 pm

Oh I see, I didn't understand that the edison had to run 24/7. There are li-ion cells made specifically for cold weather:

https://www.fenix-store.com/fenix-arbl1 ... 0-battery/

I don't know if that helps. Batteries from that shop are good but quite expensive so maybe you can find something similar cheaper elsewhere. Another possibility might be lithium primary cells (L91 AA 1.7 volt lithium cells). I think they have a little more energy per weight than lithium ion cells, and they are also good in cold weather, but they are not rechargeable. They are less expensive than they used to be, like $1.25 each or so at Costco in packs of 16. I think they are around 3000 mAH at 1.7v, so the Edison would burn through about 2.5 or 3 of them a day. They are very light, around 0.5 ounce per cell I think. Even more energy dense are lithium thionyl chloride 3.6v cells (Tadiran etc). But, those are expensive, the chemicals in them are pretty toxic (dispose as hazmat), and I think they may be intended for use at low current drains. L91's can handle high drains pretty well.

Does the Edison have to use wifi? Can it use bluetooth? Does the iphone also have to be running constantly to communicate with the Edison? If it requires internet to use the wifi, that sounds like a dumb limitation of the software. Maybe some other phone doesn't have the limitation?

It sounds like the Edison draws enough power (0.4 watts or so) that it can possibly keep itself and its battery warm if you put everything in a well-insulated container.

There is definitely lower powered hardware you could use instead of the iphone, like an esp32 board or one of the wifi-enabled Feathers, but getting everything working (software etc.) could be a fairly big task in its own right.

As this sounds like a critical medical system of course I hope you have backups for everything. Yikes.

plutonic
 
Posts: 68
Joined: Wed Jan 06, 2016 3:21 am

Re: Need tiny Chip to create a portable WLAN that uses very

by straykat on Sat Jun 05, 2021 5:54 pm

LOL - really, all I need is a soft AP ....

I appreciate you and your trying to help. This is not the place to go into the details for why the EDISON, and why BT tethering causes power issues (some of that is in the OP).
Here's a link to the whole thing: https://openaps.readthedocs.io/en/latest/


:)

straykat
 
Posts: 9
Joined: Tue Jan 12, 2021 7:06 pm

Please be positive and constructive with your questions and comments.