PICAXE as timer for GPS Bottle

srnet

Senior Member
Please don't forget my requirement said very early on: I can live with timers that are not particularly accurate. However, results so far are encouraging. I'll report more in due course.
And you also said you could live with 30 seconds in 4 week.

I think you need to be far clearer on what 'accuracy' you want.
 

srnet

Senior Member
I take it from that you think differently?
As I said, I have no data, and this would only be my estimate. If you have data on clock drift with extremes of temperature etc, I'm sure Robin would be very greatful, as would I. :)
Sure do.

Well, I had to check my notes "Test for Temp Stability of INTOSC" and I recorded a variation over a 25C range of 1.4%, on a 28X2.

Pretty good for a RC OSC really and in line with the datasheets so no surprises there.

It represents a drift of about 520 secs in 12 hours.
 

manuka

Senior Member
Good luck-perhaps at least trial "bottling" a cheap smart phone? Android GPS tracking apps. now abound!

FWIW I'm up with the channel geography (& once lived coastal Sussex), but "5 miles offshore Ramsgate" is almost stone throwing distance here! NZ's nearest neighbour (Australia) is some 1300 miles away-in EU terms that's about London to Libya...
 

Robin Lovelock

Senior Member
Thanks Folks, and Good Morning from a sunny UK.

I'm pleased with progress so far, with a simple PICAXE solution in sight.
I've included the BTIMER.BAS program below, as someone asked for it.
I'm currently testing on an old PICAXE 08M Proto board, and will soon be testing on PICAXE 08M Servo Driver
(AXE024) to confirm it behaves the same way.

Tests yesterday, until I checked at 0800 this morning look encouraging:
about 1 second gain every hour, in room temperature of about 20C+/-2C.
i.e. It was about 10 seconds fast after starting at 2200 last night.
I will adjust the number in "pause 26900" below to try and get better accuracy
- for the expected temperature of the Solent sea water in July.

Yes, temperature is the main influence on stability in timing:
I stuck the working system in my boiler cupboard, with the digital thermomenter,
and the 35C made it gain 2 secs in just 20 minutes. i.e. 6 secs per hour.
Later in day I saw the posting by SRNET in which he gave his data - many thanks.

Luckily, for this "GPS bottle in sea" application, we can exploit the stability
of the sea water temperature, and locate the PICAXE low in the bottle, to keep
it's temperature as stable as possible. I'll soon be doing tests here, with
a prototype bottle in our pool out back, or a bowl of water kept at Solent temperature.
The Net should give me a first guess at Solent sea temperature, and I'm sure
a friend there can stick a thermometer in the water for me this week :)

I found far less variation in timing due to PICAXE supply voltage:
No noticible change (of 1 second) over typical at least an hour,
trying 5.5v (from Mallory cells) or the NiCads used which varied
between 4.18v and 5.47v when fully charged.

I'm relaxed about supply voltage because, in my solution, the 5v NiMHd PICAXE
supply will be trickle charged from the main 10v supply used for the tracker.
Probably a little flashing LED or two. I'm close to wiring this up and putting
outside for 24 hour testing, so I will see the variation in voltages and timing
through night and day - a few of which may also be sunny.

I'm also pleased that I've not yet used up my self-imposed 4 hour budget of time for this
part of the hobby project.

In fact, I'd even be interested to hear if anyone has simple, detailed instructions
on how to add a crystal based solution to what I already have, to make it more accurate.
If the instructions are precise enough, it may be worth my giving it a try.
Hopefully at least one of you have done it before.

Many Thanks to all of you.
Robin
www.gpss.co.uk/bottle.htm

p.s. I see Manuka is in Wellington,NZ. Let me check my links pages ...
... 8 guys, of the 10,561 in 165 countries - but for many it was years ago.
I'd need your street address or lat/lon to see if one is within walking distance
- not something for this Forum of course :)


