Kite Altitude Monitoring

2 views
Skip to first unread message

Damian Axford

unread,
Aug 25, 2015, 7:32:31 AM8/25/15
to swindon-hackspace
Hi All

I've been putting together a quick project for Andrew that ya'll might be interested in...  will just cover the headlines here, and open-source the code if Andrew's happy with that (TBC):

Objective
Real-time monitoring of kite altitude over the course of a flying day (8-12 hrs), for one or more kites, based on barometric pressure.

Requirements
  • General:
    • Rain-proof
    • 1000 ft / 300m range from Kite to Base station
    • Use temp compensated, differential pressure for improved accuracy (measure at kite and base, take diff to calc altitude)
  • Kite module: 
    • Lightweight
    • Battery powered (4xAAA or lighter)
  • Base station:
    • 12V power (to pull off leisure battery)

Design Overview
  • Kite module:
    • Hardware: ESP8266 wifi module to T4503 pressure sensor over I2C, running off LDO 3.3v reg and 4xAAA battery pack
    • Enclosure: 3D printed and sealed.  Designed to hang from pilot kite at top of stack
    • Operation: 
      • Connects to base station (AP), sends pressure measurements as UDP packets every 1sec. 
      • Robust to connection dropouts, dodgy readings, etc
  • Base station:
    • Hardware: ESP8266 wifi module to T4503 pressure sensor over I2C, running off LDO 3.3v reg via 12V leisure battery
    • Enclosure: 3D printed and sealed.  Designed to clamp to a ground spike near the winch vehicle.
    • Operation:
      • Acts as AP
      • Receives UDP pressure measurement packets, performs over-sampling, reads local pressure level, calculates altitude(s)
      • Also serves web-based UI to be accessed from mobile phone, tablet, etc
The prototype hardware is assembled on strip-board, and the s/w is written using the ESP8266 extension for Arudino IDE.  The code is very simple and portable for similar sensor network applications.  It's also easy to adapt if all the nodes should connect to an existing AP (e.g. for a home/office deployment).

Power usage is <100ma on the kite module, without any special power saving modes, and should last over 14 hrs.  I plan to incorporate a lower power sleep state once I work out how to do it!

Range is still to be validated, but I'm hoping to get over 200m using the pcb antennas - the enclosure design is intended to help orient the antennas for max range (main lobe emanates from the face of the pcb).

Let me know if you're interested in any more info...

thanks
D



Robert Longbottom

unread,
Aug 25, 2015, 7:44:33 AM8/25/15
to swindon-...@googlegroups.com

Sounds interesting.  Would be cool to see some graphs of height over time.

The ESP deep sleep Stuff looks easy enough, you just call ESP.deepSleep(time) (or something like that).  The only problem is waking the thing up again, you need to connect one of the GPIO pins (15 or 16) to the reset line or it never wakes up.  Annoyingly it isnt broken out on the esp-01s.  But I think with some suitably delicate soldering you can get a jumper wire directly on the chip (I've not tried!).

I think I read that when it wakes up, its just like its booting for the first time, so setup() runs followed by whatever else you have.  Although there is some value you can check to find the "boot reason" that tells you if its a cold boot or boot from sleep, etc.

Would be interested to hear success (or otherwise) of getting the deep sleep to work.

--
You received this message because you are subscribed to the Google Groups "swindon-hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swindon-hacksp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Damian Axford

unread,
Aug 25, 2015, 8:00:41 AM8/25/15
to swindon-hackspace
yeah - graphs could be fun...  not sure how many samples I can pack in the RAM of the ESP :)

I found that deepSleep stuff.... problem is, I only want a light sleep.  Datasheet seems to suggest this is doable, but haven't found the relevant routines to actually do it - nor the implications on wifi connectivity.

Robert Longbottom

unread,
Aug 25, 2015, 8:11:10 AM8/25/15
to swindon-...@googlegroups.com

Hmm, yeah, external eeprom or SD card required maybe.  The latest ESP Arduino code has some kind of flash filesystem support, where you get to steal some of the program memory, but you only get 64k or so.

Lightsleep?  You can pass parameters for different modes to the deepSleep call.  I'm guessing that any sleep turns off WiFi, since the point of sleep is to save power and that's the only thing that's really using power.

I think I read that it reconnects on startup and its supposed to be pretty quick.  I suspect if you are sending results every second it might not be that quick or sufficiently beneficial.  I think the idea is you are sending readings every 5 or 30s and it takes about 1s to wake up and connect and send the reading.  So shutting down for the other 4 or 29s counts as a considerable saving.  The link I read was a guy who's done this and had one running for a year or so on a single set of AAs I think.

