Wait and send SMS

edmunds

Senior Member
Dear all,

I have an idea for a product. For understandable reasons I do not want to disclose it entirely at this point, but electronics part is just that - electronics.

Imagine there is a device, that needs to sit under water (up to a few metres deep) and be able to monitor a hall sensor for 'magnet' or 'no magnet'. It also needs to notify the owner of the device by sending an SMS if the status has changed and possible once in 24 hours just to say it is still alive, but there 'are no news'. There can be several of these devices in an area - say a few hundred metres apart from each other. The device does not have to be tiny, but bulky is also not an option. The size of a wristwatch would do. Think the bulkier versions if you like.

It will need power - could be Lithium coin cell. It will need to be re-charged - know how to do that from my miniature wireless charged cars project.

It cannot have openings for SIM cards and it will be difficult to build an enclosure watertight enough if it is possible at all. Also, it would not be very practical for the owner to maintain more than one mobile connection if he owns several devices, which is likely.

So, we need a basestation of some kind. Potentially, underwater devices communicate to the base station their status every 5 mins to 1 hour over RF. Here comes the unknown:

1) I know how to build bluetooth solution small enough, but it would not reach a few hundred metres needed;
2) I have no experience with other types of RF and pointers would be appreciated - an ebay module will not fit the size requirement, however attractive from price and simplicity perspective;
3) Radio waves are said not to travel well in the water. However, I do not really need well. I need something like 'device one;battery OK;closed', 'device two;battery OK;open'. That is a single byte of information at most that needs to get through;

Then, when we have many devices, we need to be able to see all of them are connected to the base station and are ready for communication. So there needs to be some sort of handshaking and getting to know each other. One way would be to have a device with a UUID in the underwater thing, but that would be a lot of bytes to send every time. Of course, aliases could be assigned to each device after handshaking has taken place once, but this introduces two-way communication.

4) Does picaxe/pic have some unique ID that would be unique enough for this sort of purpose?

The base station part of integration to some GSM/GPRS module, power management and some setup interface via bluetooth or computer are all things requiring some work, but no particular challenges that I can see at this point.

When I have written it all up it sounds a bit like an IoT project of some sensors scattered around a building and connection to a central hub every now and then, except mine would lay under water :). Of course this could be complicated with GPS in each underwater device and some smart phone app that would let you see where your underwater gadgets are etc., but that should probably stay for later.


All ideas and feedback welcome and thank you in advance for your input,

Edmunds
 

rossko57

Senior Member
There's more than one way to do these things. Your most serious technical hurdle, and we can assume it is a show-stopper unless you solve it, is low power wireless from under a few metres of water. Tackle that first, details later when you know what kind of communication you can achieve. There might even be a mechanical solution - sensor surfaces to transmit, or extends an aerial bouy?
 

eggdweather

Senior Member
There's more than one way to do these things. Your most serious technical hurdle, and we can assume it is a show-stopper unless you solve it, is low power wireless from under a few metres of water. Tackle that first, details later when you know what kind of communication you can achieve. There might even be a mechanical solution - sensor surfaces to transmit, or extends an aerial bouy?
I agree, try sending a text message from a few metres underwater, I'd be very surprised if it worked, unless you just happened to be under a cell phone mast! Salt water is highly conductive, fresh water much less so, therefore salt water losses will be very high and at typical RF frequencies (300-400 MHz or cell-phone double that) losses in both cases will be prohibitively high. Underwater communications typically use very low frequencies say 10-20KHz which is very difficult and expensive to generate. You could have a floating antenna to solve the EM losses of being underwater, but that would require n-metres of coaxial cable or conversely site the transmitter on the surface of the water too. RF based aircraft emergency beacons all float AFAIK, but ultrasound / sonar to a surface receiver could work.

Other factors to consider, using a cell-phone system is power hungry when sending (e.g. an Arduino SMS shield) but in standby are not too bad, at typically 2mA, however a coin cell (or more in series to provide the supply voltage) would not last long, I estimate about 3-4 days based on CR2032 capacity of 200mAHr / 2mA = 100 hours.

