Heard a lot of advice but haven't seen one question about the amp size of the breaker or teh wire diameter.
Is this a 15 amp or 20 amp breaker?
Is the wire romex 14/2, 12/2 or something else?
Is there a ground in the romex wire? Appears to be three wire connectors in the pics, which Im going to assume is black, white, and green/bare (ground).
As for the connections, you could have a million provided they are done properly.
Yes, all connections MUST be in a box and the box must be accessable at all times. Don't hide it within a wall, or under the insulation.
As for the fan, what is the recommended amperage breaker that came with the instructions?
How many amps does the fan motor draw at start up? and then while running?
Im going to guess this is a 15 amp fan and your taped into a 15amp circuit. A 15 amp circuit as a general rule, typically has no more than 10 devices (lights, outlets) on the circuit. Go count all the devices on this circuit, how many?
On the realistic side of things, I don't see a problem if your on a 15 amp breaker, and you have no more than 10 devices on the circuit without the fan. Think of the fan like a box fan plugged into a wall socket, or a ceiling fan added to a ceiling light. I would be real surprised if this fna draws more than about 3.5 amps of power. That will be fine to add to your current 15amp circuit, provided there are no other motors on the same circuit, except a bathroom fart fan is ok.
As for the hardwire. Your best option is to splice power off the light switch, however it looks like you already taped into the wire somewhere in the middle of devices or the main feed. That being the case, put a junction box at that splice and run new wire to the device the wire originally went too, and new wire to the fan. You need 6" of wire inside the junction box. This gives you enough wire to work with latter on down the road. You want only one set of spilces in that junction box and one junction box for a clean professional looking install. Use red wire nuts, and if this is a metal junction box, use a green ground screw and attach the ground wires to the box. If your using a plastic box, grounding the box is not necessary. Might I suggest you install an outlet in the box. It'll give you power for power tools should the need arise. Plus you can install the wires into the outlet and not use any wire nuts, except a special green one with a hole in the end for the ground wires. One the three ground wires you strip two about 1/2" and the third about 2", slide the green wire nut over the 2" and tehn twist the three wires together. What you end up with is a long pigtail to wrap around the green screw ont eh outlet, and the other two ground wires inside the green connector. Mount the box to the lumber the light is attached too, as hgih as you can considering the 6" of wire in teh box. All wire must be anchored within 2' of the junction box and routed so it will not get damaged. Preferred you stable (electrical wireing stables) and anchor it to the studes running around the attic. If you have to run it between the floor joists, stable it to the inside of the joists, you dont want to walk on the wire, so dont anchor it to the top of the joist. Also make sure it doesnt become a trip hazard (it is now in the pictures) and run it all the way to the wall before running up the wall, again not how its done in teh pictures. Staple every 4-6', but no more than 6', unless you drill holes int eh studs and feed the wire through the holes.
NOW, if you must/want to run power back to the electrical panel, find the chimmey and walk around it. No doubt this is a two story house and the chemmey runs from the basement to attic. That means it runs through a ceiling/floor 3 times. One side of that chimney will be open to the basement. However the only way your going to get wire up/down it is via a chain. Get a dog chain long enough to go the distance. Drop one end down the opening around the chimney, and have an assistant listen for it on the first floor, all noise makers off in the house. They will hear it hit the floor or bang off teh walls as you lower it. Once they hear it around theri feet they need to move to the next level down, eventually ending up in teh basement watching for it. Once they can touch it, they can give it a little tug so you know they have it. Dont drop it. Tape your electrical wire to the chain and pull it up to the attic. NOW, if your having trouble, you can use a spot light in the basement and shine it up the chimney. Go to teh attic and look for light around the chimney. Best done at night. I have spent several hours feeding a chain down a chimney. All depends on how tight the carpenters framed around teh chimney. You may also get lucky and have access to one side of teh chimney on lower floors. If the chimney isn't working, try the plumbing vent pipe. You might get lucky, however those typically run inbetween the walls and the hole is drilled out to size. Last option is conduit on teh outside of the house. There are other options, but you really need to know how the house is framed and which decade it was built. You didnt mention anything about knob and tube so I am assuming this house is less than 100 years old, which means its not ballon construction.
One of hte reasons I got out of the electrical business, attics are full of pollen, dust, get super hot int eh summer, and cold as heck in the winter. Plus my knees wouldn't survive decades on knelling on the edges of 2bys.
I have to install 3 lights in 3 different closets before I blow in insulation in the attic. Been putting it off as long as I can. :mrgreen: