Show Posts
Pages: [1] 2 3 ... 64
1  Using Arduino / Programming Questions / Re: Alternatives to Pachube/Cosm on: August 28, 2014, 01:32:49 pm
For folk that are worried about the costs of GroveStream, I've been at it about 10 months or so and I think I've paid a little over three dollars (total)  for the service.  That doesn't mean it can't cost more, the more you do, both input and output, raises the cost, but a little care and you can easily keep the costs down.

I'm not collecting transactions and throttling the upload, I send all measurements every minute.  So, if I ever want to, I can easily collect for a few minutes and send them up as a group.  So, when the expense gets to the dollar a month range, I'll look into that.  For now, 10 months, less than 4 bucks, isn't worth worrying about.
2  Topics / Home Automation and Networked Objects / Re: Gps module returning erroneous and same data on: August 01, 2014, 04:27:43 pm
I can't see any reason a powered antenna would cause the serial to mess up.  It really looks like a baud rate problem since the various lines have similarities.  However, it could be a framing error or inverted data as well.

So, I'm goiing to recommend that you switch libraries from the software serial you have to the one here:

unless you're absolutely certain that you have the newest architecture.  Then, you can try data inversion to see if it straightens out the framing.

Beyond that, I have no clue.
3  Topics / Home Automation and Networked Objects / Re: Arduino identification issues at router on: August 01, 2014, 09:40:23 am
One other thing to check for is local loopback.  Some home routers don't allow it, so if you're getting to the arduino by typing in 192.168.nnn.nnn and it works, but when you try http://myplace.something it doesn't from the same machine, it could be that loopback isn't allowed.  To test, call someone and have them try it or use a cell phone on the provider network.  If that works, you'll have to figure out how to enable local loopback to get to it by name or address from the local network.

I had this problem and it took me three days to figure out how to enable the dsl modem.
4  Topics / Home Automation and Networked Objects / Re: Gps module returning erroneous and same data on: August 01, 2014, 09:31:21 am
GPS sentences start with a $ and end with a carriage return, what you're getting looks like one of the baud rates is wrong.  Looking at the datasheets vs code examples for this chip I see both 4800 and 9600 being used as the rx baudrate.  So, just to set that possibility aside, put a Serial.println("Hello World"); right after the Serial.begins to be sure the IDE terminal is right, then try different baud rates for the ss.begin()

I've seen different baud rates for different chips, your problem could be something like that.
5  Topics / Home Automation and Networked Objects / Re: Smart Thermostat Project: Looking for 24 VAC to ~9 VDC Power Supply on: August 01, 2014, 01:41:10 am
Keep in mind the voltage limits of the Arduino.  If you rectify and filter the 24 volts from a heater or  AC unit you'll get around 37 volts.  If you apply that to an arduino, you'll get some black smoke and a few popping sounds as the board burns up.

So, pay attention and do this carefully.
6  Topics / Home Automation and Networked Objects / Re: Smart Thermostat Project: Looking for 24 VAC to ~9 VDC Power Supply on: July 30, 2014, 09:33:55 pm
I did this exact thing.  I used the 24VAC that comes from my AC unit and rectified it to give me around 37VDC which I filtered and then sent to a 5V regulator to power the thermostat.  I'll never do that again, it was silly.

What I would do now is get a variable buck power supply off ebay that can take at least 40VAC input and regulate it down to what I need, then put a 100uf cap and a couple of small value caps on the output to filter the trash that these little supplies always have and use that.

I have had incredible luck with the one I built a few years ago, but it was expensive and it runs hotter than I like.  I describe the project on my blog if you want to see how I did it.  But, like I said, I'd do it differently if I was doing it now.
7  Topics / Home Automation and Networked Objects / Re: Gps module returning erroneous and same data on: July 30, 2014, 07:07:41 pm
 That looks like you have the wrong baud rate.  I suggest that you put together a small program that just reads from the GPS pin and prints what it gets.  The sentences should make sense, and yours don't.

