Overclocking Arduino with liquid nitrogen cooling. 20⇒65.3Mhz @-196°C/-320°F

Liquid Nitrogen

Stress testing

void run_flow_test() { for(int repeat=0;repeat<250;repeat++)//We are aiming at ~10 benches per second { //Program flow check //Magic loop which after 93 itterations yields same value for(unsigned char i=0;i<93;i++) { flow_check=(flow_check<<1) + (flow_check>>7) + 25; if(flow_check&8) flow_check^=4; else flow_check^=16; flow_check=flow_check ^ 192 + 1; } } } void run_mul_test() { for(int repeat=0;repeat<350;repeat++)//We are aiming at ~10 benches per second { //Multiplication check for(unsigned char i=0;i<64;i++) { mul_check=mul_check*(mul_check-1); mul_check=mul_check*(mul_check+1)+2; } } } void run_flash_test() { for(int repeat=0;repeat<1000;repeat++)//We are aiming at ~10 benches per second { //flash_check for(unsigned char i=0;i<16;i++) { flash_check=(flash_check ^ svalue1) + svalue2; flash_check=(flash_check<<((svalue3+flash_check)&7)) + (flash_check>>((svalue3+flash_check)&7)) + svalue4; } } } void run_sram_test() { for(int repeat=0;repeat<10;repeat++)//We are aiming at ~10 benches per second { //SRAM check for(int i=0;i<2405;i++) { value1=(value1+value2+value3+value4+sram_check)&1; value2=(value2+value1+value3+value4+sram_check)&1+1; value3=(value3+value1+value2+value4+sram_check)&1+2; value4=(value4+value1+value2+value3+sram_check)&1+3; sram_check=(sram_check<<1)+(sram_check>>7)+value1+value2+value3+value4; } } }

Clock generator

What happens to electronic components at cryogenic temperatures

Let the overclock begin! (with dramatic beginning)

Resume

Arduino UNO / ATmega328P at 8V is stable at 65.3Mhz when cooled with liquid nitrogen, while at room temperature - only at 32.5-37Mhz. AVR could sustain 8V power supply voltage for a limited time.

I was able to figure out in practice how electronic components react on cryogenic temperatures: metals have dramatically reduced resistance (by a factor ~8.5), capacitors loose capacitance dramatically (electrolytic, Y5V ceramic - by a factor of 1000's, X7R by 2/3. NP0 is within 1%), widened band gap of semiconductors (higher diode forward drop, LED color changes, huge changes in functioning of analog circuits)

When overclocking desktop processors one should be careful not to cool capacitors below 0°C even if it would require additional heating. Otherwise CPU would loose stability due to lack of power supply decoupling.

No Arduino's were hurt during this overclocking. After heating up and drying it remained fully functional :-)

Before I start I guess I must answer 2 questions which would be asked inevitably:1) Why? Because I can. To learn how electronics behave at cryogenic temperatures. And just curios how much juice you can squeeze out of AVR if you push hard enoughThis also produced some results relevant to desktop processors overclocking with liquid nitrogen cooling.2) Why Arduino UNO (ATmega328P-based) while there are many faster microcontrollers? Just because it seems that Arduino is more popular among geeks and amateurs. For practical applications it is easier and cheaper to just use Cortex-M3/M4 based microcontrollers or FPGA (and I had these devboards too) instead of trying to overclock poor Arduino :-).Overclocking microcontrollers with liquid nitrogen cooling promises to be harder, than overclocking desktop processors : there are no stability tests, no on-board programmable frequency generator (at least on AVR microcontrollers), no programmable supply voltage. Also, it appeared that a number of on-board components were failing - so I had to deal with them individually. Luckily for me all these problems were sorted out at the end.I wanted to play with LN2 for quite some time. It appeared that here in Moscow a number of companies selling it to individuals. Nearest to my home was NII KM - 1.5$/liter while some other companies were shamelessly asking 8$/liter.Liquid Nitrogen is literally made from air - it's liquefied and gases are separated in fractionating column. Another way - separate nitrogen from the air first (using for example zeolite filter) and then liquefy. It appeared that there are even compact machines making liquid nitrogen from the air, electricity cost for manufacturing 1 liter of LN2 is ~0.15-0.3$/liter. Now I definitely know what I going to to ask SantaDespite it's really chilly temperature (-196 °C / -320 °F) one can transport liquid nitrogen in usual household steel vacuum flasks (glass ones could crack due to thermal stress). After additional heat insulation (+1 centimeter of some foamy material and plastic bag to stop condensation) it can hold LN2 for ~30 hours. In comparison, proper cryogenic vacuum flasks with small volume (~5 L) could hold liquid nitrogen for ~25 days. Also, one should always remember that it's prohibited to seal container with LN2 - pressure would build up until it blows.At physics.stackexchange.com/ it was suggested that it might be better to insulate vacuum flasks from the top and not form the bottom - so that evaporating nitrogen cools external wall of the container.I had to write stability test which has SRAM read/write, flash read, arithmetic math and program flow test (code with some conditionals). The idea of tests - each step almost randomly change the checksum, but after certain number of cycles it yields the same value. You can download final stress test for Arduino (portable to other 8-bit microcontrollers) here Results are displayed on HD44780 LCD which was connected in a standard way via 4-bit bus. On the second line - test iteration number (just to see that it's working) and hex checksum. First 2 digits - SRAM test, then flash, than math, then program flow test. If all is ok checksum should read as 12345678. Error in checksum is cumulative - so it would not go away if it happened once.Results are also indicated by blinking orange LED on the board. Monotonic blinking means that all is ok, 1 short blink - SRAM error, 2 - flash e.t.cOn tests at ~-100°C - it was usually failing at program flow test, at -196°C - on SRAM read/write test.I implemented LED indication because I was expecting that I would be unable to run display without too much hassle at elevated voltage - but it appeared the other way around: properties of orange LED changed dramatically after cooling, so it changed color and than stopped glowing at all (it seems that due to wider band gap there was insufficient voltage to light it). More about this effect a bit later.Arduino usually is clocked from external quartz crystal. Quartz's on fundamental harmonic are usually 30Mhz and lower, which means we cannot do any decent overclocking without external clock generator. In order to leave Arduino board intact, I decided to bend 2 pins on the microcontroller connected to external crystal and soldered wire for external clock. Also, fuses had to be changed in order to work from external clock - this required external programmer ( TL866CS MiniPro in my case). On the left of the photo you can also see some LM2596 DCDC module which was used to set supply voltage.I had no bench 100Mhz signal generator - that's not a cheap thing, so I had to build one myself. Requirements are 16-100Mhz clock range and 50% duty. It took me 4 revisions until I figured out a schematic which reliable work across this range. It appeared that many simple and widespread TTL-logic based generator designs has ether too low maximum frequency, or unstable on high frequencies (some pulses randomly shorter or longer).In the following final schematic the purpose of R1 is partial serial termination in order to limit overshot of clock signal on the microcontroller side (otherwise for 8V VCC peak voltages would be ~16V which could be really dangerous). One can use AC, LVC and VHC logic series for this generator. HC likely to be significantly slower (50Mhz max). I would not recommend to connect logic elements in parallel - I did so once and had strange issues when different elements were switching at different time and I was getting 0.5VCC (=high surge supply current) at the output for few nanoseconds. Probably this effect depends on specific microchip you use.When cooled to -196 °C / -320 °F resistance of metals drops dramatically. For example, some copper coil has resistance 56.3 Ohms at room temperature and only 6.6 Ohms in LN2 (drop by a factor of 8.5).Things are more complex with capacitors: Electrolytic capacitors drops capacitance by a factor 100'000-500'000 (i.e. almost to 0). Ceramic capacitors - depending on dielectric material: cheapest Y5V drops almost all capacitance, more expensive X7R drops 2/3, and NP0 drops only ~1% (but such capacitors are only available up to 1000p or so). So if board had Y5V power supply decoupling capacitors - board might loose stability due to lack of decoupling. One can test dielectric material by heating capacitor to 100-150°C - capacitance changes almost the same way.In order to ensure stability after cooling I soldered X7R and NP0 capacitors directly on VCC/GND pins of the AVR microcontroller (at room temperature it did not increased stable frequency though).For semiconductors - band gap widens and electron/hole mobility changes (but this process is non-linear). In practice it means that for example Silicon diodes would have 1.1V forward voltage drop instead of 0.6-0.7V. This effect significantly impacts functioning of analog integrated circuits.Another consequence of wider bandgap - LED color changes, it becomes more short-wave. This effect is especially pronounced for yellow/orange LED's - they became greenish and brighter, while required much higher voltage.CMOS speed is usually limited by how fast transistors could recharge parasitic capacitances (gate capacitance and interconnect capacitance) via parasitic resistance/inductance of the wires. When cooled wire resistance lowers - and microchip could work at higher frequency.So liquid nitrogen helps with overclocking not because there is that much heat to dissipate (actually water is much better at removing heat due to much higher heat capacity) but rather because electric parameters of CMOS microchip improves at very low temperatures.After all these preparations - turned everything on, slowly pouring liquid nitrogen... And suddenly LCD backlight fades, and in a few seconds - the board itself hangs. That was a gigantic fail. When lifting the board above level of liquid nitrogen so that it does not cool that much I was hardly able to reach ~45Mhz, but this result was not stable as temperature was floating.Suddenly when observing how board stops working after submersion into liquid nitrogen and almost immediately continues when slightly heated up I realized that it might be error by brown-out detection. I disabled brown-out detection - and voilà - the board itself started to work perfectly when submerged into liquid nitrogen. But the issue with LCD backlight was still here. It appeared that as I was running out of VCC pins on the Arduino I plugged backlight pin into +3.3V connector on the Arduino which is fed from linear regulator. Apparently this linear regulator ether had it's protection circuit working in unintended way or it's output voltage drifted too low for LED to work.Stable clock was about 50Мгц - and I started to increase the voltage. it appeared that above 8 volts system begin to loose stability, and 7.5-8V allow to reach highest clock frequency 65.3Mhz. For comparison, and room temperature and 5V supply maximum stable frequency was 32.5Mhz, at 8V - about 37Mhz.I did 1 hour stability test at 65Mhz - and no errors were detected. During this process 3 liters of liquid nitrogen were consumed.When exposed to air the board immediately covers with frost:On this video test at 65Mhz starts at 7:12, Arduino submerged into liquid nitrogen at 9.00.. Among other experiments with liquid nitrogen - green phosphorescence of sugar . Also if you going to try to shatter some fruits - I suggest to collect shatter _before_ it became fruit goo all across your room. Does anyone know where I can get samples of superconductors without paying a fortune? Please let me know