Code:
'Moves servo 1 for 2 minutes every 19 minutes.
'This servo will be replaced by a servo switch to switch on and off GPS tracker.
servo 1,100 : servo 2,100 : servo 4,100 'initiate 3 servos
pause 1000 'pause 1 secs
w1=18 'counter for minutes until switch on
w2=2 'counter for minutes until switch off
gosub swon 'start with switch ON

top1:
gosub wait1m 'wiggle servos 2 and 4 every 60 seconds
w2=w2-1
if w2>0 then goto top1
gosub swoff 'swich OFF after 2 minutes
w2=2

top2:
gosub wait1m 'wiggle servos 2 and 4 every 60 seconds
w1=w1-1
if w1>0 then goto top2
gosub swon 'swich ON after 18 minutes
w1=18
goto top1

wait1m:
servopos 2,200 : servopos 4,200 'move two servos one way
pause 1000 'pause 1 sec
servopos 2,100 : servopos 4,100 'then move back
pause 30000 '30 secons delay - approx ?
pause 26900 'found by experiment to make up to exact 60 seconds
return

swoff:
servopos 1,100
return

swon:
servopos 1,200
return





Good luck-perhaps at least trial "bottling" a cheap smart phone? Android GPS tracking apps. now abound!

FWIW I'm up with the channel geography (& once lived coastal Sussex), but "5 miles offshore Ramsgate" is almost stone throwing distance here! NZ's nearest neighbour (Australia) is some 1300 miles away-in EU terms that's about London to Libya...
 

MFB

Senior Member
From my drift buoy work in the 70's, I seem to remember that the temperature of the sea around the UK never changed more than 10 C over the year. However, that was before 'climate change'.
 

Robin Lovelock

Senior Member
Nice to hear from you Hippy. Thanks everyone. I'll take a look at this stuff in a few days, after doing tests under realistic conditions, with the first new GPS bottles floating in a pool in my back yard. It's possible that I find bigger problems to solve in the total solution including power source, GPS trackers and web tracking. But progress looks good so far, and I'll keep that page below updated. I'll obviously check on any additional postings when I look again. Hippy: you say 1% (for an enhanced timer) - do you really mean worse than 30 seconds drift per hour ? That's far worse than I already expect to get from the tests here. Sorry if I'm misunderstanding you due to not yet having checked out the recent links, etc.
Robin
www.gpss.co.uk/bbcbot.htm

Check figure 15.2 in the 12F683 datasheet. The 1% tolerance is around 25C at 3V5, 2% otherwise, with 5% once you drop below 2V5, go below 0C or above 85C.
 

manuka

Senior Member
Here is a checklist of bits, for anyone thinking of making their own GPS bottle, based on free advice and software from Robin:

* GPS tracker. e.g. Concox GT02. £50 to £200, depending on source.
* SIM card with sufficient top up for several weeks. e.g. T-Mobile £40 ?
* NiMHd battery pack. Typically 9.6v 3300mA. £20 ?
* Solar cells to charge battery £20 ?
* Digital timer to reduce power consumption. e.g. PICAXE + relay. £30 ?
* 1.5 Litre clear glass wine bottle. £7 ? - but somebody must drink contents :)

i.e. in the ballpark of £200 of bits per bottle.
Yikes! Is this a realistic project given traditional jetsum perils? Keep in mind that the nature of GSM technology has a range limit of ~35 km of course too. Your darling may be half way to Normandy & coverage will be totally chopped.

Have you considered cheaper alternatives initially at least. Pop a PICAXE controlled £10 UHF CB transmitter in a bottle maybe? If you have a radio ham mate consider perhaps data over 144 MHz digi-repeaters,or even meteor scatter/LEO "OSCAR" satellites? As mentioned already, ham APRS is globally popular & costs nothing to run. Google shows there's a group even nearby your home => http://www.ekradio.co.uk/mb7usk/ . Knowing the way radio hams operate they may even donate gear for the quest.

