Compass project

Hi everyone,
I want to build a compass 2 meters long. (The pointer is made of lightweight materials).
I would like to know if you can help me with my project? If so,

Hello,

Are you planning on having any type of reduction or put the pointer directly on the motor’s rotor? The driver and motor will depend on this.

This might not be the popular opinion, but for the microcontroller I’d go with an ESP32 because I find it’s easier to work with on the Arduino IDE than any stm32.

Please let us know a bit more details on your project and we should be able to help more :slight_smile:

1 Like

Hello David,
The idea is to have the pointer on a mast 50 cm high, 45mm diameter, attached to the motor’s rotor by one of the edges directly (or with reduction).
Thanks.

Just had a look at the RMD-L-50. It looks as if it comes with mcu and motor controller attached. That might be a simple options but you probably can’t use the SimpleFOC library.

They have S model too which is slower which probably means it has more torque.

I’m wondering how strong your motor needs to be? A balanced 2 meter compass pointer (which isn’t pushing anything but its weight e.g. 400g) doesn’t need to be that powerful.

The yuneec linked is a 50KV motor which is great for slow movement (which you probably want).

The second motor is a 650kv motor - this will draw more current and want to go faster. So I’d probably prefer the first motor if the compass needs to move slowly.

The AS5047 magnetic sensor seems well liked on this forum.

Batteries? The motor is rated 6S but 3S (12v) is probably enough as you are moving slowly. i.e. you could buy a https://hobbyking.com/en_us/turnigy-2200mah-3s-25c-lipo-pack.html?___store=en_us
Depends how long you need it to run for.

Regarding Arduino/driver this depends how confident you are with arduino etc. I suspect the simplefoc board with an uno might have enough power (it does about 1A) for your needs.

Hi! Thanks. It needs to run a maximum of 1 hour.

In this case, a good option will be:
Motor: yuneec Mini 4227 50KV (6S Dc 22.2V)
Board: Arduino Uno Rev3
Shield: SimpleFOCShield V1.3.2
Batteries: Turnigy 2200mAh 3S 25C LiPo Pack

Magnetic sensor: AS5047 (this is for the motor, correct? Is it easy to assemble?)

What about an accelerometer/compass?

Can you describe what the compass will be attached to? And how you intend to use it? E.g do you always want it to point to the earth’s magnetic north pole or will you be using a magnet to manipulate the pointer?

The reason I’m asking is that you might not need a magnetic sensor (for motor position) at all. I.e. you could just use the compass (a different type of magnetic sensor) as the feedback loop.

The accelerometer/compass might need to be placed away from or shielded from the motors magnetic field.

Have you read up on sensor fusion? If your compass will always be horizontal and you are just tracking earths magnetic field then the accelerometer will probably be of no use as it can only detect pitch and roll whereas a compass van measure yaw. However blending/fusing magnetic 3axis with gyro will remove a lot of noise. You could use complementary or kalman filter (the first is super easy). Some sensors do the fusion for you i.e you don’t have to do any maths you just ask for the angle.

The compass will be attached to a stainless steel base plate and it moves.
I want to keep it level (no tilt, no rotation) and pointing for the Earth’s magnetic north pole.
I will use it to explain to elementary school children about navigation.

If this is about demonstrating physics/magnetism and not demonstrating electronics/coding then I’d probably use a stepper motor e.g nema 17 with a standard stepper driver e.g a4988 + compass ic. Very simple to code and whilst it’ll be less efficient you can turn the motor off when it’s pointing north (so efficiency probably isn’t a problem)

Perhaps I shouldn’t be suggesting the above as it’s not using SimpleFOC! A slight variation would be to use simplefoc + nema 17 + l298n. Antun did a simplefoc video on this recently. Support for stepper with simplefoc is a little experimental though.

It is about demonstrating physics / magnetism and electronics / coding. The main idea is to arouse students’ curiosity about navigation, electronics and coding. Create the possibility to build a project.

It seems to me that the BLDC motor is better for this project than stepper motor because of the size and weight of the battery.

2 Likes