Those batteries I had on logobot scribbler are about 650mah and I flattened two and maybe a half on Saturday, buts that's with driving motors and servo as well.  So probably with some 2000mah AAs you might not need to worry too much.

On 25 August 2015 13:00:43 Damian Axford <dam...@axford.me.uk> wrote:

yeah - graphs could be fun...  not sure how many samples I can pack in the RAM of the ESP :)

I found that deepSleep stuff.... problem is, I only want a light sleep.  Datasheet seems to suggest this is doable, but haven't found the relevant routines to actually do it - nor the implications on wifi connectivity.

--

Damian Axford

unread,
Aug 25, 2015, 8:23:23 AM8/25/15
to swindon-hackspace
hmm... from the API, it looks like the optional modes only affect what happens after deep sleep, not the sleep itself:


The little wire bridge looks right fiddly - don't fancy trying that with my crap-o soldering iron tip.

there's a hint at a modem-off mode... more digging required

as to interval, totally agreed - it's only 1sec as a starting point.  Plan was to locally sample every 1 sec, accumulate an average and then transmit every 20-30 sec to keep the radio off most of the time


Robert Longbottom

unread,
Aug 25, 2015, 8:34:34 AM8/25/15
to swindon-...@googlegroups.com

Ah, okay, interesting.  I'd not done any digging.  I don't fancy the soldering challenge either really!

A few links I've just read imply that modem_sleep is the default in station mode (what the kits will be) So you're probably already getting it.

Damian Axford

unread,
Aug 25, 2015, 8:37:04 AM8/25/15
to swindon-hackspace
there is a promising mode option:
WiFi.mode(WIFI_OFF)

but forum posts suggest is doesn't actually reduce power usage.  There are other posts hinting that a reset is needed to actually shut the wifi modem off (and turn back on) - via the deep sleep command.  Although directly triggering a reset via reset() might work - will test later.  Of course, that would make accumulating and transmitting readings tricky if there's a reset in the middle :(

Writing to flash is an option, but at 100,000 erase/write cycles, it'd only last 100 days of 8hr usage.  don't really want to use any more external components.

I would be interested in adding wind power however :) perhaps a mini 3D printed turbine

Robert Longbottom

unread,
Aug 25, 2015, 8:49:05 AM8/25/15
to swindon-...@googlegroups.com

Couldn't you :

boot up, WiFi off.
Collect some readings.
Turn on WiFi, send readings.
Reset()
GOTO 1

I suspect you would struggle to generate enough power with wind, though I do want to look into big 3d printed wind turbines for charging 12v batteries.  Probably better to just carry more batteries!

External ram chip? Google Arduino spi ram :-) £1.20 for 32k from hobbytronics.  If you were clever you could probably keep data in external ram while resetting the ESP...

--

Damian Axford

unread,
Aug 25, 2015, 9:00:28 AM8/25/15
to swindon-hackspace
unfortunately you seem to need to reset to turn the wifi on and/or off...  the external SRAM or an I2C EEPROM would work fine, but requires another chip :(

might just leave as is for....  will just use up a lot of batteries

Robert Longbottom

unread,
Aug 25, 2015, 9:02:54 AM8/25/15
to swindon-...@googlegroups.com

Yeah, I guess so long as they last for the length of the flight, just get some rechargeable, freshly charged set each flight, job done.

On 25 August 2015 14:00:30 Damian Axford <dam...@axford.me.uk> wrote:

unfortunately you seem to need to reset to turn the wifi on and/or off...  the external SRAM or an I2C EEPROM would work fine, but requires another chip :(

might just leave as is for....  will just use up a lot of batteries

Damian Axford

unread,
Aug 26, 2015, 6:18:20 AM8/26/15
to swindon-hackspace
And here are the prototype modules, on their way to Scotland:


The software is working nicely and the kite module is robust to lost connection, generally reconnecting within 5-10 sec.  Range is also pretty good, I was able to test to 500 ft (150m) line of sight with no loss, I expect it'll go further, just need a bigger field to validate!

We'll see how Andrew gets on with them over this weekend...  

Robert Longbottom

unread,
Aug 26, 2015, 7:45:30 AM8/26/15
to swindon-...@googlegroups.com

Neat. Have you done anything specific wrt to reconnecting it WiFi if the connection is lost, or is that just out of the box functionality?

--

Damian Axford

unread,
Aug 26, 2015, 8:06:39 AM8/26/15
to swindon-hackspace
nothing too clever - it just checks connections status in the main loop and then breaks out into a reconnection routine if it drops.  

The actual reconnection itself is automatic (out the box), this just prevents it jamming up trying to send readings without a connection
Reply all
Reply to author
Forward
0 new messages