FWIW off shore coverage of 144 MHz VHF signals is superior to GHz level cellular as well - you may even get lucky with tropospheric ducting & hear your bottle when its 100s of km out to sea. "Tropo" arises every summer, & on ~166 MHz marine AIS it can allow ships 1000+km away to be tracked. Refer sample below of ~5 Watt AIS shipping signals that were heard & decoded today from a shore station in Majorca, which used just a short whip antenna. At a glance one can see this greatly enhanced coverage is obviously tropo influenced-the effect often sets in for months at a time during a Mediterranean summer. William Hepburn's well considered tropo forecasts should get your pulse quickened. I'd say that with the very limited solar charging resource in the northern winter (brrr...), the bottle project may realistically be a summer one anyway.

As the bottle is obviously a slow mover, there's little real need to plot it real time. Hence a further approach may be to consider emerging weak signal modes that send very S-L-O-W data over several minutes. Signals below the noise floor can often be reliably detected & handled - GPS is of course typical. This is a very rapidly developing field & one I'm NOT (yet!) experienced in, however reports of <1W WSPR transmitters covering 1000s of km abound. Stan (ZL2APS but inactive)
 

Attachments

Last edited:

MFB

Senior Member
Self-heading effect on timing

When we were discussing the effects of temperature on the stability of the PICAXE internal RC oscillator, I don't think anyone mentioned self-heating. All our estimates of drift were based on potential enclosure temperatures, but the timing drift could be much worse if a number of PICAXE pins had to drive heavy loads (e.g. relays).
 

srnet

Senior Member
When we were discussing the effects of temperature on the stability of the PICAXE internal RC oscillator, I don't think anyone mentioned self-heating. All our estimates of drift were based on potential enclosure temperatures, but the timing drift could be much worse if a number of PICAXE pins had to drive heavy loads (e.g. relays).
Fair point.

If you could quantify all the possible variation, temp, voltage, device vartiation etc AND you can define what sort of stability or accuracy you want AND you had a pile of time to work it all out, then the internal RC oscillator may be a possible approach.

If you want simple and are short of time, then just use an external crystal or reasonator.
 

MFB

Senior Member
Quite agree srnet! Having had many serial communication problems when using the internal oscillator I now always use versions of the PICAXE that supports an external crystal for any critical timing. Not even sure I would trust a resonator.
 

srnet

Senior Member
Quite agree srnet! Having had many serial communication problems when using the internal oscillator I now always use versions of the PICAXE that supports an external crystal for any critical timing. Not even sure I would trust a resonator.
The resonator option is simpler to add, a single component, several orders of magnitude more stable that the internal RC, all for about 50p.
 

Robin Lovelock

Senior Member
Thanks Folks. Srnet - will this component fit straight onto the 08M boards I'm using now - particularly the PICAXE-08M Servo Driver boards which should arrive here tomorrow ? Can you give specifics of what I should order and from where, and exactly where to connect ?

Meanwhile, first sea tests with the BBC are planned for next Tuesday, and latest progress has been updated on www.gpss.co.uk/bbcbot.htm including links to the the three web based maps.

I expect to bring the three bottles back home with me, so I have a few days for final changes, before they have them to use "for real".

Robin
www.gpss.co.uk

p.s. the radio hams among you - thanks for the suggestions - already discussed with other hams for deep ocean robot boats, where the only other known practical solution is SPOT. But, as always, "belts and braces". We've discussed use of long range "wisper" communications. There's some ancient history of my software on www.gpss.co.uk/radio.htm including APRS and Bob B who invented it. I'll be interested if any hams come up with a working solution (rather than ideas) which could be used in future robot boats in Microtransat. Obviously a different timescale than this little bottle project.

The resonator option is simpler to add, a single component, several orders of magnitude more stable that the internal RC, all for about 50p.
 

srnet

Senior Member
As the manual says, Pixaxe Manual 1 page 46, on the link at the top of the page, the 08M does not have the external resonator option. Altough the PIC processor itself (12F683) can be fitted with a resonator\crystal if you fancy programming in Mikrobasic for instance.

I am no longer sure what is important for this device, minimum component count, must use an 08M or accuracy.

