Last year I built a mini set of Helmholtz Coils to fit in the DIY snow globe ball sold by Adafruit in order to create a nerdy magnetic snow globe to be able to quite literally visualize the magnetic field of the coils.
I 3D-printed a set of 1-inch coils to fit inside the globe, wrapped them with copper magnet wire, then filled the globe with mineral oil and iron shavings.
Converting the coils to their equivalent circuit (an inductor and capacitor in series whose values are derived from the length of wire, diameter of the coils, and number of turns in the coils) I calculated that the emitted field would be a little over 1 gauss.
Another factor in this equation for calculation the magnetic field strength emitted by the coils is the current being driven through them. Since I used 38AWG wire, the max current I can drive the coils with is 22mA, so I opted to drive them with 20mA.
I designed a simple constant current supply circuit to provide the coils with the 20mA to achieve the 1 gauss output, powered off the little 3.7V lithium ion battery that Adafruit sells to fit in the base cavity of the globe.
And while it ultimately still looked cool, the magnetic field didn't seem to come out at strong as I had thought it would based on what I had calculated it. The iron shavings hardly showed any force being imparted on them from the coils.
For reference, a typical kitchen magnet on your fridge is around 50 gauss. So while the coils obviously wouldn't have the strength to stick to my fridge, the field only needed to be strong enough to have a visible impact on the iron shavings floating around in the mineral oil. Which I had imaged 1/50th of a standard kitchen magnet strength should have been plenty to accomplish that.
As in any case where a circuit isn't acting like you expected, my first response is to put some scope probes on it to make sure my hardware actually matches my calculations and simulations.
I've obviously worked on several project since I initially built the snow globe, and I happened to have my Eclypse Z7 with Zmod peripherals on my desk still from my more recent FSK baseband transmitter and FIR filter tester projects. I then noticed Digilent has made a Linux image available for the Eclypse Z7 compatible with WaveForms to turn it into a test equipment tool similar to the Analog Discovery USB scopes using the Scope and AWG Zmods.
My main plan is to start by looking at the voltage and current waveforms at the base of each coil to see if it's receiving the constant 20mA current it needs and is behaving as the load I calculated in turn. So this seemed like the perfect use case to test out using my Eclypse Z7 FPGA as test equipment.
Since there are a few different versions of ADC-based Zmods between the Scope and Digitizer Zmods, I needed to pick the right one to act as the analog front end of the USB scope Eclypse.
The max voltage of my circuit is 3.7V (which I'm rounding up 5V for the momentary transients at power up and power down) so I chose to use my Scope Zmod 1410 in the low gain setting. Since this is a DC application, any of the sample rate variations of the Scope Zmod 1410 are sufficient (I happen to have the 125 version).
Setup Eclypse with WaveFormsFirst things first, I followed Digilent's instruction guide for installing WaveForms on my PC and imaging the SD card for the Eclypse with the embedded Linux image containing the WaveForms install to interface with the Zmods on the Eclypse.
The cool thing is that the Linux image files for the Eclypse are located within the directory of the WaveForms application itself once it is installed on the host PC, and those files just simply need to be copy+pasted to a micro SD card for the Eclypse Z7 that's been formatted as a FAT/FAT32 filesystem.
I'm using Mac OS, so the Linux image files are located in the following directory (see the aforementioned instruction guide from Digilent for Linux and Windows):
/Applications/WaveForms.app/Contents/Frameworks/dwf.framework/Versions/Current/Resources/digilent/waveforms/firmware
Specifically, just the binary named DCFG_07_01_01.bin is all that is needed on the SD card.
Copy + paste DCFG_07_01_01.bin to the SD card and rename it to boot.bin on the SD card:
Insert the SD card in the Eclypse Z7, connect the USB OTG port of the Eclypse to the host PC, and power it up.
Once the Eclypse Z7 is powered, launch WaveForms on the host PC and the Eclypse will appear as an option in the device selection window in WaveForms.
Measurement SetupThe two channels of the Scope Zmod are SMA ports, so I connected an SMA to alligator clip adapter cable to each to connect to each channel.
I then connected the channel 1 probe to the terminals of coil #1:
And channel 2 to the power supply input of the constant power supply circuit (where the 3.7V battery would be plugged in).
I'm using a power supply set to the same voltage (3.7V) and current limit (0.5A) as mAh capacity of the battery.
From the Welcome tab of the WaveForms workspace, select the Scope option to connect to the Scope Zmod on the Eclypse so it can be configured and triggered.
I configured both channel 1 and channel 2 to have an Offset of 0V, set the Range for channel 1 to 10V, and the Range for channel 2 to 1V/div. I chose 10V to be sure I capture the full amplitude of any transient signals.
I set the time signals for the x-axis to a 0s Position, 5ms per division, no averaging, with a sample rate of 600kHz.
I then set the Mode of the trigger settings to Repeated and Normal and the Source as Channel 2. With the Condition of a Rising Edge with a 1V threshold Level. This translates to the Scope Zmod being triggered to capture data when channel 2 sees a voltage that increases to an amplitude above 1V.
After configuring the trigger and clicking Run, I turned on the power supply to turn on the coils. The waveform I captured was about I was expecting. The transient wasn't as drastic as I would have thought for an inductive load like the coils, only peaking a little above 4V before settling out back around the supply voltage of 3.7V.
I also immediately noticed that the voltage waveforms of channel 1 and channel 2 matched perfectly (which is why it only looks like there is only the one waveform in the screen grab below).
To measure exactly where the voltage settled out to I added a y-axis cursor. To which I found that the voltage held steady at 3.667V for both the power input and coil terminal.
Coil #2 measured exactly the same as coil #1.
At this point, I should have set up a current viewing resistor circuit (also referred to as a shunt resistor) to measure the current of the circuit since an oscilloscope only shows you the voltage. HOWEVER, after remembering a bit a circuit theory, I realized I had all the info I needed from the voltage waveform:
1) The voltage cannot change quickly across a capacitor
2) the current cannot change quickly across an inductor
Remembering these two basic principles, you'll recall that each coil behaves as a capacitor and inductor in series. This means that neither the current nor voltage across the circuit are going to change without immediately seeing the relative change in the other. And since the voltage waveform matches perfectly at both the power supply input and the coils' terminals, the current draw I saw from the power supply is also the current draw of the coils.
My power supply showed the coils were drawing 18mA. Which while is it a bit below my target 20mA, when I re-calculated what the magnetic field would be at 18mA it was fairly negligible since I was still at the slightly above 1 gauss level.
Compare to SPICE SimulationI also compared these measurements back to my SPICE simulation of the circuit in iCircuit I created before laying out the PCB of it.
Interestingly enough, I noticed that my simulation showed the current draw at 16mA (did I miss this before? It's been too long for me to remember). Otherwise, the measurements matched up with the simulation.
ConclusionsSo what happened here? The measured behavior matched the calculations and simulation close enough that more should have happened in the snow globe than a few shavings clinging to the coils.
I guess it has to mean that my initial assumption of 1 gauss being a strong enough field was wrong. And that even the minute size of the iron shavings in the mineral oil was still too heavy for it. Which means I need to redesign some beefier coils that can handle more current so they can put out a stronger field.
I'm pretty constrained to the 1-inch diameter of the coils, because I found the hard way that's the only size that fits into the opening of the snow globe in a manageable way. Which means I need to find some bigger gauge magnet wire and wrap a new set of coils!
Comments