Show Posts
Pages: 1 ... 49 50 [51] 52 53 ... 64
751  Using Arduino / Project Guidance / Re: wireless sprinker system control on: June 28, 2011, 04:35:40 pm
What happened is that the time routines were ported forward from unix routines that have been around since the 70s.  The TimeAlarm library is a little over a year old and not used very much because most projects don't have a multi-month time frame.  Flashing lights and musical instruments are turned off when done.  So, it would be real hard to find an alarm library for the arduino that has been around 4-5 years.  Therefore, I took the library that someone else had the knowledge, energy and drive to build and based my work on it.  If a bug turns up, I'll hunt it down, fix it and publish the changes that worked for me. 

As another example, the 2560 you're using has two major bugs in the bootloader and one major bug in the 8U2.  The 8U2 has a timing issue that stops it from loading on certain systems.  The bootloader has a problem if there are three consecutive exclamation points in the code you want to load.  These don't have to be in text, they can be in code; so if you have 0x21,0x21,0x21 in a row it won't load.  Additionally, the watchdog timer will cause the device to lock up if it times out forcing a power down to restore the device.  These problems turned up AFTER the devices went into production and were in people's hands.  The watchdog problem has been fixed in the smaller Arduinos for some time now and the !!! problem is only a few months old.  Sure, it means it wasn't tested perfectly and hadn't been vetted for 4-5 years, but it's available and we can work with it.

Sometimes, one must work with what one has.  Besides, that's also how things get better.
752  Using Arduino / Project Guidance / Re: wireless sprinker system control on: June 28, 2011, 03:00:14 pm
Ideally, you'll find one which has run in production for at least four or five years, with the majority, if not all of the interfaces being exercised. You'd be amazed at how many bugs are found only after the associated calendar date has physically come and gone.

Er, uh, how long has the arduino been around?
753  Development / Other Software Development / Re: bug in the timealarm library on: June 28, 2011, 01:25:18 pm
I've been using this library for months, I must never have tried an alarm on Saturday.  Did you change the macro for day of week?

#define dayOfWeek(_time_)  ((( _time_ / SECS_PER_DAY + 4)  % DAYS_PER_WEEK)+1) // 1 = Sunday

This one did give me fits for a while before I found it in an old post.  And, you did know that the library returns the identifier for the alarm and that can be checked in the callback to see if it's the one you want.  That identifier can be used for other stuff also.
754  Using Arduino / Project Guidance / Re: wireless sprinker system control on: June 28, 2011, 12:16:57 pm
The way I get finer control of the days is to handle it in the callback routine.  So, when the callback gets control, just check to see if the day is odd and do something, if it's even, just return.  I do this for weekend only timers and such.  Names like "weekdayTimerZone1"  help me keep track of that kind of thing.  I tend to forget what the heck I was doing last week.  This method also allows me to do stuff outside the library and not have to get in there and change stuff.  Although, I have changes stuff in there already.  I can count the number of timers in use and have added the clear routines and such.
755  Using Arduino / Project Guidance / Re: wireless sprinker system control on: June 28, 2011, 10:39:04 am
Hehe, your comment on timers is exactly why I wanted to find something with a track record instead of writing it myself.  I didn't want to worry about 31-30-28-29 day months or the fabulous leap day.  Things like what time is it at midnight?  12:00, 24:00, 0:0?  Those things will absolutely drive you nuts.  Does the week start on Sunday?  Monday?  And is that day 1 or 0?  Anyone who has messed with time is familiar with this kind of thing.  And, it being the 21st century and all, we can sync the time with various standards anytime we want to, so setting it every hour or so is not a big deal.  Heck, we can check the satellites and resync our systems when there is a second of drift. 

Now, if there was just a list of the holidays my power company assigns that I could load to handle the non-peak holiday periods. 
756  Using Arduino / Project Guidance / Re: wireless sprinker system control on: June 28, 2011, 09:24:01 am
When I was looking for ways to time various actions I ran across the TimeAlarm library.  It handles timers and alarms; a timer expires some seconds from now and an alarm happens at some specified time.  It can handle both one-time and recurring alarms and timers.  It does not currently have things like a weekday timer, weekend or odd-even events, but they can be easily added or implemented in the timer callback.   This little library saved me a ton of time scheduling events and such; I even use it as a task scheduler for handling things as simple as turning off an indicator LED.  This could help you a lot on your timers. 

757  Using Arduino / Project Guidance / Re: wireless sprinker system control on: June 26, 2011, 07:44:09 pm
Holy carp!  That is an absolutely great find!!  That device will solve a bunch of problems for people; I hope they notice this thread.  I didn't run across it when I was looking for a solution and it would have been perfect in my situation.  I may get a couple and replace my other ones so I can use the variable voltage on some other project when the need arises.  Now, get a big ol' filter cap for the output and you should be in perfect shape.