Just cut the code down to do a read a character from the GPS and then print it.  You should see the sentences come out with the data in it.  When you do this, attach the GPS to the sofware serial port, and use the regular serial port with the arduino IDE, don't try to use the serial port in a split mode where you have one pin hooked to the gps and expect the other one to talk to the IDE.

So, move the GPS tx pin to the software serial input pin, and try to just read from the GPS  and output it through the regular serial port.  Remember to set the baud rate of the software serial port.  You don't have that in the first code you posted, but do in the second.  Something like this:
void setup()
  ss.begin(4800); // your GPS should be hooked here
  Serial.begin(4800); // this is only to talk to the IDE serial monitor
                                          // you can use any baud rate you want here.

void loop(){
      int c =;

and see what you get.  For some problems, you have to go all the way back to the very beginning.
8  Topics / Home Automation and Networked Objects / Re: Gps module returning erroneous and same data on: July 30, 2014, 04:45:28 pm
There's several things wrong with what you're trying to do, and listing them would probably cause you a lot of confusion.  So, I'm going to suggest you get the example from the author's site and use it as a starting point.

There's several reasons for this, but there are two notable that you should pay close attention to.  First, he uses SoftwareSerial so that the console port is available for you to use for debugging and testing.  Second, he doesn't have any delay() calls in there that will make you miss characters since the cpu is in a hard loop and ignoring everything else.  You can't do that kind of thing with something that is sending characters all the time.

The example is at:

Now, before you tell me that you used that example and that's where you got the code from, take a closer look at what he's doing and reproduce it.  Get the darn delay() out and use SoftwareSerial.

There are other examples where people used the same library out there as well.
9  Topics / Home Automation and Networked Objects / Re: Heat Pump for Pool on: July 23, 2014, 10:00:17 am
My peak draw on startup of two A/C units is fairly high and SSRs stand up to it just fine, but it would be good if you find a better source than me on this.  I recommend that you find one of the hardware engineering forums and ask about this exact thing.  Some of those folk have designed the devices and can give you definitive answers.

Then, of course, come back here and post your results .  smiley

10  Topics / Home Automation and Networked Objects / Re: Heat Pump for Pool on: July 21, 2014, 11:05:07 am
I use a few of the ready made relay cards; relays work great in lots of applications.  It's the high current applications that I have been replacing the contactors with SSRs.  They're noisy and the arcing on the contacts causes them to fail too often in my climate.  So, water heater, A/C units, outdoor motors, that kind of thing.  I reserve relays for small items.
11  Topics / Home Automation and Networked Objects / Re: Heat Pump for Pool on: July 21, 2014, 02:15:41 am
The way some of these defrost is to run the fan across the coils until the coil temperature sensor goes to whatever the ambient temperature is. This means you have to pay attention to what the actual temperature is and shut the whole thing down if it's too cold to do any good.  The tiny number of them I've seen don't allow operation under 40F, so you might use that as a starting point.   The only strategy I've seen on compressor operation is to run it at least 10 minutes, and let it set idle for 10 minutes after running.  The idea is to keep those short cycles at a minimum to reduce the wear of start-stop cycling.

They're actually pretty simple devices so you should be able to get it working to your satisfaction.  One thing I do recommend is to make your new controller as self sufficient as you can.  Sure, it's great to incorporate it into the house controls, and you should do that, but allow it to operate on its own if necessary.  My experience has been less than stellar using centralized control with ethernet and devices that depend on a datum from somewhere else often don't get it.  I try to make every new device capable of working to some degree without the need for a solid connection.

While you're at it, take a look at replacing the contactors for the motor and fan with solid state relays.  The biggest problem with these devices is those darn big relays that wear out and get contact burns.  I'm replacing all of mine over time; basically when they fail, they get replaced with an SSR.  Haven't had an SSR fail or get dirty contacts.
12  Topics / Home Automation and Networked Objects / Re: Zigbee communication synchronization on: July 12, 2014, 10:58:43 pm
Yep, to guarantee that the data gets there intact, you'll have to use API mode.  The second data byte will get there eventually, but not when you want it to; transparent (AT) mode is buffered and only sent periodically or after a timeout.
13  Topics / Home Automation and Networked Objects / Re: HTML/Arduino coding for single ON/OFF button on: July 12, 2014, 10:53:37 pm
You defined them inside the routine setup(), but used them outside that routine.  Variables defined inside a routine only exists inside it.  If you want to use them in other places, move the definition outside all routines.

Take a look at 'c++ scope of variables'.  It's useful, but can drive you a bit nuts sometimes.
14  Topics / Home Automation and Networked Objects / Re: HTML/Arduino coding for single ON/OFF button on: July 11, 2014, 11:12:48 pm
3) I'm not sure if there are any commands in to "switch out from the IDE terminal emulator"? I'm quite used to messing around with Raspberry Pi's and SSH'ing into these with Putty - I assume you are suggesting the same here but sending the "?14" instruction over Putty? If so, can I not just log into the Arduino at the appropriate IP/port with Putty and then type this instruction into the command line to activate the switch? In that case, I'm not sure if I need to include anything more in the sketch to facilitate this?

