Looking for help with what I believe is very simple. Is it?

I will give a basic description of what I'm looking to do below. If you have any comments/advice about trying to do it myself, I'm all ears, but I'd like to get this done sooner than later so i'm willing to pay someone for help.

BACKGROUND: I just became aware of Arduino about a month ago and purchased the Elegoo 2560 Mega starter kit and also a separate Arduino board and have been experimenting with simple scripts, mostly with Motion Sensor's. I have a programming background, but ZERO electrical background so I'm a bit out of my element.

I'm essentially looking to build a working prototype of the following...

It would be a dome push button, at least 60mm, but probably larger, up to 5 inches like the ones here:

I'd probably prefer the smaller dome light (60mm) but thinking ahead about power, the 5 inch ones in the link above required 4 AA batteries so if my product will require that many batteries, it might NEED to be bigger (i.e. 5 inches) to have room for all the batteries.

So it will be battery operated and will work like this.

The LED light starts off obviously. If you click the big dome cover to push it in, the LED comes on (would like it to be green dome cover). The light will then stay on for THREE hours and will then automatically turn off and then be awaiting the next push to turn on again.

If the dome is pushed to turn the light on and then pushed at any point before the three hours runs out, the light will shut off. In other words, if you turn it on and then realize you don't want the light lit for the full 3 hours, you can just press it again to cancel it and turn the light off.

That is the gist, but I do want to add a little more complexity with the following. Instead of just defaulting to a 3 hour countdown to turn the light off, I'd like to have a switch on the bottom of the light (where you put the batteries in) with three options:

1 hour
2 hours
3 hours

This way the user can choose how long the countdown is. I assume that using 1 hour vs 2 or 3 hours will help a lot with battery life, so I'd like the user to have this option.

I don't think an actual on/off switch is necessary because it's just off to start and comes on with a push of the dome.

Another caveat here is that the light will usually be in a lit room (like a kitchen or living room), not a dark room. So this might require a bigger LED or several smaller LEDs to help make sure the light can be seen in a normally lit room. This is the kind of thing I know nothing about hence my post looking for help/suggestions/etc.

For example, I don't know if it would be better to power it with AAA, AA, 9-volt and how many of each of those should be used. Not sure of the benefits of one over the other. FWIW, the dome button linked above uses 4 AA arranged in a square on the bottom of the button, but not sure if that means it's the best way to handle it or not.

With all that said, is this as simple as I think or is it more complicated than I assume?

If I left out important details, let me know and I'll update the post.

Thanks,
G

regarding batteries I would use the smallest/cheapest USB rechargable power bank available. Depending on how bright you need the LED to be, AA-s will discharge in a couple days of continuous power. This might mean a few weeks or months till discharge, depending on how often the button is pushed, anyway replacing batteries is a pita compared with USB charging.

Regarding how to control higher power LEDs with Arduino, search for "high power mosfet switch with arduino" schematics and program examples.

To further save power you'll later want to let Arduino enter deep sleep mode when the LED turns off, and being woke up by the big button press.

