I have a pro micro that I'm trying to put in a really tiny place ...
I needed a small AC to DC converter so i started looking most of them are big ..
So i finally found a good solution which is a phone charger , I took it out and tried to put it inside of the tiny place (a small hole in a wall) and it did fit ..
But i once heard that there was charger that putted a house in fire ... So i wanted to ask is dangerous to use a phone charge as a DC power supply ? Does it heat up ?
Is there any alternative for a phone charger ( ofcourse in the size of phone charger or smaller ) ? And is not dangerous ?
A phone charger is not just an AC to DC converter. It also converts the voltage from the mains voltage to the 5v (or whatever) used by the phone.
I don't know if phone chargers are intended for continuous long term operation. Remember that as the phone charges up it requires less and less from the charger.
I suggest you get a mains to DC device that is rated for 3 or 4 times the current you actually require. That way it will always be operating well within its limits.
All mains-to-DC devices produce heat. If you put them in a small space where the heat cannot escape you could have problems - perhaps a fire.
If its UL approved for use in a wall cavity, go for it, otherwise you would be acting recklessly.
If its cheap and not UL approved in the first place, not good.
The OP says its in a wall. Presumably behind a faceplate or power outlet.
Like any engineering, the answer is always "it depends." Different electrical hardware is rated by labs like UL for different purposes. Each country has slightly different laws and customs. In Europe you will see "CE" instead of "UL" even though legally those are wildly different, in practise they mean the same thing.
Things like dimmer-switches are rated for being in a box in the wall, to get that
approval issues of heat build up and consequent fire risk have been properly analysed.
If you read the safety leaflet that came with your supply it will say things like not place
near a source of heat or leave in direct sunlight, because normally that risks significant
heat build up and early failure or even safety issues. If the supply didn't come with a
safety leaflet its likely not approved at all...