If it needs to be ultra simple I would be choosing a 12F683, with a resonator and programmed in Mikrobasic (a basic compiler which is free for this size of chip).

In PICAXE and for ease of programming, it would be a 28X2 with a resonator, I would not even consider depending on the internal RC of something like a 08M.
 

MartinM57

Moderator
will this component fit straight onto the 08M boards I'm using now - particularly the PICAXE-08M Servo Driver boards which should arrive here tomorrow ?
I'm pretty sure that the answer is "no chance whatsoever".

The discussions above about crystals/resonators are pretty much about PICAXEs that support external crystals or resonators "out of the REV Ed box" - this does not include the 08M.

However, Hippy's work about making a DS1307-alike from a 08M does fit a crystal (a 32.768KHz watch crystal, not the 8Mhz/16Mhz etc types that most people would use) to an 08M, but using/abusing some of the 08M pins away from their intended purpose. One limitation, for example, is that you cannot program a 08M in the same board that it runs as a DS1307-alike - which I am sure would preclude doing anything like what you may be thinking.

IMHO (if you don't mind), this is getting out of control - we have a million words about the issue, a resistance to use other than the absolute cheapest components (even though a bottle is going to cost £200 I recall reading) and electronics experience that isn't consistent with the (apparent) complexity of what is trying to be achieved (actually I don't think it is that complex, but it's certainly hard going at the moment). I'm not sure what to suggest...but I will watch with interest. Good luck... :)
 

Robin Lovelock

Senior Member
Thanks Folks - all very illuminating. I'd love to know how long some of you would take to put a working solution together. "this is getting out of control" - yes, for some of you maybe - but not me :) I'm glad I did not spend more than the 4 hours I'd budgeted myself for this small but important PICAXE part of the "bottle" project - I always said accurate timing was not essential, but it seems as if the 08M without Xstal will give me within a few seconds per day - based on my tests here. The main thing is that it works, and the majority of the time my total power consumption is only about 6mA - probably enough for those little solar cells inside the bottle. A few pages have been updated, including the BBC Radio Solent website, which you will find linked from www.gpss.co.uk/solent.htm Many Thanks again, all of you: this forum is always of great help, and it's useful to see what individual responses are like - ready for if a really important job comes along ;-)
Robin
www.gpss.co.uk
 

srnet

Senior Member
I always said accurate timing was not essentia
Not really what you said in posts #13 and #18.

Most people in here, would I suspect on reading those have gone straight for a 28X2, since this does not sound like a project where you need to save every last penny or the electronics needs to be ultra small.
 

Robin Lovelock

Senior Member
Thanks Folks again. The project with BBC Radio Solent has been a great success, and is still ongoing - as you can see from the pictures and information on www.gpss.co.uk/bbcbot.htm - after the three bottles were launched last Monday 11th July. On SRNeETs last post ref cost - don't forget that "time is money" - every hour of it - take a look at the very bottom of the page above to see the cost of my time :) To be more serious - for a rare moment - anyone, particularly radio hams, who have working and tested communications solutions, that could be applied to deep ocean robot boats - please contact me direct on my usual gpss@compuserve.com
Take Care and thanks - all of you.
Robin
 

srnet

Senior Member
On SRNeETs last post ref cost - don't forget that "time is money" - every hour of it - take a look at the very bottom of the page above to see the cost of my time :)
The cost of a 28X2 with resonator over an 08M, is what, £3 maybe ?

No brainer really, given the extra accuarcy you can get. And dont forget design creep, when you get the question, "ah but could you add this ......"

Anyway, I am interested in the glue you talk of, a glue that is strong enough to reliably butt oin a glass bottle that been cut in half ?
 

nick12ab

Senior Member
take a look at the very bottom of the page above to see the cost of my time :)
Which post is this? In the User CP, you can choose to have 10,20,30 or 40 posts per page so 'the bottom of the page above' could mean anything to any forum user who hasn't been following this thread like me.
 
Top