I think the only way to try this is to do an experiment. There are more than a few devices on the market that have SMS capability and send their position if disturbed like those fitted to vehicles, these could be adapted to your application, plus they are cheap. Most e.g. http://www.ebay.co.uk/itm/Motorcycle-Realtime-GPS-GSM-GPRS-Tracker-Phone-Locator-Anti-Theft/252147018855?_trksid=p2141725.c100338.m3726&_trkparms=aid=222007&algo=SIC.MBE&ao=1&asc=20150313114020&meid=1b0aec89477d4e158d2e4527c7d06f0c&pid=100338&rk=4&rkt=14&sd=182269579738 send their location via SMS when disturbed and have a rechargeable battery too. I have one somewhere, it does work, but keeping an SMS Cell-phone account active I found quite difficult because the providers close it down if unused in any month, so you must send at least one text/SMS to keep it working.

Your unique ID would be the cell phone. generating one would be (almost) trivial as only you would know what it meant.

Contention of devices all transmitting at random times would be handled by the cell-phone system if SMS based, but RF based would need some form of anti-contention algorithm unless you did a handshake with each device because the probably of a clash would be high, so random times between re-transmit would help if no handshake.

Back to what Rosssko57 said, you have a serious technical hurdle to overcome and that is underwater transmission in what is one of the harshest environments around.
 

Technical

Technical Support
Staff member
For a unique serial number (other than one you program yourself) consider 'readowsn' with a DS2401 (or DS18B20 which gets you temperature too).
 

Circuit

Senior Member
Having some experience with radio-controlled model submarines I can only see problems ahead for you. Old model transmitters running at 27Mhz seem to work okay - but not multiple metres underwater; just about a metre if the transmitter is not so far from the submarine. Modern 2.4GHz transmitters are pretty useless for submarine models; the higher the frequency, the greater the attenuation by water. I don't think that you are going to have much joy finding a commercially-available transmitter working at legally-available frequencies that will give you "a few metres" of underwater operation - you are clearly looking for serial transmission in order to transmit the ID and the message. If you did use a higher power transmitter then it would be unlikely to operate from a coin-cell.
 

edmunds

Senior Member
Thanks, all great and informative responses.

While I was intending to seal and drown some cheap RF module :), it seems almost useless after reading the posts above. It would not be a problem to have a float and it would probably not be a problem to house the entire device in the float. The only problem is the cable that has to run downwards to the hall effect sensor part. A fat cable will require a massive float. A thin cable will tangle and get teared. On top of that, the immersion depth will differ case by case, so a way to 'shorten' the cable need to be figured out.

Edmunds
 

hippy

Technical Support
Staff member
I think you are on a hiding to nowhere though you could probably create larger prototypes to prove the concept works. I think it is the miniaturisation while retaining functionality which will be the most difficult part of the idea.
 

Jeremy Harris

Senior Member
I've done something very similar many years ago. Forget RF altogether; you either need silly amounts of power or frequencies that are in the low audio region in order to get even a metre or two through water. Acoustics work very well and the solution we adopted was to have a base station that had a hydrophone underwater to receive the data from the remote units and that then used a VHF radio link to transmit data to a receiving station several miles away.

All the remote units used cheap 38kHz piezo discs, impedance matched to the water by being encapsulated inside some very soft PU rubber (not sure what it was). The remote units would send a low speed data sequence (similar to TV ultrasonic command rate) several times every 24 hours to the base station hydrophone, which was around 1/4 mile away from the furthest remote unit. Our units were disposable, and used a lithium primary battery that had a life of around 2 years in this application.

I'd suggest doing some testing using some cheap piezo discs, or waterproof car reversing warning sensors, perhaps, maybe using the inbuilt Picaxe ability to send data modulated on to a 40 kHz carrier (the irout and irin commands do this already). 40 kHz is close enough to the resonant frequency of a 38 kHz disc to probably work OK.
 

AllyCat

Senior Member
Hi,

Yes, forget RF, particularly Bluetooth/WiFi which uses frequencies very close to that of microwave ovens, chosen because water absorbs those frequencies extremely well. So a (semi-) floating "base station" seems the way to proceed.

As for the "local", under-water communications, use either ultrasonics or Infra Red, probably modulated at ~40 kHz. Infra Red perhaps would be easier, but might not give as much range, depending on the water and light conditions.

Cheers, Alan.
 

cypherf0x

