Need to send an SMS from a barn

I "need"... (want!)... to put a device in an isolated barn.

There is electricity, but no landline phone, no internet.

There's a store-room that has to be kept above freezing, and has heaters to take care of that... but I want an alert to tell me if for some reason they aren't working.

I thought: I know! Set something up to act like a cellphone, send an SMS!

For the sake of this discussion, let's keep things simple: I'll put a thermostat in the barn, set it to 35 degrees. Wire to a digital input on the Arduino (or similar). Contacts in one state: All well. In the other... Send an SMS. (ONE SMS, until reset... or some other "stream of SMSs preventing" algorithm. Large swaths of the project hold no fears for me... it is "just" about how do I get an SMS to go?

The more I looked, the more confused I became. The MKR1400 seemed a candidate, but there are many worrying posts in the relevant forum board.

And then I just got lost with the various SIM options. I want a simple "pay as you go" contract, preferably cheap because it is restricted to SMS use.

To make matters worse, I was hoping for a solution that could be deployed in either the UK or the US.

If that's a demand too far, I'd still be very grateful for help with a way to START in the UK, with a good chance that just changing the SIM would "covert" my solution to a solution for the US.

(Yes, of course, my want isn't actually exactly about a barn. But if you can tell me how to do that, it would suit the more complcated thing I DO want this for.)

The MKR1400 is the equivalent of an Arduino Zero with added 2G and 3G capabilities.
So you need to decide is a Zero would do all the things you want to, apart from sending the SMS message.

If it does not then the other option would be to use another Arduino and add a GSM shield.
Here is a tutorial;

You should design your code in two parts. The logic for the control aspects and the logic for sending the SMS messages. That way if you need to make changes for differences between the US and UK you just change that part of the code.

An obvious first step is try sending an SMS from the Barn with a mobile to check that there is mobile coverage.

I did buy a GPS/GPRS module to play with, but I never integrated it into a project. It was this one, but from another supplier: https://www.banggood.com/SIM900A-Smart-Electronics-GPRS-A6-Module-Wireless-Extension-Module-GSM-GPRS-Board-p-1111193.html

I got as far as a few experiments, putting a prepaid SIM card into it (this one allowed a few free SMS messages per day - but that depends on the provider, plan etc.) and connecting it to a serial console on my PC via a USBTTL device. I got as fas as setting up test calls to a cell phone, sending SMS messages etc. simply by entering "AT" commands on the serial console like this:

// Send an SMS message (note the ascii 26 char at end)
AT+CMGF=1 
AT+CMGS=+41792086011
My Test Message
[]

But I did not go any further.

Anyway, the problem now is that the Telecoms providers here are dropping support for the older network technologies (2G etc.) and this device will not be usable here after the end of the year.

I may continue these experiments when I find a cheap device that will be supported.

What is your real goal?
Sounds like a commercial product.

If it is your property you should have basic internet access somewhere
LoRa can reach pretty far.

Do what ardly said.
Develope the sensors and logic in one tab.
Develope the conmunitions in a second tab

Put WiFi in one tab
2G in another
LoRa in another

Bluetooth on setup let the user pick

Thank you Ardly, 6v6gt, Dan-n-J... Yesterday was not my first attempt to breach the fortress of SMS via GSM, and at the end of 5 hours, I was pretty much out of steam again, with a strong feeling that it Just Doesn't Work reliably, and if you get as far as that, you've built a house on sand...

Dave-n-J: Apologies of this sounds ungrateful, but for the sake of future readers: No, not a commercial product. Why would that matter? No, no internet access, or LoRad. And who would develop a 2G device today, with the 2G networks being shut down? Adding WiFi and LoRad and Bluetooth to a project that doesn't even work with the core medium that it is being built for makes no sense to me. DESIGNING it so that ADDING those things later WOULD be Good Practice... the sort of thing that a Good program has, whereas "One That Works" doesn't.

But you re-invigorated my quest by reassuring me that I have, sort of, grasped some of the basics. I do seem to have figured out some of the right questions!

And Ardly's "Try sending an SMS with your cellphone from the barn" was a wonderful example of how often a simple idea can be hard to arrive at. I WAS worried about the question of coverage... but (duh) hadn't realized that there was a simple path to a good answer! As I say... I've found the quest exhausting. (And I'm not one to "be beaten"!) ("Obsessive geek" is such a harsh label...)

(His point about designing the code in two parts is also excellent, and should be taken to heart by all. Two MAIN parts, and "parts-within-parts". Top-down design/ bottom-up development, and all that.)

My biggest worries now are...

a) "How long will support of 3G be there?" (No "answer" to that one, of course... but I point the danger out, for the next novice reading this thread. And, to the same, DON'T buy a 2G device. (And, by the way, some //devices// are region-specific.. and that's before you even get to the further restrictions imposed by your SIM card contract.)

b) Which 3G device should I try? At this time...

i) I lean towards the MKR1400...

(By the way: It does seem to require, for easily believed tech reasons, to REQUIRE the presence of a LiPo battery, even if you are continuously supplying a voltage to the system from other sources. Many sources will tell you "at least 1500 mAHr"... including one that looks to be an "official" Arduino datasheet. However, Arduino MKR GSM 1400, 16 Jul 2020 says 2500mAh Minimum)

ii) But the Adafruit Fona8 is attractive in other ways.

... and both are covered in "red flags" which say all this smoke can't JUST be coming from people who are trying to do too much with too little knowledge.

