Go Down

Topic: HELP! what should i use? (Read 273 times) previous topic - next topic


So im working on a project making a childs night light.
its rather small WxLxH 60mm x 90mm x 80mm

Its functions are that once switched on an LED bulb stays on for a period of time (40 mins) and fades out. or if it dims down about 10% every 10 mins or something

I have an led bulb that i have bought from jay car its is an Automotive H1 16x White SMD LED 12VDC 3.2W
H1 base doesnt matter as i have removed the base. attatching 12V battery straight to the LED was too bright for what i needed but applying a 9V battery gave me around the brightness that I needed.

I haver a switch which is pretty much a spring underneath a metal pad so any vibrations it connects the circuit (for when the child waked up in the night they can easily tap or pick up the night lkight and the light will turn back on) I found this switch was better for what i needed then a mercury switch.

what i need help with is figuring out which product i should buy that would best suit my project. i could easily buy the Eleven (arduino uno compatible) board but its actually a bit big for my case.
am i able to load the code onto the chip and once loaded make my own pcb board and attatch the chip onto that with my power source (9V battery) and LED (will prob need a transistor and maybe a variable resistor? or will i need more components to make the chip work? is this easy enough to do or am I making it hard for my self?

another option is using the Leo stick as its the right size but problem is that its power source is USB which could be helpful if i could attach a rechargeable battery so when usb is connected it charges the battery and when disconnected the light runs off the charged battery. If this is do-able I would probably prefer this option as the leo stick is the best size.

to make things harder i wonder if there is a code where if the switch connects mulptiple times as in its being shaken the light will stay on for a different amount of time?

so say if the switch is connected a short number of times (so bumped on) it will stay on fading out from 100%- 0% in about about 7 mins

and if its shaken connecting the switch about 10 times it will stay on for about 40 mins?
I have no idea if this is possible just a question.

please Help as my knowledge is very minimal. and please let me know if you know any code that will help me with what I'm trying to achieve as i have no way to be able to teach my self code in the short amount of time i have. (Its for a uni project that is due in 2 weeks!!)
Thanks in advance for your help :D



if i use this? would this work fine?

joe mcd

There are many sources of smaller Arduino boards.  The one you referenced should be OK.

You can certainly count how many times the switch goes on and off.  Count during a short interval, say 100 millisec.


As long as the size of the board is OK, you probably can use any arduino. An Arduino nano or mini, will probably be just as good. You could as well buy an atmega8/-168 or -328, veroboard and other components to make your own arduino. I'm suggesting all 3 since the atmega8 doesn't cost much and, with a little effort, probably still has enough programming space to run your project. Since you only have 2 weeks buying a ready built one may be easier, but you can check http://arduino.cc/en/Main/Standalone to see what it takes. (it uses breadboard, which will be to large, but that's no problem when you use veroboard instead)

Something I'd certainly do is read a bit about arduino and moodlights. A night light slowly going from bright to dim is already nice. By using an RGB-led you can display up to 16 million
colours and create all kinds of mesmerising effects though. You can find several videos on youtube to see what I mean and kids, especially those still needing a night light, will adore you for it. It isn't super difficult to design your own moodlight-code, unfortunately you have little time, but maybe you could use parts from one of the countless arduino-moodlight-projects already available on the internet.

Go Up