I wasn't clear enough.  In the terminal, in the IDE (which is what you use to compile it), you can type something in and send it to the board through the serial port.  This is where you want to put commands to make things happen.

So, put it together, compile it, fix the compile errors, and shove it out to a board and start trying things.  Then a whole lot of what folk have suggested will make more sense to you.

Oh,, and don't even think this is like a raspberry pi, this little guy has a lot of I/O possibilities that you just can't get on the Pi.  The Pi's a nice board, I have several, but the arduino is a really great little controller for lots of jobs around my house.
15  Topics / Home Automation and Networked Objects / Re: HTML/Arduino coding for single ON/OFF button on: July 11, 2014, 03:04:31 pm
Regarding your ideas:

Nicely done, but you will get killed by details when you start compiling and trying this.  First, you don't need to hold the current state of the switch, simply read the I/O pin to find out what it really is whenever you want.  Keeping states of things like this always leads me to screwing up and not updating it somewhere, so just read the pin to see what it's doing.

Enable the ethernet board before ethernet.begin.  Why are you using an SD card?  If you don't need it, just leave it turned off; it'll make the code easier to understand when you're trying to debug it. 

Put in some commands to try the switch out from the IDE terminal emulator.  You have no idea how useful it is to be able to manipulate various controls from the command line when you're trying to make it work.  Put in a lot of print statements to tell you what is going on.  You'll need them when the light stays on despite the web page being decoded properly.  You don't have to get fancy with it, just looking for a 't' for toggle will save you a ton of time debugging.

An interesting way to toggle the pin for a relay is to  use the input from the pin as a guide for setting the pin as in:

digitalWrite( digitalRead(thePin) ^ 1);

This will toggle the pin from one state to another and you can then digitalRead(thePin) anywhere in the code to see what state it's in if you need to.  However with your setup and wanting only to flip the state, you may not need to.

You don't want to get fancy with HTML on an arduino.  Remember, you have to decode the incoming all by yourself with no fancy language or huge libraries to help you.  When you parse the incoming, you want it to be as simple as possible.  Consider something like:


Then in the arduino code, just look for the 14.  The ? to show arguments and & between arguments with named pairs is something for python, php, javascript, etc; not for a little arduino.  If you want to get fancy with POST vs GET discussions, you'll run out of memory or patience.  Just stick with a GET, and let the spot where the file goes (14 in the example above) can be whatever you want.  Suppose you sent:


Then parse for "toggle" and grab the two numbers after it for which one.  There's about a jillion ways  to do this, so make it simple at first.  Once you get it running, you can expand it to be as versatile as you have time for.
Pages: [1] 2 3 ... 64