New Member
In the US Navy I worked with UUVs and special purpose buoys for a while. You're going to have to forget any RF underwater outside of ULF which the US Navy uses to alert SSBNs. It's extremely low bandwidth, basically just an alert code to come up to periscope depth to communicate. Any usable RF would require an antenna above the surface. Many autonomous UUVs periodically come up to communicate, some buoys as well. The buoys tend to be oceanographic related, diving down using buoyancy control to record the temperatures and salinity of the water column then coming up to transmit that data. Two of the vehicles I worked on were tethered with fiber optics for communication.

Using hall effect sensors means you're looking for something magnetic, but the spacing you mention isn't feasible for a detection network. It would require a very sensitive magnetometer. It's something that's been done for a long time to detect the hulls of ships passing by for mines at first and detection systems for harbor security afterwards.

For communication with shallow water devices in fixed placement they're normally hardwired along lengths of cable. If you want wireless the easiest way in water is an acoustic modem which is the most common method. Using blue-green lasers or light has been tried but the clarity of the water and bottom sediment make it impractical.
 
Last edited:

hippy

Technical Support
Staff member
It is probably not simply coincidence that emergency underwater location beacons and a good few underwater tracking devices operate around 38kHz.
 

cypherf0x

New Member
Acoustic modems are mostly between 20kHz and 30kHz and they're not that small. To be practical for something small I'd say go old school. You'd need a good hydrophone in the area to pick it up but old fashioned morse code on different frequencies for different sensors. Have them beep every so often for a heartbeat and send out a solid tone or continuous pulse on detection. The second would require transducers for each sensor which aren't cheap, but at short ranges, heavily dependent on the transducers, you could get away with FSK for low rate data.
 

Buzby

Senior Member
Although edmunds has not specified exactly what his project is about, I have a suspicion that the best solution does not involve a Hall Effect device, but uses a mechanical trigger to release a tethered radio buoy.
 

rossko57

Senior Member
I'm guessing crayfish pot theft alarm! Releasing a buoy that could be interfered with might not cut it in the actual application. For an alarm you'd really want positive "OK" signalling, and action upon the absence. Really not easy to solve.
 

edmunds

Senior Member
I'm guessing crayfish pot theft alarm! Releasing a buoy that could be interfered with might not cut it in the actual application. For an alarm you'd really want positive "OK" signalling, and action upon the absence. Really not easy to solve.
Not far from it and for the purposes of exercise we can well assume it is exactly that :).

Thank you all for your responses so far. The hall sensor really has to be under water and its only function is a waterproof switch. The challenge is then, how to get the three wires above water for transmission. While I'm thinking about it, there is a 'safety wire (not electrical, just metal thread)' not to loose the crayfish pot coming to the shore anyway. So adding one more or combining the two in some way should not be impossible. There could be some kind of 'clip' to attach the transmitting part to a nearby tree branch or something. Provided the transmitting part is also wireless and does not afraid of being dropped into the water while the crayfish pot is being manipulated, it should work.

What would be the most effective radio solution for the device-to-hub network? Range of up to 1km, two way communication is probably more future safe than one. Low idle power to maximise battery life. Small.


Thank you for your inputs,

Edmunds
 

Jeremy Harris

Senior Member
If you have a buoy of some sort, physically connected to the underwater device, or devices, then that opens up far more possibilities. Lobster pots here are often marked with pretty much anything that will float, plastic containers with handles for a rope are often used, rather than proper buoys or marker floats. Often a cane with a small coloured flag is attached, as an aid to finding the marker for recovery.

If you had something like this, then it would be pretty straight forward to make something that would fit, hidden, inside the float, perhaps using any marker stick as a covert antenna mounting. You might even be able to make it solar powered, by using a clear plastic bottle with the circuit inside. A wired connection to the sub-surface part should be fairly easy. Thin "pond cable" (intended for underwater pond lights and pumps) is pretty tough and waterproof, and is relatively unaffected by exposure to sun light. You could use pretty much any low power radio module to signal back to a base station that would then transmit something like an SMS. The LoRa range are probably the best bet in terms of low power and long range, but the cheap HC-12 modules discussed here: http://www.picaxeforum.co.uk/showthread.php?28893-HC-11-and-HC-12-transceiver-modules are a cheaper, and simpler to use, alternative you might want to consider.

