ECE3SAT - Helmholtz Coils


Electronics - 11-02-2018

Context

Since the beginning of the space race in 1957, the number of objects sent into orbit is continuously growing, as does the amount of space debris orbiting the Earth. This is becoming a real threat for operational space missions around the Earth. Space debris can be the result of:

  • A collision between two satellites, two debris or a satellite and a debris/meteoroid
  • A battery which became unstable and exploded
  • Fuel leftovers in a satellite or a launcher stage which became unstable and exploded
  • A planned destruction
  • An out of control satellite or a launcher stage

Today, the population of space debris is estimated to be more than 500 000 trackable objects where 20 000 of them are bigger than a tennis ball. In addition, there are millions of pieces too small to be detected.

The vast majority of space debris is located in Low Earth Orbit (LEO) where most space missions are located or planned. Figure 1 illustrates the distribution of debris around the Earth in 2013.

Representation of the distribution of the space debris in LEO in 2013. Source: ESA.

The ECE3SAT project is a student project developed at the french engineer school, ECE Paris. The goal of the project is to send a CubeSat in space to verify a physical theory permitting a fast deorbiting.

A CubeSat (1U-class spacecraft) is a nanosatelite satellite for space research that is made up of multiples of 10x10x11.35 cubic units, with a weight less than 1.33 kilograms. CubeSat are most commonly put in low Earth orbit by deployers on the International Space Station (ISS).

The Attitude Determination and Control System (ADCS) is focused on the control of the rotating motion of the satellite. Through sensors it will determine the attitude and act using it’s environment to reach the required orientation.

To test and validate the ADCS of the CubeSat, the team decided to build a device that can generate a steady and controlled magnetic field: a Helmholtz coils magnetic simulation environment.

Video

This video outlines the design, build and tests of our Helmholtz coils magnetic environment:


Objectives

