Python Code to Control Four Relays


The “Weekly Win” for the week of  Nov. 7th was awarded to Liam Clink for completing the code which will be used for the degaussing project in the RaEDM study. “This past week I finished getting the code for the degaussing project functional. This code will be used in a Raspberry Pi to control relays and a waveform generator, which will in turn control which coils receive power and what the degaussing current will be. In order to degauss the prototype’s magnetic shields, we need to pass a current that varies as a sine wave with an initial 20 Amps that decreases over the course of a few minutes to zero. The goal of this project is to determine what parameters most effectively degauss the shields, so the Raspberry Pi will be used to automatically try different parameters and record the demagnetization.” said Liam.