You could use a daisy-chain-link type of system, where one unit transmits initially, its transmission is received and acknowledged by the next in the chain, which then repeats this process, sending and acknowledging data down the chain until the final unit transmits the entire data packet to a base station. The advantage of this is that only a single unit needs to have a timer to initiate the data transmission, but it suffers from the problem of being prone to failure if one device in the chain fails, or doesn't receive the signal. The alarm signal could be initiated by any unit in the chain and would be forwarded on immediately.

The alternative topology would be to have a star-type arrangement, where the base station is the hub that initiates the "are you OK?" signal, and either each unit responds after a different time delay (so they don't all transmit over each other) or each unit is individually interrogated in sequence, by an ID used as an address. The alarm signal would be initiated by any remote unit, at any time, directly back to the base station.

There are advantages and disadvantages to both methods, but if you can be sure that the base station is always going to be within range of all the remote units, then the star topology is probably the most reliable. If some of the remote units may well be out of range of the base station, then the daisy-chain topology has the advantage of extending the range, as the base station only needs to be able to communicate with the nearest remote unit.
 

hippy

Technical Support
Staff member
One problem, with anything other than a direct to home station link, is that every link within the chain has to be able to receive the signal sent to it. That may not necessitate receivers being on all the time but will require them to be on quite a lot of the time which can impact on power requirements.

Another issue may be how to deal with multiple sensors transmitting at the same time and the potential for data corruption, both "I'm alive" confirmations and "I'm being kidnapped!" alarms. If multiple alarms go off at the same time it is not necessary to detect them all, but at least one must be received and detected as such.

As well as mechanical and technical challenges I am guessing there are also cost limitations.
 

edmunds

Senior Member
Hi all,

I ordered a couple of RF module options from ebay today. They are a month away as usual. In the meanwhile, I have made a mockup of the underwater unit. I used a thin, broken USB cable for now, did not think of the aquarium cable. I guess it will work for testing, however. I have put everything into silicon to make it watertight - we shall see in some 24h if that worked.

In the meanwhile, I can sort out the picaxe parts of the floating/clip-on thing and the base station.

I was thinking star arrangement and my high level idea was to have each underwater device to send data every 60 minutes for 3 times with random, few minute intervals in between the reports. This way, if the receiver happens to be busy receiving some other report, it would likely be able to receive the second or the third report as a last resort. Only in case 60 minutes + max random time has passed, the underwater device should be reported as lost. However, this will work on condition a transmitting device 2 will just not be received while the device 1 is transmitting. In case the transmission will be corrupt also for the device 1, there is probably little to do to avoid two-way, master-initated communication requirement.


Regards,

Edmunds
 

eggdweather

Senior Member
Achieving reliable 1km range may be difficult, but most countries sell FRS/PMR radios usually made by Motorola and operate on 446Mhz, which given they are usually $20 per pair might make a very useful sacrificial source of Tx and Rx plus they neatly and always use tone codes to open the channel, that could be utilised. Kiddies versions are usually even cheaper but with the same internal design and all of these are licence free. Range is up to 1-mile, many miles if in open terrain like water. Your data input could be wired to the Mike input and data out the speaker. Ditch the cases and you have a compact system. See https://en.m.wikipedia.org/wiki/PMR446 I got a pair from Walmart for $22
 

edmunds

Senior Member
@eggdweather,

Thank you for your suggestion. Situation improved by my realisation I was thinking of the underwater devices being at most 1km apart. If they do not have to be able to talk between themselves and the base station is placed in the middle, the needed range decreases to 500m which can be expected to work with simple 433MHz units in favourable environment.

Edmunds
 

edmunds

Senior Member
Update.

The RF transmitter/receiver pair arrived today. It took me a bit to port everything to 40x2 from the initial 20x2 because RFOUT and RFIN are not available on 20x2. No problem there, as if this ever makes a product it will be 40x2 anyway. The rest was just amazingly simple - it worked on the first try! I'm successfully sending and receiving previously set up address of the "underwater unit" and state - just an "alive pulse" every few minutes or "alarm". The transmitter is running at k31 clock frequency most of the time to save power. No other sleep features have been used so far. The power consumption is below one milliamp as my power supply shows 0.00A, but have not measured precisely yet.

Now waiting for the second rx/tx pair to test multi-unit algorithm and the GSM module. Need to make the second "underwater unit" from silicone now and find something to serve as temporary floating/clamp-on waterproof case.

Edmunds
 
Top