Why won't this electromagnet home experiment work? I'm trying one of the most basic physics home experiments: creating an electromagnet by wrapping electrically-conductive wire around a metal screw.
My ingredients:

*

*a metal screw
I don't know the material, but it is attracted to magnets

*a pipe cleaner
my improvised wire since I don't have a "true" wire
I don't know the material of the metal core but it is attracted to magnets
ends are trimmed of chenille (the fuzzy stuff); not 100% clean, but as best as I was able, with scissors

*a battery
I tried 1.5V AA, a 3V CR2450, and a 1.5V D batteries

*a paper clip
a "target object" to try attract with the working electromagnet
confirmed as attracted to magnets


The process is the familiar one you'd expect: I wrap my "wire" around the screw, in one direction only, then connect the stripped ends of the wire to the positive and negative ends of the battery. But: no electromagnet. As noted above, I tried different battery types.
Question: what could be wrong with my "ingredients" or process?
"Getting the thing to work" is actually of secondary importance: I'd like to learn ideas for how to diagnose (or "debug") what could be wrong.
As you might be able to tell, I have the notion that "attracted to a magnet" also means "able to conduct electricity" (especially with respect to the pipe cleaner-as-a-wire-substitute), which I'm not certain is true.
 A: I think the problem why your electromagnet did not work is:
The pipe cleaner (which you used as the wire) has a conducting surface.
Therefore the current did not flow around the screw,
but just along from one end of the screw to the other.
To make an electromagnet you want the electric current to flow
around the central core many times.

*

*The wire needs to be conductor. So you can use any metal (e.g. copper).
It doesn't need to be a magnetic metal (like iron).

*You want the windings of the wire to be isolated from each other
and from the central screw. By doing so you are guiding the current
to flow around the core, instead of just flowing from one turn to
the next turn witout flowing around.
So I recommend you replace your iron pipe cleaner by a wire
with a plastic isolation.

(image from Wikipedia - Electromagnet)
Alternatively you may also use a wire without an isolation.
But then you need an isolating sheet (like a paper) between screw
and wire. And you need to wind the wire carefully so that neighboring
turns do not touch each other.

*Currently your coil has only 7 turns.
To get a reasonably strong electromagnet you need many more turns
(may be a few hundreds).

*It is a good idea to use an iron core (like your screw)
to make a strong electromagnet. But this is not strictly necessary.
You would get a weaker electromagnet already without an iron core.