One of the biggest red flags: None of the suppliers show any signs of customers taking the product up. Comments/ Reviews pages are mostly empty. Stock levels are low. Etc. Nor do the suppliers seem to be putting much effort into the products. Very limited material or links to related products at their own site (batteries, antennae). And not many suppliers carrying it at all. Even the Mighty Amazon seems to yawn.

===
There ARE many ways to come to grief, even for my "simple" wants.

And I haven't even started on the SIM card issues! (Be sure to "go for" "MicroSIM" physical format... I think.)

===
Antenna... My best guess at this stage? The device MAY have an onboard antenna. It MAY be adequate. The board MAY have a "micro UFL connector" for connecting an external antenna. Antennae selection may be tied to the frequencies used by the 3G network you are trying to connect to. If so, GSM World Coverage Map- GSM Country List by frequency bands may be of help.

===
I have never experienced the trouble I've had in this quest... "Trouble" in the form of absent, conflicting, and contradictory "information", even when I apply "filters" to only consult reliable sources.

My bottom line: Embark on trying to use GSM with any microcontroller with a great deal reluctance and trepidation. You may well get greater pleasure from other projects. If only I could take my own advice!

Maybe 3G has also no long future in some places.

There are Arduino 4G (LTE) options for example (but not necessarily a recommendation) :

https://www.dfrobot.com/product-1834.html

At least one provider here is now offering a LORAWAN service, but I'll wait until that has matured a bit before spending too much time looking at it.

tkbyd:
I thought: I know! Set something up to act like a cellphone, send an SMS!

Not to talk you out doing this as an Arduino project, but have you considered using an inexpensive cellphone? There are apps that perform this sort of function, that is, take a temperature reading from a sensor that normally monitors battery temperature and which can be configured to sound an alarm or send a message.

If you can't find an app that does precisely what you want, I believe the necessary programming interfaces (battery status and SMS messaging) are exposed in AppInventor, a greatly simplified Android development environment.

The point i was trying to make is that you can have a tab for every possible type.
2G
3G
4G
5G
6G
EKG
LoRa
WiFi
Satelite
Cans with strings
RF

And then connect what you want in GB
Use your setup to select which is connected
Do the same in the USA

As for commercial vs. Hobby.
How deep you need to go to address problems you have not thought of yet.

.
https://blog.arduino.cc/2019/05/21/arduino-sim-the-new-cellular-connectivity-service-for-the-
arduino-iot-cloud/

.

Very excited by...

There are Arduino 4G (LTE) options for example (but not necessarily a recommendation) :

https://www.dfrobot.com/product-1834.html

(Won't work in US, I'm afraid, but I think it has a lot going for it, other than that!)

The Rockblock satellite modem works everywhere in the world. Pay as you go and Arduino compatible.

Rockblock! Very sexy indeed!

The following NOT to disparage the suggestion, but to save some having to look further...

Basic "box": $285+tax and also either needs clear sight of sky (create your own housing, put unit on roof... or make it work with a 1.5m antenna (more expense) or buy the unit MEANT for a roof ("Rockblox+"... much more expensive)

And then there's $12/ month, for each month you use it once in. (But nothing each month you DON'T use it...

AND a much smaller "per byte sent/received" charge.. small, unless you have lots of traffic.

===
It does (a little) VERY WELL (if it lives up to specs)

It can send or receive small (about 500 bytes) packets. You tell it what you want sent via a serial stream. Mostly "AT commands". It sends it. It goes to a server. The server will pass on to you via email, or a push to a server... if you have a server set up to deal with incoming pushes.

It can also receive packets, but I'm not quite sure what happens to them. I would assume they are passed to the controller over the serial connection over which "send this" commands and data are give TO the Rockblock, but I don't know.

===
As I said... very sexy... but a little expensive for my wants, and "only" able to pass data to me via emails.

Admittedly, that could be enough... and there do seem to be numerous "email to SMS" services... Oh joy! Another option to explore... another link in a chain I will want to depend upon. Unless I can find a better solution! (^_^)

Further to...

Excited by...

https://www.dfrobot.com/product-1834.html

Is it a niche product? Too new? Can't find anyone who seems to be ACTIVELY selling it. DFRobots' list of distributors seems to be anyone who sells any one of their products. Site after site has nothing for "dfrobots 7600", and the few that do have no further information that is at DFRobots. And no reviews, customer comments, etc.

I'm stuck at present at "Does the 7600 use a "StandardSIM", "MicroSIM" or "NanoSIM", please?" Submitted to DFRobots two days ago. Admittedly, I write this on a Sunday morning. Fingers crossed for something from them soon. If THEY aren't interested in their product, my interest will flag!

(Reminder, for the many US readers here: Won't work in US)

(Sorry… I know this has drifted a ways from Arduino-land… but perhaps others want ways to deliver Arduino-generated data to recipients>??)

Further to…

Use an email-to-SMS service…

Turns out that’s quite easy, if you are lucky… Excellent information at…

Only snag in the easy answer: It only works if the cell-phone you want to send the SMS to is on “the right” service provider. But if it is, and you find the “secret address”, it’s as easy as…

Let’s say the NUMBER you want to send to is 1-555-123-4567
And that it is serviced by T-Mobile

I’m told you only need to send the email to…

15551234567@tmomail.net

Simples!! (^_^)

AD DISCLAIMER
Complete product
www.SL4P.net
4G compatible - Does what you want. Today.
Using any TinySine (SIMCOM) modem shield.

Just started working on a new ARM based version with lots more scalable I/O and IP connectivity. And a lot more features.
You’ll have to wait a couple of months for that though.