Satellites may use the geomagnetic field (the Earth's magnetic field) for two purposes:

  • Attitude determination with magnetometers,
  • Attitude control with magnetorquers.

Geomagnetic field lines in the dipole approximation Geomagnetic field lines in the dipole approximation, from https://doi.org/10.31349/RevMexFisE.65.64

A magnetorquer is a device that creates a magnetic field which interacts with an ambient magnetic field in order to produce torque. For a coil of wire, the equation is:

$\vec {\tau} = \mu \cdot N \cdot I \cdot \vec {S} \wedge \vec{B}$

Where τ is the resulting torque, μ is the permeability of the core, I is the current intensity, S is the oriented surface and B the ambient magnetic field. Note that due to the presence of a vector product, the torque can only be orthogonal to the geomagnetic field.

The major advantages of magnetorquers is that they are solid state (i.e. without moving mechanical parts) and only require electrical energy to run, which can be provided by onboard solar panels. They are often used on small satellites due to the low torque they are able to generate in comparison to reaction wheels or cold gaz thrusters for instance.

Alternatively, some CubeSats use permanent magnets instead of coils (2D stabilization).

Having a system that allows us to generate arbitrary 3D magnetic fields gives the ability to perform physical tests of the nanosatellite.

What are Helmholtz coils?

Helmholtz coils are a pair of coils facing each other as shown in the scheme below.

Helmholtz coils pair arrangement. Helmholtz coils by Ansgar Hellwig, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=193184

This combination can generate a magnetic field between the two coils that is uniform on one axis. This is a spatial representation of this magnetic field on a plane orthogonal to the coils.

Magnetic field in a Helmholtz coils pair. Helmholtz coils field by DVoigt, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=809676

The norm of this field depends of the radius of the coils, the number of windings and, more importantly, the intensity of the electric current. This means that, by controlling the amperage, we can chose the magnitude of the magnetic field according to this formula:

$\left \| \vec{B}  \right \| = \left ( \frac{4}{5}  \right )^\frac{3}{2} \frac{\mu_0 \cdot n \cdot I}{R}$

In order to achieve a three dimensional magnetic field, we use three pairs of Helmholtz coils, orthogonal to each other.

By building a device like this, it is possible to generate a magnetic field with a control on the norm and direction using the current. Thus we can:

  • Test and calibrate magnetometers in a controlled environment,
  • Test and validate the sizing of the magnetorquers,
  • Integrate those two subsystems in a CubeSat model to test our filtering and positioning algorithms (Kalman, B-dot, etc.),
  • Build a visual representation of the CubeSat's progress.

Design & Construction

The following section describes the design and construction of our Helmholtz simulation system.

Sizing

These were our design specifications:

Requirement Value
Volume of the constant filed zone 64L (40x40x40cm)
Output magnetic field range -5 to 5 Gauss
Input voltage range (per coil) 20V to 60V
Max. input current (per coil) 3A
Coils equivalent series resistance (ESR) 22.5Ω
Time of assembly and disassembly Less than 5 min.
Maximum variation of the field < 10µT

To meet those, we used the Wolfram Square Helmholtz Coils demonstration by Peter Euripides.

This is a simulation with 80 windings, with 80 cm square Helmholtz coils at 1.5 A:

Wolfram simulation of the square Helmholtz coils. Wolfram simulation of the square Helmholtz coils with 1.5A

With this configuration, we get an amplitude of 5 Gauss (five times the geomagnetic field in each direction). By putting a current of 3A per coil instead, this rises to 10 Gauss, but it requires twice the input voltage.

Mechanical build

As discussed earlier, we chose the following dimensions for our simulator: 80cm square coils with 80 turns. This adds up to about 256m of copper per coil. The wire used for the winding is 0.5mm (AWG 24) diameter copper enameled magnet wire.

To wind these coils, the frame is made out of aluminum profile, U-shaped. The outside width of the profile is 7.5mm, which is enough to fit about 140 turns of our wire. It is also fairly rigid and inexpensive.

The 6 coil frames The 6 square coil frames when the cage is disassembled

A jig was used to coil the wire. Packing tape was added on top to protect the turns. The ends were terminated with 4mm jacks. Numbers and arrows respectively indicate the size of the coil (80 mm, 78.5 mm and 77 mm) and the direction of the windings for quick assembly.

In order to ensure that the assembly and disassembly time meet our constraints, we designed a 3D-printed clip that attaches the 6 coils of our Helmholtz simulator.

3D-printed clip that attaches the structure together. The 3D-printed clip design

This part could be swapped for a more definitive mounting method if need be.

Electronics

We designed custom circuitry to control the current that goes through the 6 coils and therefore the magnitude and direction of the magnetic field.

Circuit of the Helmholtz Magnetic Simulation System. The electronics control circuitry inside the control box

The subsystems are the following:

  • Power H-Bridges (1 per coil): these modules control the amount and the direction of the current that goes through each coil
  • Logic computational unit: this board drives the power modules according to the firmware that is loaded on the micro-controller

This circuitry is fitted in a laser-cut control box, with an emergency cutoff switch, 4mm plugs to connect the coils and power supplies, and LEDs for visual indication of the system status.

The circuit's control box The electronics control box

Power H-bridges

This is the circuit we designed for each these modules:

Circuit of the H-bridges. Circuit diagram of the H-bridge module

Using the open-source CAD software KiCad, we designed a single-sided PCB to build 6 identical modules.

PCB layout of the H-bridges. PCB layout of the H-bridge module

I would recommend using an integrated circuit such as the DRV8873 instead of this PCB.

Logic unit

The purpose of this board is to run the software and drive the H-bridges. It is based around an Arduino Nano with an Atmel ATMEGA328P mainly because of the simplicity of the programming tool-chain compared to other more powerful micro-controllers.

We also used KiCad to design a PCB to layout the connectors to the LEDs and the power modules.

PCB layout of the logic unit. PCB layout of the logic module

We manufactured the modules using both the chemical etching method and a CNC mill.

Software

The Arduino firmware reads the USB serial port, expecting a string with X, Y and Z field values in Gauss. It then handles all of the low level tasks: calculation of the PWM duty cycle, changing the pins’ states, etc. There are also built-in safety procedures to avoid the sudden collapse of the magnetic field, which might be dangerous the electronics.

Example interaction with the device:

> 0 0 0
OK
> 0.2 -0.2 0.5
OK
...

The commands can be manually sent using a serial terminal, but it is meant to be controlled by software of the host device (for instance, a Python script).

Results

This is the assembled Helmholtz magnetic simulation system:

Helmholtz Magnetic Simulation System fully assembled. Assembled Helmholtz coils cage

To validate our simulator, it is necessary to check two aspects of the magnetic field it generates:

  • The constancy of the magnitude with a fixed input current on each of the three axes,
  • The control of the field of the field on each of the three axes.

Constancy of the field

To make sure that the field in the working volume is constant, we ran several series of tests. For each of the axes, a constant current is fed into the pair of coils, and a sensor is moved within the cage.

For instance, this capture was taken during a back and forth movement of the sensor along the X axis, while the X axis pair of coils was powered to reach 2.15 Gauss (215 µT).

Graph of the variation of the magnetic field in the X axis. Graph of the variation of the magnetic field in the X axis

The field is very constant: within 0.06 Gauss of variation in the X axis. This matches our specifications.

To give more emphasis on this result, I disconnected the system at t=15s. With the graph re-scaled, this constancy gets more obvious:

Graph of the variation of the magnetic field in the X axis. Graph of the variation of the magnetic field in the X axis (longer time)

With the same test performed on the three axes, we validated the constant nature of the magnetic field in our Helmholtz simulation environment. This is a very important result as it proves that the coils are well wound, that the electronics manages to power them with a constant current, and that any testing we will later do in the simulator is meaningful no matter where it is placed in the working volume.

Control of the field

After we is proved that the field is constant within the working zone, we ran another set of test to check that we have full control on the generated field.

The experimental protocol is the following: a description of several magnetic field waveform is done in the software, and a sensor is placed in the Helmholtz coils. If the measured waveform corresponds to the one described in software, it proves that we have control over the magnetic field.

For instance, we asked the software to generate a triangle waveform for the X axis magnetic field. This waveform has an amplitude of 2.15 gauss (215 µT) and a period of 7.5s.

Graph of the control of the magnetic field. Graph of the variation of the magnetic field in the X axis with a triangular waveform

As shown by this capture, the waveform corresponds to the one we described in software. With the testing of the magnetic field with different waveform in each of the three axes, we validated our control of the Helmholtz simulation environment.

Test with a model CubeSat

We also tested our Helmholtz simulator with a model CubeSat. To achieve this, it is necessary to make a device that allow this model to free spin in every direction. We 3D-printed a large 3 axis gimbal, but is proved very difficult to balance.

SolidWorks render of the 3 axes CubSat gimbal SolidWorks render of the 3 axes CubSat gimbal

We tried to use an air bearing, but it requires a large flow of high pressure air to continuously run. Our compressor could keep up, but it ran its loud motor to do so after a couple minutes of use. Also, the turbulent flow of air that lifts the sphere creates some oscillations, which are a source of friction.

In the end, we used a water bearing. The sphere containing the model floats in a basin:

The CubeSat model placed on the water bearing The CubeSat model placed on the water bearing

This simple solution allowed us to test magnetometers and magnetorquer as long as the model is properly balanced.

Resources

By popular demand, I added an archive containing Helmholtz coil resources (more design details, code, electronic schematics, etc.). Click on this button to download it:

Download the archive

Notice: the content of this archive is provided "as-is", under the terms of the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication license.

Author: Charles Grassin


What is on your mind?

  • #1 ilya

    May I know what frequency did you operate?

    on November 7 2018, 14:15

  • #2 Alyanna

    Hi! We are currently working on this project and I saw this. If I may ask, what is the advantage of driving a pair of coil separately rather than driving them in series? Do you have a current sensor for feedback at the h bridge to regulate the current? Also, at what frequency did you operate? Thank you!

    on November 7 2018, 20:22

  • #3 Charles

    Hi Alyanna and Ilya! Below are the responses to your questions:

    Q1: If I may ask, what is the advantage of driving a pair of coil separately rather than driving them in series?
    -> A pair of coils should have the exact same current running through them to generate a uniform field. Therefore, it is actually better to run them in series. To power the two coils in series, you need double the voltage. However, the 3 power supplies we had were limited to 35 volts but could provide up to 10A. By wiring each pair in parallel, we get the 1.5A we wanted with 30V (following ohm's law). The drawback of this solution is that we needed one H bridge per coil (6 instead of 3) and we had to make sure the current was equal in each pair.

    Q2: Do you have a current sensor for feedback at the h bridge to regulate the current?
    -> No we did not. Because our power supplies were always set to 30V, we could do a simple calculation in the code to get the output current for a given PWM value : current=inputvoltage*PWMdutycycle/coilresistance. This worked perfectly. However, adding real current feedback would be very easy with a ACS712 Arduino current sensor module, for instance!

    Q3: Also, at what frequency did you operate?
    -> I am not sure of what frequency you are talking about. The Helmholtz coils operate on constant current to generate a field. With constant 1.5A, we get constant 2.5 gauss. We did do some variation of the current over long periods to simulate a rotating field (see "Control of the field"). If you are talking about the PWM frequency, it is about 500Hz on the Arduino nano, but it does not really matter.
    Good luck!

    on November 7 2018, 21:53

  • #4 Alyanna

    Thank you so much for this.
    Our supply rating is 32V/6A. I'm planning on driving the coil in series with a maximum current of 3A. Will this work? The voltage at each coil would be 15V maximum.

    on November 10 2018, 7:08

  • #5 Charles

    This question has an easy answer: the ohms law gives you the current for a given voltage!
    I=U/R
    This means that the answer to your question depend on the resistance of your coils. Their resistance depend on the conductor length and diameter (http://hyperphysics.phy-astr.gsu.edu/hbase/electric/resis.html).
    In our case, we got 22 ohms per coil. For two coils in series, my previous formula gives:
    I=30/(22+22)=0.7A
    A 30V supply would not work with our coils.
    However, you can easily make it work by lowering the resistance of the coil. If you look at the formula for resistance, you have two ways to achieve this:
    Take bigger diameter wire -> not a good idea, copper is both expensive and heavy!
    Make the coils smaller -> this is the solution ! Because the Helmholtz coils magnetic field formula (https://en.m.wikipedia.org/wiki/Helmholtz_coil) also depend on the size, making them smaller will also increase the field, therefore requiring less turns to get the field you want, meaning the the resistance gets even lower! All in all, this mean making the coils a bit smaller will reduce their resistance a lot!
    I will let you do the math with the ohm's law, the wire resistance formula and the Helmholtz coils formula.

    on November 10 2018, 9:58

  • #6 Ned

    I'm interested in doing a similar thing on a smaller scale. Do you know if the PWM of the H-bridges causes the current in the coils to vary at the PWM frequency? In other words, the average current is variable by choosing the PWM duty cycle, but the instantaneous current oscillates around the average value at the frequency of the PWM. Am I correct about that? p.s. - Great page describing your project.

    on November 19 2018, 2:51

  • #7 Charles

    Thank you Ned! Building this on a smaller scale is definitely a good idea !
    You are absolutely right: when powering a large inductive load like these coils with a PWM signal, one would expect large voltage spikes to occur (because an inductor resists the change of current). I have not actually mesured the current output with precise test equipement, however, I have measured the magnetic field. I have not seen any magnetic fluctuations or spikes. At the time, my unproven hypothisis was that the energy stored in the magnetic field (1/2LI^2) averages the PWM wave. Because everything behaved exactly as exepected, I have not done further investigation. Unfortunatly, I don't have the equipement to try this now.
    If you do more testing, I would love to hear your results!
    Hope this helped,
    Charles

    on November 19 2018, 18:32

  • #8 Carlos

    Hello, I have a question. Is there a specific reason to produce a 10 Gauss magnetic field? Thank you!

    on March 5 2019, 15:48

  • #9 Charles

    Hi Carlos! This system was built to test magnetorquers, which create a weak torque. Beeing able to output +/- 5 gauss (10 times the Earth's magnetosphere in every direction) gives us about 10 times more force than what we would experience in low earth orbit. This helps us overcome friction in our test environnement (that we obviously would not have in space). It gives us more freedom.
    The practical minimum would be +/- 1 gauss to be able to cancel the Earth magnetic field and output an opposing one.

    on March 5 2019, 19:05

  • #10 Melvyn

    Hi Charles,
    How did you get do to generate a negative magnetic field and so cancel the Earth magnetic field ?
    Thank you

    on March 19 2019, 10:06

  • #11 Charles

    Hi Melvyn! Generating a magnetic field that cancel the Earth's is simple. The first step is to measure the field (with a LSM303C sensor or a smartphone for instance). Then a command to generate an equal and opposite field can be sent to the coils. I wrote my code so it takes a 3 dimensions field in input and calculate the current it needs to output in each pair of coils. This could be automated in the software so that, on startup, it does this by itself with a magnetometer.
    The important part is that the coils must be able to generate at least -0.5 to +0.5 gauss in each direction.

    on March 20 2019, 7:44

  • #12 Melvyn

    Hi Charles,
    Thank you for your quick answer.
    The thing I don't get is how could we generate this negative magnetic field ? with negative input voltage to the coils ?
    Also, I wanted to know which software are you using to automate your process ?
    Have a nice day

    on March 20 2019, 9:45

  • #13 Charles

    Melvyn,
    The magnetic field should not necessarily "negative" as the signs are completely arbitrary, it must just opposite to the Earth's one.
    For instance, if you measure the magnetic field to be +0.5 gauss in the X axis, the X axis coils need to be generating a -0.5 gauss field to compensate for it. If you measure the field to be 0.25 in the X axis and -0.25 in the Y axis (i.e. the Helmholtz system is at a 45° angle to the magnetic north), you need to output -0.25 gauss in the X axis and 0.25 in the Y axis. The magnitude and sign of the generated field are determined by the direction and value of the current in the coils. Refer to the Wikipedia article of the Helmholtz coils to view the equation that relates the current to the magnetic field. Hence, the coils are driven with an H-bridge.
    The coils are controlled with an Arduino board. It can read sensors and control the coils through the H-bridges. The software is Arduino code that I wrote for this application.
    This project turned out to be very popular. I will release more details and an archive with all the design data (code, CAD, schematics, etc.) this week.

    on March 20 2019, 11:19

  • #14 Melvyn

    Hi Charles,
    Thank you for your accurate answers.
    I am really looking forward to looking into your details and archive for this project
    Have a nice day

    on March 21 2019, 9:53

  • #15 Nicolas

    Hi! Will you release the codes and design data you chose for your set up please ?

    on March 26 2019, 15:06

  • #16 Charles

    Melvyn, Nicolas, I added a download button for the archive at the end of this article. I hope that you will find some useful data there.

    on March 27 2019, 22:35

  • #17 Melvyn

    Thank you Charles!!!

    on March 28 2019, 10:36

  • #18 RJS

    Hi there, I was wondering if you might be able to provide a bill of materials for this project, specifically for the electronics components required for the controller boards.

    on October 9 2020, 2:20

  • #19 Charles

    Hi RJS,
    The electronics BOM can be extracted for the Kicad files. I will add an HTML BOM to this archive.
    The mechanical BOM will depend on your design constraints. As I stated in another comment, I'd recommend to do smaller coils to get more magnetic flux for a reduced cost. Most of the cost was the copper magnet wire.
    I could do an overall BOM file, but it would not be very useful since this design should be adapted anyways.

    on October 12 2020, 13:40

  • #20 RJS

    Thank you Charles, an html list of electronic parts would be most appreciated. I just downloaded the archive again, and it was not there yet? I will try to get more from the KiCad files, I seemed to have some issue extracting all information from them.

    on January 3 2021, 2:45

  • #21 Jay

    Thank you for your sharing, Charles! I'm interested with your code and how did you choosen the values in the fieldmatrix?

    on February 8 2021, 10:42

  • #22 Charles

    Hi Jay,
    The code included in the archive is only "test" code. In this case, the field matrix is simply a test sine wave, to look at the reponse of the device!

    on February 13 2021, 17:08

  • #23 RJS

    Quick question: in the KiCad files, and the separate ibom.html file you provided (thanks!!), there is a set of resistors on the logic card designated as "R", rather than a number. I have seen e.g. 1R2, or 100R, but never R by itself as a resistor value. Is this referring to 1 Ohm resistors?

    on March 17 2021, 15:39

  • #24 Alex

    My undergraduate team just finished building our own Helmholtz cage for the university and we used a lot of information from this page to get us started. Thanks for the great article! Image of our cage https://i.imgur.com/2U0cS3x.jpg

    on March 22 2021, 21:18

  • #25 Charles

    Hi RJS,
    "R" is simply the placeholder value is most EDA, when not value is entered... Is this case, those resistors are used for LEDs. 500 Ohm should be ok.

    on March 24 2021, 9:38

  • #26 Charles

    Hi Alex,
    Thanks for the feedback, and for showing your system! Those coils look massive!

    on March 24 2021, 9:43

  • #27 RJS

    Dear Charles,
    are the logic board and H-bridge board supposed to have components soldered to both sides? The KiCad files seem to suggest this. E.g. for the H-bridge, are the BF259 and mosfets supposed to be soldered on the other side of the PCB than the resistors and diodes, etc? The silkscreen seems to indicate this but I am not familiar with having to do this, so I thought I'd check. It makes less sense for a low profile build but I can see how soldering some components may become pretty crowded. Thanks for your help with all this...!

    on May 30 2021, 3:49

  • #28 RJS

    Dear Charles,
    are the logic board and H-bridge board supposed to have their components soldered to both sides of the PCB? The KiCad files seem to suggest this. E.g. for the H-bridge, are the BF259 and mosfets supposed to be soldered on the other side of the PCB than the resistors and diodes, etc? The silkscreen seems to indicate this but I am not familiar with having to do this, so I thought I'd check. It makes less sense for a low profile build but I can see how soldering some components may become pretty crowded. Thanks for your help with all this...!

    on May 30 2021, 3:50

  Back to projects

Related articles