Begginer electronic questio

Hello everyone, Im very new to electronics and I have a question..

Lets assume that I have arduino with lightbulb connected, And my goal is to toggle the bulb from afar using my phone, using wifi/bluetooth/radio.

My question is, how long can this arduino run on batteries? I mean, how does 'passive' listeners work? Do they take power?

For example, cars have a listener that knows when someone unlocks it with the remote key.. But how? The car is off, and the listener is always on..

If i want to copy the car unlock mechanics when the arduino is the car and my phone is the remote, does it have to always be on? If so, how long will it live on what batteries? Does it take power?

Thanks!

That depends on how you set up your wiring, what components you want to use. etc etc. Like a arduino nano BLE that has a low energy state. this kind off set your BLE device in deep sleep. untill it got connected to a device. and still you have to calculate the drainage of the electrical system to calculate your battery's.

For example, cars have a listener that knows when someone unlocks it with the remote key.. But how? The car is off, and the listener is always on..

Because the 'listener' takes very little power and the battery in a car stores a great deal of energy in comparison to the the requirements of the 'listener', so the battery can power the 'listener' for weeks without significantly discharging the battery.

j_molenaar: That depends on how you set up your wiring, what components you want to use. etc etc. Like a arduino nano BLE that has a low energy state. this kind off set your BLE device in deep sleep. untill it got connected to a device. and still you have to calculate the drainage of the electrical system to calculate your battery's.

Is there any recommendation on which approach is the best? Wifi/blue/radio? Which takes the less power on sleep mode?

PerryBebbington: Because the 'listener' takes very little power and the battery in a car stores a great deal of energy in comparison to the the requirements of the 'listener', so the battery can power the 'listener' for weeks without significantly discharging the battery.

I figured so, do we know how much battery can last? Like is there calculations or something? Lets say we have arduino listening on radio with lightbul and when you press a key the lightbulb thurns on for 5 seconds ans then go off, how long will it last on AA? Should i choose something else?

Thank you both for answering

I have a WeMOS ESP8266 wifi board and it operated off of a 10,000ma cell phone charging battery pack for about 220 hours at low useage as a router client. Acting as anaccess point will probably require more power.

I figured so, do we know how much battery can last? Like is there calculations or something?

Battery capacity is measured in amp hours, or milliamp hours for smaller batteries. A 1 Ah (1000mAh) battery can supply 1A for 1 hour, or 500mA for 2 hours.

You need to know how much current your device takes then divide the capacity of the battery by current the device requires.

As for your specific question it is impossible to answer as you have not provided either the capacity of the battery or stated how much current the load will take.

elkayam: Is there any recommendation on which approach is the best? Wifi/blue/radio? Which takes the less power on sleep mode?

Depends on what you want to use it for? like are you going to be in a range of let's say 5 meters around the controller, i would recommend using BLE. But if you want to control it in let's say a another country i would use a wifi controller or a nano with a LTE Module. And if you are going to be in a radius between 10-1000m then 2,4ghz should do the trick. but that's only in open air.

The point is that so far i know only the every BLE and every Wifi supports deep sleep state.

j_molenaar: Depends on what you want to use it for? like are you going to be in a range of let's say 5 meters around the controller, i would recommend using BLE. But if you want to control it in let's say a another country i would use a wifi controller or a nano with a LTE Module. And if you are going to be in a radius between 10-1000m then 2,4ghz should do the trick. but that's only in open air.

The point is that so far i know only the every BLE and every Wifi supports deep sleep state.

I want to have a small light bulb on my table that will turn on for 5 seconds and then turn off, using an app on my phone. if I'm using BLE, won't it make things messy? I will have to connect to the Bluetooth first etc, right?

True, but if you make your app in mit2appinventor then that can all be done while building the app. But if you use wifi connection you are better off buying a esp8266-01 relais module and modify it. Download a simple sketch en connect it to blynk. download the blynk app and voila you have yourself an awesome smart bulb! like they called it 'smart'. it's just a simple on and off connection.

j_molenaar: True, but if you make your app in mit2appinventor then that can all be done while building the app. But if you use wifi connection you are better off buying a esp8266-01 relais module and modify it. Download a simple sketch en connect it to blynk. download the blynk app and voila you have yourself an awesome smart bulb! like they called it 'smart'. it's just a simple on and off connection.

so you're saying I can establish the connection on the button itself right?

and I did consider using wifi, but won't eat the battery? assuming I will use that 9V block or something

What i'm saying is based on whatever you are going to use, you still have to calculate your battery in amps. Otherwise the capicity won't be enought to power your project for the time you want it to.

First of all it's best to learn the basics of calculating power and energy. and how it works. from that point on you can decide to use what you want.

and what i'm saying about the app you can make a ble connect button in the app, after connected to the ble you can use the bttns in the app.

j_molenaar: What i'm saying is based on whatever you are going to use, you still have to calculate your battery in amps. Otherwise the capicity won't be enought to power your project for the time you want it to.

First of all it's best to learn the basics of calculating power and energy. and how it works. from that point on you can decide to use what you want.

and what i'm saying about the app you can make a ble connect button in the app, after connected to the ble you can use the bttns in the app.

I understand, thanks, last question.. If I decide to use the ESP8266 module, do I need Arduino as well? or the module is enough and programmable? some project online use it without arduino and some does.. confused

well, if you are going to use a esp8266-01 relay and a stand alone esp8266. you are able to use it stand alone! and it's cheap aswell! i used it in my house aswell. Works without a flaw. The thing is that you need an usb to tll usb. like USB to TTL serial converter CP2102 UART. This is needed for programming the esp8266. and take a good look at the wiring of the esp8266 to put it in programming mode! programming can be done in the arduino ide, this will overwrite the standard esp8266 AT Firmware.

j_molenaar: well, if you are going to use a esp8266-01 relay and a stand alone esp8266. you are able to use it stand alone! and it's cheap aswell! i used it in my house aswell. Works without a flaw. The thing is that you need an usb to tll usb. like USB to TTL serial converter CP2102 UART. This is needed for programming the esp8266. and take a good look at the wiring of the esp8266 to put it in programming mode! programming can be done in the arduino ide, this will overwrite the standard esp8266 AT Firmware.

what do you think about the NodeMcu?

You need the programming adapter for the ESP-01. |500x500 As with everything from Hubei(?), the price has multiplied recently but will presumably settle again sooner or later.

The programming switch makes it easy to program and test. Perhaps more to the point, the cheaper non-programming version of the adapter is a useful base for the ESP-01 for mains powered applications and can be plugged directly into a USB "phone charger". |500x500

elkayam: what do you think about the NodeMcu?

Over-priced.

If you want more connectivity than the ESP-01, you need the WeMOS D1 Mini. :grinning:

what do you think about the NodeMcu?

Over-priced.

Not to mention the fact that it's exactly as wide as a breadboard and leaves no holes exposed (or has that been fixed in a later version?)

So.. I was stupid enough to buy the NodeMcu after all, the store just didnt have what I wanted..

Now I have nodemcu, 9v battery, some matrix, uln, stepper, and ofc some colorful wires..

Where can i ask how to make all this stuff work? Im very noobish at that and dont wanna burn the nodemcu

My goal is to operate the stepper over the wifi, what should I do?:/

"9v battery,"

If that is a smoke detector sized battery, that might power the board for a little while, but a stepper motor will probably kill it quick. Google is probably your friend on your project.