I have an LED light bulb on a dimmer switch that will not stay on. If we turn it on just a little bit, it will stay on for a longer time. If we turn it on to full power, it will stay on for a shorter time. If I replace the LED bulb with an incandescent bulb and turn it on, it will go out almost immediately. It appears that the more current that flows through the circuit, the more quickly the light will turn off. The circuit breaker does not trip. There appears to be no great amount of heat generated in the dimmer switch or the light fixture.
I have replaced the dimmer switch once, already, but this did not fix the issue.
The problem may be in the wiring, but I'm at a loss how. Originally, the dimmer switch fed power to a socket. A 2-conductor cable (plus ground) ran power on one wire from the socket's junction box to the dimmer switch, and the return line fed switched power to one of the sockets. I rewired the circuit by inserting a junction box midway between the socket and the dimmer switch and using the two conductors to run hot and neutral there from the socket. From the junction box, the two conductors are used as before: One carries hot, the other is switched. In the junction box, the switched return leg from the dimmer and neutral and ground from the socket are wired to a light fixture. This same setup works flawlessly in the room next door.
Can anyone point me to what the issue could be?
Edit: Pictures of junction boxes
In the ceiling junction box, hot is wired directly through to the dimmer switch, while the return leg from the dimmer switch (on a white wire marked with black tape) is wired to hot on the fixture. Neutral from the feed is wired to neutral on the fixture. Ground is distributed to the fixture, the dimmer switch, and the junction box support beam.