I almost hesitate to offer this answer, because I don't want to suggest in any way that its subject was really a 'mad scientist' at all.
But he did show a few of the other characteristics suggested in the question, so his name is arguably not out of place here.
For a time in the 1960s something of a loner in his research, even a maverick, he carried out essentially self-funded work in a historic mansion that he had restored from a burnt-out shell -- used partly for his family home, and partly for a private research laboratory. During part of this period he also maintained a lone scientific position against the claims of researchers from three established research centers who thought they had disproved his theories. Some of his results appeared in two little books for which his scientific competitors made fun of him by calling them the 'thoughts of Chairman M'.
But his story ended well, he turned out to be essentially in the right, and this was eventually well-recognized. His work and results overcame the initially great reluctance from many in his field to accept them; he was awarded a Nobel Prize, and his theory and results have now become part of the orthodox foundation of knowledge in his field.
Readers of this answer who are familiar with biochemistry and cell biology will probably already have recognized that these selected glimpses come from the life and work of Peter Mitchell (1920-1992). His contribution is often not well described in brief accounts (wikipedia for example has "discovery of the mechanism of ATP synthesis" which arguably misses the main point). The issue was not the synthesis of adenosine triphosphate (ATP) altogether, it was about the harnessing and deployment of the chemical energy needed and used for most of the biochemical building processes especially within the mitochondria of eukaryotic cells. This involves a kind of recycling, in which the ATP participates in any of a wide range of biosynthetic reactions, 'spending' its chemical energy by giving up its third phosphate group, and leaving behind the corresponding diphosphate ADP (or occasionally the monophosphate AMP), compound(s) of lower chemical activity. The ADP (or AMP) then has to be 'recharged' by reconversion to ATP. A big question before Mitchell's work was accordingly, how does the cell carry out this 'recharge', to reconvert those lower-energy residual molecules by adding on the extra phosphate groups -- which takes much energy -- so as to replenish the supply of the ATP molecules that then make the chemical energy available to drive biosynthetic processes? Mitchell's correct answer was that the recharging process does not rely solely on a chain of biochemical reactions (which was the previous orthodox view), it involves subcellular membranous compartments within the mitochondria, into which ionic intermediates are pumped against concentration gradients, and then in turn drive the replenishment of the ATP as they pass out - hence 'chemi-osmotic' theory. Further details can safely be left to the references:
Mitchell's 1961 statement of his chemi-osmotic hypothesis (Mitchell, P. (1961), "Coupling of phosphorylation to electron and hydrogen transfer by a chemi-osmotic type of mechanism". Nature vol. 191 (No.4784): 144–148);
Mitchell's 1978 Nobel lecture (.pdf) and at (https://www.nobelprize.org/prizes/chemistry/1978/mitchell/lecture/);
Mitchell's 1992 obituary (by Antony Crofts, June 29th 1992, originally appeared in Photosynthesis Research);
A recent summary (.doc) of oxidative phosphorylation and chemiosmotic theory (June 2013, from Martin D Brand, Buck Institute, California; Stuart J Ferguson, University of Oxford; J Baz Jackson, University of Birmingham; David G Nicholls, Buck Institute, California; and Peter R Rich, University College, London).
,