I saw some tutorial about Arduino + relay which turn on 220v bulb. But I dont like how is necessary to have two power sources one for bulb and one for Arduino. Is there a relay or another way to power Arduino from the same source as the bulb is????
You started a topic in the Uncategorised category of the forum when its description explicitly tells you not to
Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics
Well that leaves us rather guessing doesn't it?
Do you have a link you can share?
The fact is that the bulb and Arduino operate at two different voltages. Furthermore I would be willing to guess that your bulb is supplied with 220V AC, whereas the Adruino requires DC. One way or another it will be necessary to provide a suitable power supply for both the bulb and the Arduino controlling it.
Sure one of these:
@BitSeeker it seems you understand my question pretty well. But here is an example of video about Arduino+ relay for 220V.
So you think it is not possible to power arduino and relay from one 220V source? I understand the differences but everything is about resistors or whatever is needed to get proper voltage and current.
@jim-p this is not what I mean. It is simple jack for arduino. But can not power any 220V stuff.
You will needs resistors, capacitors, inductors, diodes, voltage regulators maybe even a MOSFET and transformer to get the proper current and voltage.
I didn't read the whole description but maybe something like this has it all in one.
I have a straight up answer
We have arduino,which works in DC power supply, But the Bulb works on the power supply used at home. The relay works as a switch that takes HIGH/LOW digital signals from Arduino and closes the Circuit for bulb. Therefore, both the power supplies are required in such project.
KES - delivery may be uncertain
Otherwise --
something every n00b ought to have
What, you don't order all your gizmos from Kenya? ![]()
Here's a 220VAC to 5VDC, 1A supply for PC board mounting.
@JCA34F this seems to be the solution i searched for. Thanks. Do you have any experience with this? Is it safe?
Not with that exact unit, but one very similar, been working fine for several years now.Pololu has a line of good quality PSs.
https://www.pololu.com/category/136/voltage-regulators
https://www.pololu.com/category/248/d24v10fx-step-down-voltage-regulators
I don't think anyone realized you were going to design your own PCB base on your initial post. What PCB design software do you use?
@EmilyJane i dont understand. I am just playing with Arduino. Want to make something like lamp with movement sensor. But when i realize that i will need two cables i searched for the solution to have only one. @JCA34F understand it on first try.
I understand. When you finish your PCB design you might want to post it here for review as there are those here with lots of experience.
Hi @123456xxx.
The product by itself, no.
The 220 V mains voltage is exposed on bare contacts on the PCB. Anyone who touches the board, or any metal that is touching the board could be killed or suffer serious permanent injuries.
If not wired correctly, it could start a fire, either from the unit itself, or from the external wiring.
This product would only be safe if mounted in a protective enclosure and correctly wired. This is something that should only be used by those who have experience working with mains voltage.
If you don't have such experience, I recommend getting a "smart" plug or bulb. These are complete products that can be used like any other appliance without the need to mess with any mains wiring. However, you can control them with a microcontroller board running an Arduino sketch program you wrote.
At the most simple end of the spectrum, there are plugs that can be controlled by the low voltage digital outputs from an Arduino board. For example (I know it is not 220 V, but it can give some idea of what I am talking about):
The more modern devices have a Wi-Fi radio and so you would control them through your network.
I am not super knowledgeable on the various brands of these products, but I did find that the "Sonoff" brand seems to be fairly popular in the Arduino world, as these use the ESP8266 microcontroller, and thus it is possible to replace the stock firmware the device is running with one of the open source alternatives, or your own Arduino sketch program. In this way, you can truly "own" your device. I believe there are some devices from other brands with this "hackable" nature. You will probably find them with a bit of searching on Google, or maybe the other forum helpers can recommend something.
Some of the products from more major manufacturers are completely locked down as far as the firmware on the device, and even the communication protocol. However, it is still possible to control many of these devices by an Arduino board through the network. So even though you are at the mercy of whatever interface was provided by the manufacturer, they are still usable in Arduino projects.
@ptillisch hmm thank you for your opinion. The plug which would be able to comunicate with arduino will be the best solution but I am afraid I am not skilled enough to hack thirt party solution.
You are also right that HLK PM01 AC DC Converter do0es not look too safe.
Something with screws like on classic relays would be better.
Then buy one of these:
Connect it to Vin and GND
https://www.mouser.com/ProductDetail/MEAN-WELL/RS-25-12?qs=pqZ7J9Gt%2FmrQiuEzhknovQ%3D%3D

