Thanks for all the info, much appreciated. I don't really understand this part. If the bolt is centered in between the N / S wouldn't it cancel out because of similar push / pull forces?
I think you maybe right there, i was thinking in terms of a mechanism that had one of the poles connected to the moving piece such as with a metal hinge, where when the coil was energized the moving piece would hinge toward the open pole end.
That would probably mean that the 'nut' would have to be connected to one pole with a hinging mechanism.
It may work with one pole closer to the nut than the other though you could try that.
The voltage is important though because the voltage applied to the coil produces the current, and the current produces the magnetic field. So the higher the voltage the higher the current and thus the stronger the field.
Of course the more turns the stronger the field too up to the point where the current starts to decrease and then you have to apply more voltage to overcome the larger resistance.
There is an interesting formula about the resistance of the coil vs the resistance of the battery but as i was saying it's hard to get the coil to match the battery very well so you end up just doing whatever is most practical.
What may be more beneficial is to have both a north and south pole on one side, separated by some distance. The moving piece will then try to complete the magnetic path by moving toward both pole faces.
In a typical electromagnet 'pick up' application the idea it so use a C shape where the two ends of the C shape touch the piece to be picked up. When the piece touches the two ends of the C shape, it completes the magnetic path and that is the strongest position possible so it picks up the most weight that way.
You would have to experiment with the spacing between poles vs the size of the nut.
A real electromagnet for this would have the coil in the middle of a circular shape with a 'cup' shape over the electromagnet so that the cup open end contacts the piece to be picked up as well as the inside coil pole. When the piece touches both the inside coil face and the outside open cup edges it sticks with the most strength.
I could draw up a quick picture of these ideas if you think that would help.
These ideas are all related to the idea of completing the magnetic path as well as possible.
The idea of using the right metal however has a profound effect on the strength. You can actually measure the difference using a linear hall effect sensor.
The idea of completing the magnetic path also has a very profound effect on the strength when the piece can touch both pole pieces, but it could also help for an application where it never actually comes into contact with the two pole faces.
There is a 'best' coil cross section shape too, but if you use good transformer metal it matters less because most of the field is inside the core material so it is almost like all the turns are concentrated at the very front of the electromagnet.