Arduino Forum

Forum 2005-2010 (read only) => Hardware => Troubleshooting => Topic started by: adood84 on Apr 05, 2008, 09:12 am

Title: Couple of Questions on LilyPad Arduino
Post by: adood84 on Apr 05, 2008, 09:12 am
Hello, I'm new to this forum so I'm sorry if this is posted in the wrong sections :)

Basically I want to make a present box that would have a count down to a certain date , when that date reaches the lock would unlock and the present could be open. A count down would be shown on small screen or something of that type.

I was thinking that LilyPad Arduino would fit the job because of its low power needs , and it's small size. The Basic idea in my head is that maybe I could hack into a counter watch of some sort and set the countdown and take the alarm signal and route it the arduino to  interrupt it then it will unlock the lock.

Do you think this is doable with the LilyPad ? is the LilyPad the right choice? and could have this working on a battery for 1 or 2 months or so without the need to change the battery for the LilyPad? as I'm thinking of getting this kit http://www.sparkfun.com/commerce/product_info.php?products_id=8617#




thanks for the help :)
Title: Re: Couple of Questions on LilyPad Arduino
Post by: leahb on Apr 05, 2008, 04:53 pm
Quote
Do you think this is doable with the LilyPad ? is the LilyPad the right choice?

The LilyPad uses the AVR's internal oscillator for timing, so the time measurements on the LilyPad aren't going to be as accurate as those on the other Arduinos, which have external crystals.  I'm not sure how long it would take the LilyPad to get off by a day on timing...  

Quote
and could have this working on a battery for 1 or 2 months or so without the need to change the battery for the LilyPad?

This is going to be hard to do with any Arduino and reasonably sized battery.  To do this properly you'd want to use a raw AVR (or PIC or whatever) chip & use its sleep/power saving modes...  Just powering the LilyPad takes ~5-10 mA of current.  Batteries are rated for mA hours: so, if a battery is rated 1000 mA hours, that means it'll power the LilyPad for at most 200 hours...  The other Arduinos take ~ twice as much current to run as the LilyPad since their clock speed is twice as fast.

Quote
as I'm thinking of getting this kit http://www.sparkfun.com/commerce/product_info.php?products_id=8617#

You probably don't need everything in this kit.  You probably don't need the thread, light sensor or RGB LED.  So you're better off just getting the components you need: LilyPad, power supply & USB Link...

Title: Re: Couple of Questions on LilyPad Arduino
Post by: Oracle on Apr 05, 2008, 05:36 pm
Just a couple of comments:

Make sure you design the mechanical part of the box so that it fails unlocked or there's some other way to unlock it.  You don't want the box permanently locked if the battery dies or there's a glitch in the software.

For precise timing over a few months you need a crystal.  The internal oscillator is accurate to about 1% or 12 minutes a day, or you can be out by a full day in 4 months.  You may also consider a real-time clock chip.  It won't make it more accurate, but it make it easier to keep track of time and gives you a long term battery back-up for the clock time.

Title: Re: Couple of Questions on LilyPad Arduino
Post by: follower on Apr 05, 2008, 06:44 pm
Quote
and could have this working on a battery for 1 or 2 months or so without the need to change the battery for the LilyPad?

As an initial data point, here's some Arduino battery life research results (http://www.faludi.com/projects/arduino-and-xbee-battery-test-results/).

--Phil.
Title: Re: Couple of Questions on LilyPad Arduino
Post by: adood84 on Apr 05, 2008, 06:49 pm
So I guess I should ditch the LilyPad idea then? or can I use the LolyPad with the real time chip? because I need something compact to package it inside the a smallish box. Also it would seem that it would be a good idea to use a constant power supply? from an adapter or something.

from the quick search I did I found this real-time chip

http://www.emesystems.com/pdfs/parts/DS1307.pdf

I haven't looked at the lock part of the design yet...

How easy do you guys think this project is going to be ?

Also any links to more info about Arduino would be much appreciated :)
Title: Re: Couple of Questions on LilyPad Arduino
Post by: adood84 on Apr 05, 2008, 08:32 pm
OK after a lot of thinking the time requirement has been reduced from 2 months 6 hours which according to the above is doable with a LilyPad and a normal AAA battery , correct? and its going to be kind of accurate for that time.
Title: Re: Couple of Questions on LilyPad Arduino
Post by: John_Ryan on Apr 05, 2008, 08:43 pm
I found these the other day, this will get you close to 2000 hours - almost what you need but they are not cheap :)

http://www.batteryspace.com/index.asp?PageAction=VIEWPROD&ProdID=3718

And here's an i2c real time clock, SDA and SCL will connect to A4 and A5 on the lilypad.

http://www.futurlec.com/Mini_PCF8583.shtml

Cheap too.
Title: Re: Couple of Questions on LilyPad Arduino
Post by: Oracle on Apr 06, 2008, 08:12 am
Aren't plain old alkaline D batteries in the 30 Ah range? 3 of them in series will get you well into operating range of the '168.  If the lilypad takes 10mA, you should get 3000 hours or 125 days of run time for about $5.

Add the DS1307 with a crystal and the timing should also be accurate enough.  Comparable to a digital wristwatch.  So you might be out a minute or two over a couple of months.
Title: Re: Couple of Questions on LilyPad Arduino
Post by: adood84 on Apr 06, 2008, 10:01 am
Can I use the LilyPad and the DS1307 and an LCD screen for 6 hours ? are there enough pins to connect an LCD and the real time chip? because teh basic idea is now are in these steps :

1- Count down for 6 hours /Display the countdown on an LCD
2- when count down is done display a message on the LCD and Unlock the lock .