I would use a filter cap though, and even a couple would be best.  One small value to filter out the switching frequency and one large one for the usual ripple and stuff.  Of course, I have those things laying around from over buying on other projects.  Over time I may reach the point other people here have reached; being able to build a project from left over stuff.  Not there yet though.
758  Using Arduino / Project Guidance / Re: wireless sprinker system control on: June 26, 2011, 05:22:53 pm
Based on the data sheet, your number of 275ma looks about right.  However, the inductor and capacitors to filter the output and the other circuitry involved will put you close to 17 dollars or so.  You might drop the swadjhv folks a line to see if they'll send you a data sheet.  They were real nice to me and 4 diodes, a regulator and a capacitor is hard to argue with when you can just turn a screw and set the voltage to whatever you want.  The relays will probably work off any reasonable Vin you choose.  However, this eliminates the fun of developing a power supply of your own.  I would probably go for a home grown power supply regardless of the time it took to work out the details simply because it's fun.  Heck, I spent a month decoding a silly protocol simply because I thought I could, so I may not be the best person to comment.
759  Using Arduino / Project Guidance / Re: wireless sprinker system control on: June 25, 2011, 11:14:50 pm
I'm sorry, I screwed up.  I DID use the  SWADJHV (I actually went and checked it just now).  I forgot that I switched to that one when I had rectified the voltage and saw how much it was.  Yep, it was 25 bucks and I had to get two of the darn things.  However, finding power somewhere, and somehow getting it through the wall to the thermostat was a bit daunting when I already had the 24 volt supply for the old thermostat right where I needed it, so the cost was the lesser factor.  I actually dropped them a note and asked if the other one would work on rectified 24v and they suspected it would for a few hours and then go up in smoke.  They did suggest that I could use a resistor to drop the input down to 27 or so, but I didn't want another heat source inside a thermostat.

I used diodes, they were rated around 600V at an amp, I arranged them in a bridge and used a cap on the output of the regulator just in case.  I used the same diodes across the relays to suppress spikes, I got them surplus somewhere in a hundred lot and have been using them for years for various things.

So, another idea for you.  There are a ton of little 5V supplies out there for less than 3 bucks designed for powering an iPad.  I have a bunch of these around the house doing various things.  However, they won't run your sprinkler solenoids so a little relay like the ones you already have is the perfect solution to that problem.  I forgot about these devices because I got all caught up in the 24v transformer solution I already did once.  The iPad supplies have a two prong plug on one end and USB on the other.  They are reasonably easy to open if you want to just solder wires inside and run them out.  Or, of course, you can scavenge and USB cable or grab a plug off something that you aren't using anymore.  Some of the supplies have removable plugs that you can plug a regular laptop cord into and make it easy to get AC power into it.  This is the kind of thing I have used. 

Notice how the wall plug part comes off?  They say they'll supply regulated 5V @ 2A and I know for a fact they will do 1.5 amp reliably.  I've seen them for as little as 2 bucks on ebay.  That's the price range where I stock up on them.

One thing to watch out for though, some of the USB cables won't handle over 500ma of current.  I've fallen into this trap a couple of times using these little supplies, so a couple of wires is not a bad solution.

The wall wart solution is not even close to elegant as the SWADJHV device, but it is cheap and works really well for me.

I'm really sorry I screwed up on the regulator, it sometimes gets confusing when you're working from memory on some of these projects.  I'm glad you caught my mistake.
760  Using Arduino / Networking, Protocols, and Devices / Re: Adafruit's Xbee adaptor or xbee shield ? on: June 25, 2011, 05:05:07 pm
Personally, I stay away from the shields.  They force you to use pins 0 and 1 for comm and I want those for other things.   They may take up other pins that I will want to use.  One of the boards like the adafruit one give you the flexibility to put the xbee anywhere you want when you go to an enclosure, they regulate the voltage separately and they can be hooked to something besides the arduino if you want.
761  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 bootloader revised? on: June 22, 2011, 01:52:00 pm
I used a binary editor to find where the problem was and then matched it somewhat to my code to find the problem.  Really a painful process.  In my case it was a data table I had that had the same value in about 6 entries.  Easy to fix, hard to find.  I don't have a clue if there is some other workaround.
762  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 bootloader revised? on: June 20, 2011, 12:42:14 pm
I'm just updating this for those folk that are hoping for a resolution.  I have NOT been in contact again with the developer; I didn't want to drive him nuts.  However, checking the source file online, there has been work done on this problem.  I suspect a solution is getting closer every day. 

I'll wait a couple more days and then contact the developer again and see how it's going.
763  Using Arduino / Project Guidance / Re: I need a Project on: June 19, 2011, 04:29:08 pm
You'll have a tiny problem with the language, it'll take about 2 hours to start thinking small.  Physically, get a little door, like a pretend doorway, don't try to fit this to a real door; it'll be expensive.  A little door that you can display for the instructor will impress them and lower cost.  You'll want to look at some sort of solenoid to manipulate the locking mechanism, folks here can come up with a thousand ideas as you progress. 

But, and this is important, the folks here will help you a ton, but you have to start the process.  Figure out a door and then ask for suggestions on how to automate the lock.  You'll get about a thousand ideas.  If you don't take the first step, they'll write you off as a poseur.
764  Using Arduino / Project Guidance / Re: I need a Project on: June 18, 2011, 11:05:29 am
You can complicate it by adding local (to the door) control.  As a person approached the inside of the door it senses them and unlocks.  If the person is under 4 feet tall it won't unlock (pool protection).  It autonomously locks at a programmed time to set the house for night.
That kind of thing.
These are really good ideas that will help the project become more complex. Could you please list what i would need to complete this system?
This is where the 'project' part of it comes in.  I would suggest sonar to sense the presence of a person and infrared to test their height.  However, one can use sonar alone placed properly on the door and used only for short range.  Time is easier, a simple real time clock and a menu interface to the TimeAlarm library would do that. 
765  Using Arduino / Installation & Troubleshooting / Re: Ethernet shield + arduino 2560 Program issue on: June 17, 2011, 11:20:57 pm
Two possibilities come immediately to mind.  If you're using some form of Unix, there is a timing problem with the 8U2 chip and you will probably need to update it.  You could have three exclamation points in a row somewhere in your code; that stops the bootloader and you will have to find them.  Alternately, you could be suffering from a watchdog timer problem if you have one enabled.  If a watchdog timer fails you have to power cycle the board before you can reload it.  If everything works ok with the board removed, you may have a problem with the new reset circuitry on the ethernet board. 
Pages: 1 ... 49 50 [51] 52 53 ... 64