Hello All,
I have been experimenting with a device that I will need some assistance with .
The basics are working but my health is very intermittent and my concentration for writing code is suffering and I believe that this project is important for any one who is interested in sensitive magnetometers and how they could be an essential tool for working with magnetic fields in3 dimensions .
If there is anything to using push pull (both positive and negative) (important)magnetic fields to perhaps behave in away that is unexpected
when rotated in a specific way then this tool will be essential to be able to work with strong and weak fields both near and far .
When lightning strikes nearby the magnetic field is not 2 dimensional
One magnetic sensor gives very sensitive readings in 3 dimensions but of course from a single point in space . A very useful tool to begin with as the sensor is small and can be on plastic goose-neck or wooden stand .
These sensors are cheap and one particular model the mlx90393 can run many units in one bus .
I suggest that arduino uno or nano as the base processor knowing that there are better choices but as clunky as arduino can be its cheap and common and is up to the task at this early stage .
A goal of this device is to rotate a 3d object on screen in its simple form rounding things to be 0-360 degrees .
Calibration is important ans these units were designed for compasses the z scale is not proportional to the x and y . and was designed to compensate for declination and inclination but is still as sensitive .
Further ahead many sensors can be spatially oriented and integrated to get the bigger picture .
I am of the understanding that the whole thing will shut down if its field becomes too strong ..means to an end .
I would imagine that a few monitors may be needed but the 1 in front of you is a good start
I currently use an environment called processing for the display but its very hit and miss depending on the system .
There has to be a better way and who here would not at least be curious what changes take place around anything that uses magnetic fields ?
The magnetometers can run at kilohertz if tweaked correctly and just think there is one in every phone nowadays .
There have been recent published studies about the effect lighting has on magnetic fields so there is a possible cause and effect reversal possible at the very least .
Search for arduino bunny rotate just as an example of a useful display.
I am asking for help and possibly offering something of great interest in return but I ask that you please stay on the subject of making the device work .
Some of you may know that we need a kind of oscilloscope for magnet fields and this I believe is it .
There are some very smart guys here whose input I will appreciate and perspective I respect but this is all that is really left to study regarding doughnut shaped devices like the ftpu we...(I) was lead away from back in 2006 .
Health issues have me on this swansong that I believe will at least lighten the load by offering you what I have available by specific omission and some lose specific information..(i hope you get that).
Please can we avoid the cloak and dagger stuff My life is not what it used to be and i don't really want to discuss anything but this device, its use and hope that some progress will lead to more progress .
Here is some basic arduino code ...note only common libraries used (preferable as many libraries have the same names in arduino)
// Distributed with a free-will license.
// Use it any way you want, profit or free, provided it fits in the licenses of its associated works.
// MLX90393
// This code is designed to work with the MLX90393_I2CS I2C Mini Module available from ControlEverything.com.
//
https://www.controleverything.com/products #include<Wire.h>
// MLX90393 I2C Address is 0x0C(12)
#define Addr 0x0C
void setup()
{
// Initialise I2C communication as MASTER
Wire.begin();
// Initialise serial communication, set baud rate = 9600
Serial.begin(9600);
// Start I2C Transmission
Wire.beginTransmission(Addr);
// Select Write register command
Wire.write(0x60);
// Set AH = 0x00, BIST disabled
Wire.write(0x00);
// Set AL = 0x5C, Hall plate spinning rate = DEFAULT, GAIN_SEL = 5
Wire.write(0x5C);
// Select address register, (0x00 << 2)
Wire.write(0x00);
// Stop I2C Transmission
Wire.endTransmission();
// Request 1 byte of data
Wire.requestFrom(Addr, 1);
// Read status byte
if(Wire.available() == 1)
{
unsigned int c = Wire.read();
}
// Start I2C Transmission
Wire.beginTransmission(Addr);
// Select Write register command
Wire.write(0x60);
// Set AH = 0x02
Wire.write(0x02);
// Set AL = 0xB4, RES for magnetic measurement = 0
Wire.write(0xB4);
// Select address register, (0x02 << 2)
Wire.write(0x08);
// Stop I2C Transmission
Wire.endTransmission();
// Request 1 byte of data
Wire.requestFrom(Addr, 1);
// Read status byte
if(Wire.available() == 1)
{
unsigned int c = Wire.read();
}
delay(300);
}
void loop()
{
unsigned int data[7];
// Start I2C Transmission
Wire.beginTransmission(Addr);
// Start single meaurement mode, ZYX enabled
Wire.write(0x3E);
// Stop I2C Transmission
Wire.endTransmission();
// Request 1 byte of data
Wire.requestFrom(Addr, 1);
// Read status byte
if(Wire.available() == 1)
{
unsigned int c = Wire.read();
}
delay(100);
// Start I2C Transmission
Wire.beginTransmission(Addr);
// Send read measurement command, ZYX enabled
Wire.write(0x4E);
// Stop I2C Transmission
Wire.endTransmission();
// Request 7 bytes of data
Wire.requestFrom(Addr, 7);
// Read 7 bytes of data
// status, xMag msb, xMag lsb, yMag msb, yMag lsb, zMag msb, zMag lsb
if(Wire.available() == 7);
{
data[0] = Wire.read();
data[1] = Wire.read();
data[2] = Wire.read();
data[3] = Wire.read();
data[4] = Wire.read();
data[5] = Wire.read();
data[6] = Wire.read();
}
// Convert the data
int xMag = data[1] * 256 + data[2];
int yMag = data[3] * 256 + data[4];
int zMag = data[5] * 256 + data[6];
// Output data to serial monitor
Serial.print("Magnetic Field in X-Axis : ");
Serial.println(xMag);
Serial.print("Magnetic Field in Y-Axis : ");
Serial.println(yMag);
Serial.print("Magnetic Field in Z-Axis : ");
Serial.println(zMag);
delay(500);
}
These sensors (mlx90393) are more expensive than others but not by much and the others seem to have errors in high gauss situations 15 bucks aud here
Thanks for reading
Computers are the best tools for some things and we never had such sensitive and small magnetometers back in 1997 did we ?
Over to the brains trust ...
3D Magnetics