Sorry for all the newbie questions :)
Title: Re: Couple of Questions on LilyPad Arduino
Post by: Oracle on Apr 06, 2008, 07:33 pm
Quote
Can I use the LilyPad and the DS1307 and an LCD screen for 6 hours ? are there enough pins to connect an LCD and the real time chip? because teh basic idea is now are in these steps :

1- Count down for 6 hours /Display the countdown on an LCD
2- when count down is done display a message on the LCD and Unlock the lock .


Sorry for all the newbie questions :)


There should be no problems doing this.  The DS1307 takes 2 pins on your Arduino.

How is the lock part going to work?  I'd still be worried about a failure permanently locking the box.
Title: Re: Couple of Questions on LilyPad Arduino
Post by: leahb on Apr 06, 2008, 07:41 pm
Quote
OK after a lot of thinking the time requirement has been reduced from 2 months 6 hours which according to the above is doable with a LilyPad and a normal AAA battery , correct? and its going to be kind of accurate for that time.


Just one more thing to keep in mind.  When you use a AAA battery in the lilypad power supply, you need to factor the voltage step-up into your thinking.  Since the LilyPad power supply outputs 5V (versus the 1.5 the AAA provides), you should ~ divide the AAA mA hour rating by 4 to get a good estimate of how long it will last (4*1.5 = 6V).  If it's rated 1000mAh, it'll only supply 250 mAh when you use it in the lilypad power supply...
Title: Re: Couple of Questions on LilyPad Arduino
Post by: Oracle on Apr 06, 2008, 10:22 pm
Quote
Just one more thing to keep in mind.  When you use a AAA battery in the lilypad power supply, you need to factor the voltage step-up into your thinking.  Since the LilyPad power supply outputs 5V (versus the 1.5 the AAA provides), you should ~ divide the AAA mA hour rating by 4 to get a good estimate of how long it will last (4*1.5 = 6V).  If it's rated 1000mAh, it'll only supply 250 mAh when you use it in the lilypad power supply...


That will drive the Lilypad and LCD for plenty of time for his new 6 hour estimate, but I'm still wondering about the lock.  A solenoid will use a lot of current.  The battery might be weak enough after 6 hours that it can't handle the current.  A servo motor actuating a lock could work but adds a lot of hardware for the driver and I hope he's not powering any additional stuff for that 6 hours.

We really have no info on the lock.
Title: Re: Couple of Questions on LilyPad Arduino
Post by: adood84 on Apr 07, 2008, 09:08 am
Quote
Quote
Just one more thing to keep in mind.  When you use a AAA battery in the lilypad power supply, you need to factor the voltage step-up into your thinking.  Since the LilyPad power supply outputs 5V (versus the 1.5 the AAA provides), you should ~ divide the AAA mA hour rating by 4 to get a good estimate of how long it will last (4*1.5 = 6V).  If it's rated 1000mAh, it'll only supply 250 mAh when you use it in the lilypad power supply...


That will drive the Lilypad and LCD for plenty of time for his new 6 hour estimate, but I'm still wondering about the lock any help in this area would be much appreciated .  A solenoid will use a lot of current.  The battery might be weak enough after 6 hours that it can't handle the current.  A servo motor actuating a lock could work but adds a lot of hardware for the driver and I hope he's not powering any additional stuff for that 6 hours.

We really have no info on the lock.



The lock is something I still haven't figured out , any ideas about what type of locks are out there? I tried googling electric locks but all I get some really big ones . There will be nothing to power other than the LCD , the LilyPad, the Real-Time chip and the lock ... the lock is going to be unlocked once and thats it .

What I'm thinking is that the lock would be locked without the need for power , once it receives a signal the lock would open and stay open without the need for power (not sure if such things exists though). An option is to have a separate power supply for the lock and use the LilyPad to signle an electric switch (transistor??) to let the power through to the lock. No I need to find me a lock lol
Title: Re: Couple of Questions on LilyPad Arduino
Post by: John_Ryan on Apr 07, 2008, 09:17 am
If you do find any miniature electro magnetic / electro mechanical / or even small electric strike locks, be sure to post back.

You could latch the door so it springs open when the solenoid releases it, that way you'd only need momentary power if it's a one off event.
Title: Re: Couple of Questions on LilyPad Arduino
Post by: adood84 on Apr 07, 2008, 09:24 am
Quote
If you do find any miniature electro magnetic / electro mechanical / or even small electric strike locks, be sure to post back.

You could latch the door so it springs open when the solenoid releases it, that way you'd only need momentary power if it's a one off event.



thats exactly what I want it to do , cause I can't be sure if the person would be there when it unlocks , it could unlock while the person isn't there and they could come back later to open it .
Title: Re: Couple of Questions on LilyPad Arduino
Post by: follower on Apr 07, 2008, 01:52 pm
Quote
cause I can't be sure if the person would be there when it unlocks , it could unlock while the person isn't there and they could come back later to open it .

Nah, it would be easier just to make it a condition that if the recipient wants the gift they have to be there when it unlocks. :D.

--Phil.
Title: Re: Couple of Questions on LilyPad Arduino
Post by: adood84 on Apr 07, 2008, 04:58 pm
Quote
Quote
cause I can't be sure if the person would be there when it unlocks , it could unlock while the person isn't there and they could come back later to open it .

Nah, it would be easier just to make it a condition that if the recipient wants the gift they have to be there when it unlocks. :D.

--Phil.



LOL


I need to find a lock now , I have 3 months to perfect this ... I'm wondering if I should order the lilypad and the rest of things now so I could have a play around
Title: Re: Couple of Questions on LilyPad Arduino
Post by: adood84 on Apr 10, 2008, 08:45 am
I think I'm going to order the parts then and start learning on how to work on the Arduino , while I try to find a lock