As I wrote on this thread:
Try this and the links therein.
From this thread.
Read this and associated links.
All you need is a small fission device: it is the gamma ray flux which causes Compton scattering (electrons knocked out of the atoms / molecules in the upper atmosphere) which travel at relativistic speeds, and interact with the Earth's magnetic field.
The design of the bomb, and the casing, can enhance the proportion of the weapon's energy which is released as gamma radiation: and by designing the case properly one can focus the gamma rays "downward" to the ground.
A fission weapon, according to these sources, will still be quite a good source of EMP: it is not directly a function of notional yield.
Iran doesn't have enough fission bombs to make anything more than a harrassment attack. An EMP is not a killer weapon. It's supposed to be a precursor to other bombs.