Go Down

Topic: Can an Arduino send a dialup email message? (Read 5528 times) previous topic - next topic

Roger at CCCC

Can an Arduino send a dialup email message?  
I live on a campground with a remote building where the furnace sometimes quits.   The building has a telephone line, but not ethernet, and not (currently) a computer.  I'd like to be able to put an Arduino there, have it collect temperature data every half hour or so, and then send a dialup email over the telephone line containing the temperature data.  But can I do that with JUST an Arduino, or will I have to have a computer there to do it?  Or is there some better to remotely monitor the temperature in the building?  Thanks in advance for any suggestions.  

dcb

Oh, cool idea :)

I don't know about creating an actual tcp-ip based dialup connection, but you could take any old external modem and make it dial the phone and send stuff over it to another computer, or have the other computer call it, arduino BBS :)  Depends on which site can tolerate the ringing (or can turn off the ringer), or the phone charges.

Once you have the data on the other computer then it should be pretty straight forward.

A serial based duino should help, might need a little circuit bending though.


gnu_linux

I don't think you can do that entirely with an arduino

What you could do is install the arduino where you need to monitor the temperature and then run up to 4,000ft of cable to a PC and do RS-422 or RS-485 over UTP, you may need some additional equipment to do RS-422 or RS-485

Or you can install a DS18S20 and run 600ft of cable put a 10uf tantalum capacitor across the power supply pin and then plug it into the arduino

:)

gnu_linux

If you have reliable power in the building you want to monitor then you could provide power to a DS18S20 locally, then provide a common ground and run the common ground and signal cable to your arduino which could be 600 or more feet away from the DS18S20 temp sensor

You can also use a K145

:)

dcb

#4
Jan 17, 2009, 04:35 am Last Edit: Jan 17, 2009, 04:36 am by dcb Reason: 1
"run up to 4,000ft of cable to a PC "

No computer in the building.  It does have a phone line.  An external modem would be about perfect and it should be easy to make an arduino dial another computer with simple AT commands, or have the arduino answer the phone.

dcb

#5
Jan 17, 2009, 04:38 am Last Edit: Jan 17, 2009, 04:53 am by dcb Reason: 1
Heres one for $3 plus shipping:
http://cgi.ebay.com/Zoom-56K-V-92-V-90-Modem-External-Serial-Model-3048-New_W0QQitemZ120364573492QQcmdZViewItemQQptZPCC_Modems?hash=item120364573492&_trksid=p3286.c0.m14&_trkparms=66%3A2|65%3A15|39%3A1|240%3A1318

Someone you know probably has something similiar in a closet collecting dust.


gnu_linux

I assumed, perhaps incorrectly, that there was a PC within about 4,000ft

In theory a DS18S20 can work at much longer distances also ( beyond 600ft, 200 yards, 182m ) as long as you can give it a solid 4.4 - 5V DC

@OP is the phone line an active telephone line? Is it a PSTN line? Are you paying for it?

If the phone line is not a live phone line you can use the twisted pairs for the DS18S20 or arduino as long as you can ensure no one tries to put 48VDC down the line, which would fry your 5VDC DS18S20 and arduino

:)

gnu_linux

Wired is more reliable but a wireless module ( Xbee? ) would probably work :)

Collin80

It sounds to me as if an arduino and any external modem should be fine. Three points though... 1: If power is problem or not reliable you could power both the arduino and modem off of a battery. In fact, with a transistor or relay you could have the arduino power up the modem when needed, dial out, and shut it back off. Which leads me to point 2: The arduino only needs to send the temperature or at least a message, when the temperature is outside of normal bounds. No need to dial out every 30 minutes if nothing is wrong. And 3: The arduino serial output is TTL. The external modem will want RS232. You would probably need a MAX232 chip.

gnu_linux

#9
Jan 17, 2009, 05:35 am Last Edit: Jan 17, 2009, 05:39 am by gnu_linux Reason: 1
You would need to program the arduino to speak XModem or Kermit or something and a computer on the other end with a modem and the appropriate software to talk to

The arduino cannot send email, it cannot really do PPP or SMTP

Now if the phone line is active it has 48VDC on it and could be used to power a small device like the arduino with the appropriate DC to DC step down regulator ( 48VDC to 5VDC )

If you can add repeaters you can build an RS-422 or RS-485 network with 4,000ft segments between repeaters

Phone cable can be used for RS-422 or RS-485 but you have to make sure no one tries to use the cable for regular phone or you'll fry your devices

:)

Collin80