A: There is a popular joke: "electronics is a science about contacts".
First, you need to check that there is current in your circuit, because there can be breaks in your "wire", as others told you, or the ends of the "wire" can be covered with oxides (in this case you need to dress the ends with a knife or a file). As you don't have a multimeter, you can use your tongue for that (don't try that if the voltage is greater than, say, 10 V).
Another thing: where do you measure the magnetic field? If it is at the sides of your "coil", then the field can be very low there, so it might be better to measure the field at the ends of the coil.
How to measure the magnetic field? So you use a compass app in your phone, but maybe you should use a more specialized app in your smartphone (see, e.g., https://arxiv.org/abs/1901.00857, but I believe there are quite a few such apps).
A: The insulation on the pipe cleaner is fine (I tested it) and the only difficulty is getting good electrical contact at the ends.
It is best to burn off the end insulation and then scrape the metal with a knife / emery paper until the metal is seen to be shiny.
Your null result is due to a number of factor the main one being that the magnetic field produced by your electromagnet is very small and only realistically detected with a compass or a sensitive magnetometer.
You can make one by straightening a paper-clip and then stroking along the paper-clip with a magnet to magnetise the paper-clip.
I used a large paper-clip as then as a compass it is more sensitive to changes in the magnet field around it.
You can then either float the paper-clip on water but putting in on an upturned bottle top weighted down with some Blu-Tack or suspending it from a fine thread which is what I did.
The tread was about $70\,\rm cm$ long anchored on a table top with some Blu-Tack.
You will find that if the paper-clip is suspended from its centre it aligns with the Earth's magnetic field even to the extent that it inclines along the line of the non-horizontal Earth's magnetic field lines.
For ease of use adjust the point of suspension so that the paper-clip was horizontal.

Take a steel screw and tested it by bringing it close to the compass and often you will find it is magnetised because one end of the screw repels one end of compass.
Both ends of an unmagnetised steel screw would attract a compass.
If you wished you could demagnetise the steel screw by heating it to red heat whilst it is orientated in a magnetic East-West direction.
Wind a few turns of pipe cleaner around the screw connected it to a $1.5 \,\rm V$ C-type battery (or one that is close at hand) using finger and thumb and you might notice that the ends got warm.
Bring the electromagnet close to the compass, note the effect on the compass and then reverse the battery and again note the effect on the compass.
Hopefully that you will get attraction with the battery connected one way and repulsion with the battery connected the other way around.
In some ways all this is "old school" and you can use an iPhone to detect magnetic field.
The magnetometer is at the top right of the iPhone and I used the app Sensor Kinetic Pro which I downloaded from the Apple app store.
Here is a screen shot of the recorded magnetic field before and after I switched on the electromagnet which shows how small the field due the electromagnet is.

As a final point think of what you had at hand, a battery, a pipe cleaner etc  and what you did not have, eg a compass, a reel of insulated copper wire, etc and then remember that Faraday and other also lacked basic "off the self" apparatus.
They had to make the apparatus as they went along  and to me it makes their discoveries all the more remarkable.
A: As others have noted, your field is too small to be noticeable.  The 1.5V D battery is your best power source.  You can get about 2 amps out of it, which will pull it down to about 1V over most of its life.  It'll last about 2hrs at this draw.
The field you generate is proportional to the ampere-turns around the screw.  To get 2 amps out of the battery, you need a resistance of about 0.5 ohms.  To maximize ampere-turns, you need a wire with 0.5 ohm resistance that is a long as possible while being thin enough to be wound pretty close to the core.
Your core looks to be about an inch long and a little less than 1/4 inch in diameter.  In that case, your approximately best results will be achieved by winding about 4m of AWG 26 magnet wire tightly around your core.  It's important to use magnet wire, because the insulation is very thin and that allows you to get as much copper close to the core as possible.  If your winding is tight and orderly, you should get over 200 turns in 4 layers.
That's 400 ampere-turns, which is probably 50 to 100 times more than you're getting with your 5 turns of pipe cleaner.
The strength of the magnet you make this way will be "noticeable", but not "strong".  You'll be able to attract your paper clip from 1-2cm away. Making "strong" electromagnetic forces requires optimizing the magnetic circuit in addition to the electric circuit.
A: A few off the cuff thoughts: your pipe cleaner might have breaks in it (check with a multimeter), your electrical contact between the batteries and the pipe cleaner may not be great.
But the bigger issues are probably:

*

*the pipe cleaner wire seems like actually two wires that are twisted together.  This will not create the correct solenoidal magnetic field you are looking for like a single wire winding around a core would.

*the magnetic field $B$ produced by an electromagnet is given by the Biot Savart Law:

$$ B = \frac {\mu N I}{L} = \frac {\mu N V}{LR}
$$
($\mu =$ permeability (let's say your nail is steel)), $L=$ length of nail that's wrapped in coil, $N=$ number of turns in the coil, $I =$ current, $V =$ voltage, $R =$ resistance.
Let's estimate some values for this.  You have about 5 turns with 1.5 V battery, over about 2 cm of length.  The permeability of iron is on the order of $1000*10^{-7 }= 10^{-4}$.  The resistance of your pipe cleaner is probably quite high, but let's generously assume 1 Ohm.  That gives us:
$$B = 0.04 \, \mathrm {Tesla}$$
This is actually roughly on the order of the field of a refrigerator magnet, but I made some very generous assumptions about your setup, and like I said the wire should not be twisted.  Typically to do this you would take a long copper wire and your number of windings would be in the hundreds or at least 10s, not single digits.