9V battery is probably done for in a few hours of LED on; 8-10 hours for just the Arduino (you didn't mention sleep states; I don't know how good the Mega is for this; it's definitely the wrong form factor for one button & one LED & battery power).

AA will do a lot better. I'm assuming a single red or green LED as you didn't specify it... this way best battery life can be achieved with a 8 MHz Pro Mini running on 2xAA (yes, gonna last a lot longer than 4xAA) and proper use of deep sleep modes for the controller. If it's blue/white you'll need 3xAA to get sufficient voltage.

9V battery is probably done for in a few hours of LED on; 8-10 hours for just the Arduino (you didn't mention sleep states; I don't know how good the Mega is for this; it's definitely the wrong form factor for one button & one LED & battery power).

AA will do a lot better. I'm assuming a single red or green LED as you didn't specify it... this way best battery life can be achieved with a 8 MHz Pro Mini running on 2xAA (yes, gonna last a lot longer than 4xAA) and proper use of deep sleep modes for the controller. If it's blue/white you'll need 3xAA to get sufficient voltage.

Thanks for the info. When you say Mega is definitely the wrong form factor, you just mean it's more than is necessary right? I assume that because I took apart one of the lights from my earlier Amazon link and the board is very simple with only like three connections.

With that said, I was hoping to create a working prototype using Arduino and then if/when it came time to produce them in larger quantities, I would need to work with a company to figure out a simpler setup.

Yes, I was thinking one single red or green LED, but a little worried it might not be enough since I would need the light to be visible in a normally lit room.

Sorry for the newbie question but I really have to ask...Why would 2xAA last longer than 4xAA? :slight_smile:

It's more than necessary. It's bulky. It doesn't have solderable headers. It's impossible to get down to low power.

2xAA = ~3V, can be used directly to power an ATmega at 8 MHz. The processor uses less power at 8 MHz than at 16 MHz, and it uses less power at 3V than at 5V. See data sheet.

4xAA requires a regulator, that also wastes power.

High brightness LEDs at 5-10 mA are pretty bright, should be clearly visible in a normally lit room. Do try it, see for yourself if it's good enough or not.

An 8 MHz Pro Mini with regulator & power LED removed can go down to a few µA in deep sleep. The mega will have a minimum draw of something like 50-80 mA, similar to the Uno.

Connect your button to an interrupt to wake up upon button press.

While sleeping the Arduino can run for many years on a pair of AA batteries. It's the LED that's the real power draw. Even in that 1 hour countdown you can have the Arduino sleep, wake up time and again using the WDT, and after enough wake/sleep cycles you can switch off the LED and go back to sleep.

regarding batteries I would use the smallest/cheapest USB rechargable power bank available. Depending on how bright you need the LED to be, AA-s will discharge in a couple days of continuous power. This might mean a few weeks or months till discharge, depending on how often the button is pushed, anyway replacing batteries is a pita compared with USB charging.

Regarding how to control higher power LEDs with Arduino, search for "high power mosfet switch with arduino" schematics and program examples.

To further save power you'll later want to let Arduino enter deep sleep mode when the LED turns off, and being woke up by the big button press.

Thanks for the info. I will look into rechargeable USB more. I assume they would add cost to potential mass production, but will have to see.

I'll also research "high power mosfet switch" as I haven't heard of that before, thanks!

Just to follow up, I have decided now that I will not need a switch to determine whether the light will shut off automatically after 1 hour, 2 hours or 3 hours. To make it easier, i will just want it to shut off after 3 hours. The user can tap the button to shut it off before then if they'd like, so no need to overcomplicate it with that switch.

I got a tap light online that changes from white to red to green to blue then off (with each tap). It's also VERY bright (i.e. easy to see in bright room like wvmarle mentioned. The cover is white so there must be colors being generated at the LED light, but it's so small I can't tell if it's different bulbs.

Can anyone tell from the pic below? Are there very tiny bulbs down there (one for red, one for green and one for blue)? The white light eminates from the three LEDs surrounding the middle colored LED.

Imgur

Also, this one uses 3 AAA in a nice triangle setup to maximize space. I have one of them running 24 hours a day to see how long 3 AAA will last. Only been 24 hours so far, but still brightly lit.

In general, would this type of custom board and plastic housing shape be relatively easy to mass produce, if it came to that?

40 years ago people did your project using an NE555.

Paul

gdoot:
The white light eminates from the three LEDs

Those three look indeed like modern day white LEDs, that yellowish bit is a phosphor.

The one in the middle appears to have four individual LEDs, but with that black square piece I'm also thinking of a WS2812 - in that case it'd be the control chip - which doesn't really makes sense to me in this application.

gdoot:
In general, would this type of custom board and plastic housing shape be relatively easy to mass produce, if it came to that?

There's mass production and there's mass production. You need to state volumes. Obviously they can both be made, since someone is selling it. Are you asking if you can do it yourself? Probably not. Can a plastic molding shop make 50,000 of these enclosures? Yes. Can you have triangular PC boards made? Also yes.

Unless you're making it yourself, it doesn't matter how "easy" it is; only matters how much it costs.

cedarlakeinstruments:
Unless you're making it yourself, it doesn't matter how "easy" it is; only matters how much it costs.

Where more of "easy" normally means less of "costs", especially if the enclosure goes from 3D printing to injection moulding.

For the PCB shape it matters a lot less.

Maybe a 555 is still the best way to go. There are many variants of the chip and it costs very little. If the task is a simple as described and production cost is to be low, it would be better. There are plenty of sample circuits. Just google 555 timer.

Thanks, DannySwarzman! Overall, the task is very simple. I just want a tap button that you push and it turns green. It then stays on for 3 hours and shuts off automatically (or if someone pushes the button again before 3 hours is up, that will turn the light off as well).

That's literally all i need it to do, so just trying to figure out the best way to go about finding a company to help build it and ultimately mass produce it. I assume I could find a China company to help pretty easily, but hoping to stay in the US if possible/affordable. If you or anyone else on this forum know of a US company that could definitely help with something like this, please let me know their information.

Anyway, I will research 555 timers. In the picture below of the tap button i ordered off of amazon, I circled something. Is that a 555 timer?

Imgur

What does the marking on that chip say?

Hi wvmarle, the marking on that chip says "RGB-TY-ILS"

I disagree that a 555 is a good choice here. It's great for short intervals, but 3 hours is stretching it. The circuit requirement is basically a retriggerable one-shot with a 3-hour interval. My first choice would be one of the super-cheap 6-pin microcontrollers.

@OP: how many of these do you plan to build? At quantities < 1,000 it may well be cheaper to buy the existing assemblies (find something on Alibaba) and change out the electronics than to design & build a mold.

Take a look at Protolabs: they focus on prototype quantities, but I think they may also provide pricing for larger volumes.

DannySwarzman:
Maybe a 555 is still the best way to go. There are many variants of the chip and it costs very little. If the task is a simple as described and production cost is to be low, it would be better. There are plenty of sample circuits. Just google 555 timer.

Moulding the case is indeed costly in smallish quantities.

That chip marking I don't know, quite certainly not a 555 or it'd probably be marked with at least those numbers.

wvmarle:
Moulding the case is indeed costly in smallish quantities.

That chip marking I don't know, quite certainly not a 555 or it'd probably be marked with at least those numbers.

The OP should get a copy of the old "IC TIMER COOKBOOK" and study it.

Actually the cost of molding the case would only be pennies per each, AFTER PAYING FOR THE MOLD FOR THE FIRST PIECE!

Paul

cedarlakeinstruments:
It's great for short intervals, but 3 hours is stretching it.

@cedarlakeinstruments, I may be able to make it a 2-hour auto shut-off, instead of 3 hours. Would that change your opinion at all, or is 2 hours still too long for a 555?