It could just do normal ascii or anything really. It all depends on what is running on the dialed line. If the computer on the other end is running custom software then the arduino could speak to it in a freshly constructed protocol for all it matters. Or, let's say the original poster has a cell phone. If the arduino only calls in case of emergency then one could assume that a mysterious phone call from a virtually unused line is a sign of trouble. Plenty of possibilities.

Yes, active phone lines run 48V but they also spike up higher (usually 90V) when they ring so one has to be careful of that. Also, they don't exactly support a whole bunch of current which is why external modems tend to be powered off of wall warts instead of directly off the line.

gnu_linux

#11
Jan 17, 2009, 05:52 am Last Edit: Jan 17, 2009, 05:54 am by gnu_linux Reason: 1
Yes, phone lines can be funky :)

Which is why it is rather critical to know if the building in question has reliable power or not and we need to know about this phone line

Any kind of solution ( arduino, DS18S20, K145, arduino + modem, or anything else ) will require stable power from some source and probably a battery backup as well

While the arduino is very low power you will need a reliable power source to run it, external modems are very power hungry compared to the arduino

:)

Roger at CCCC

Wow, thanks to everybody for all of your replies.  I will study them to try to decide the best approach.  I'm just starting on this project so it will be a while before I get something ready to try.  In the meantime, here are some comments that occur to me:  

1.  Sending a dialup email message would be best because the temperature data would be stored  as an email message that could be retrieved at my convenience and no other computer/hardware/etc is needed.   That could easily be done with a laptop, but, as has been mentioned, it sounds like it would be too difficult to get an Arduino to do it.  

2.  The telephone line is an active line and is an extension from the main office, so I don't think it would work to try use the line for a remote DS18S20.  I was going to use an LM34 temperature sensor anyway since the interface to the Arduino seems a lot simpler than the DS18S20.  

3.  It does seem like an external serial modem is the next best option, although then I have to provide power to both the Arduino and the modem.   The power in the building is not entirely reliable.  I could run the Arduino off of the telephone line, I think, but I'm not sure how to do that for the modem, which uses conventional 120 volts.  I suppose I could take the modem apart and try to supply whatever it needs internally.        

4.  In order not to need a dedicated computer elsewhere that the Arduino is calling, I think it might be better to have the Arduino accumulate temperature data in its own memory and then I will call it when I want to know what's going on.  I'll have to figure out how much memory is available for data storage.  And this would require the modem to be on all the time so that it could listen for my call.  

As I said, it's probably going to be some time before I get this working, but thanks again for all of your comments and any additional advice.  (Also going to bed now, so I won't be back until tomorrow.....)  

gnu_linux

#13
Jan 17, 2009, 06:06 am Last Edit: Jan 17, 2009, 06:09 am by gnu_linux Reason: 1
The arduino only has 1K RAM and 16K flash ( about 14K usable since 2K is for the boot loader ) so it would be hard to store your program and all your temperature data on the onboard flash

You could use an external data logger http://wulfden.org/TheShoppe/DataLogger/index.shtml

Or an SPI to SD interface and log on a relatively inexpressive SD card ( $5 for 2GB of storage )

Since your power source is not particularly reliable then you should definitely look at some sort of battery backup or a solar battery charger

:)

Collin80

Quote

3.  It does seem like an external serial modem is the next best option, although then I have to provide power to both the Arduino and the modem.   The power in the building is not entirely reliable.  I could run the Arduino off of the telephone line, I think, but I'm not sure how to do that for the modem, which uses conventional 120 volts.  I suppose I could take the modem apart and try to supply whatever it needs internally.


Actually, the modem is likely something like 5 - 9v DC. The wall mounted transformer steps it from 120v AC to whatever it is that it uses. I think I've seen external modems that input ac at 9-12V but I think most are DC.

As for the building power, you could run everything off of a battery and charge the battery when you do have power.

Quote

4.  In order not to need a dedicated computer elsewhere that the Arduino is calling, I think it might be better to have the Arduino accumulate temperature data in its own memory and then I will call it when I want to know what's going on.  I'll have to figure out how much memory is available for data storage.  And this would require the modem to be on all the time so that it could listen for my call.  


Well, the arduino has 1K ram, 16K flash, and 512 bytes EEPROM. If you store temperature as a signed byte (plus or minus 127) you could store 512 readings in EEPROM or maybe 700 - 900 in ram depending on how much ram you use. You could even use progmem and store things in the flash but it's more complicated. Then you could conceivably store upwards of 12k temperature bytes.


I still say you are better off calling when there is a problem and letting everything stay low power until then. But that would require you have something which it can call. A pager or cellphone perhaps.

Anyway, there has been a lot of ideas posted here. Hopefully they all lead you toward a good solution. Best of luck and don't hesitate to keep chatting until you've got something great!

Go Up