Very interesting project. Thanks for sharing the code. I plan to modify for my dual axis solar tracker and replace the LDRs.
@MrFrisky883 жыл бұрын
Good luck with your project
@xt1200z13 жыл бұрын
@@MrFrisky88 Thanks again. For anyone else interested in trying this with the QMC5883L, I found header and parameter files. I'm not smart enough to do, so thanks to the author of these also.: api.riot-os.org/dir_5cce5766881baaa3953e3e6827950470.html
@251piyushbandre39 ай бұрын
Code was running in arduino IDE software?
@gemeus6 жыл бұрын
Nice work, I wonder to understand how does it works. Did you require a MPU6050 calibration to get the readings ? i was doing some tests and nothig was like your results.
@MrFrisky886 жыл бұрын
I did not calibrate the magnetometer (HMC5883L), but calibration is needed for correcting any magnetic field present in the area. So this is not a perfect solution and may not be very accurate for all case. MPU6050 is used to get accelerometer reading only and calibration is not needed for this application. If you examine the code, I have only applied the standard method given by application notes for tilt compensation using magnetometer and accelerometer readings.
@251piyushbandre39 ай бұрын
Please provide me hex file of thus code 🙏🏻
@thomazedson27614 жыл бұрын
Good evening, it is possible for this code to run on the arduino displaying the azimuth and pitch roll information on the serial monitor. thanks.
@MrFrisky884 жыл бұрын
Sorry, code needs modification to send output through serial port.
@thomazedson27614 жыл бұрын
would it be possible for you to show me how to modify?
@thomazedson27614 жыл бұрын
It's very important to me.
@thomazedson27614 жыл бұрын
help me please
@thomazedson27614 жыл бұрын
thomazedson882@gmail.com
@xmj11316 жыл бұрын
Yes, do you have time to record the whole process of production? Thanks
@MrFrisky886 жыл бұрын
Sorry, I could not record making this, but it is only a matter of soldering these components together according to the circuit diagram.
@pratikgurudatt88675 жыл бұрын
Hey, nice project you've made here, What are the configurations of the sensors you have used? Both for the magnetometer and the accelerometer?
@MrFrisky885 жыл бұрын
Magnetometer (HMC5883L): Continuous Measurement mode, Output rate: 15Hz Gain: +/- 1.9 Ga, Averaging: 8 samples Accelerometer (from MPU6050): MPU6050 is configured in Accelerator only low power mode. Accelerometer full scale range: +/- 16g
@gorangoran29554 жыл бұрын
Hi Thanks for code and schematic diagram. It is possible for this code to run on some slightly larger display?
@MrFrisky884 жыл бұрын
This code will work only for SSD1306 display.
@seanocansey29565 жыл бұрын
Cool project, but isn't the needle supposed to rotate in the other direction, so that the needle is stationary? 🤔
@MrFrisky885 жыл бұрын
Right, the dial should have rotated keeping the needle at centre. But that would take more program memory. For this program, ATmega8 took almost the whole flash memory.
@Hoaqn5 жыл бұрын
Perfect, it cost me only 10$. Nice project!
@251piyushbandre39 ай бұрын
Please provide me hex file of this code
@_a.z3 жыл бұрын
Are there actually any ecompassing chips available today?? It seems that the market is in limbo between obsolete and very long lead times, apart from all the dev PCB's!
@MrFrisky883 жыл бұрын
There are many chips having 3D accelerometer + 3D Magnetometer integrated to function as eCompass (like LSM303 from ST). But they are usually available in LGA package, difficult to hand solder. So using their dev. board is ideal for small project like this. As for the availability, I have no knowledge of the current situation.
@sukhee55 жыл бұрын
Hello. The HMC5883L compass X or Y which one will point magnetic north?.
@MrFrisky885 жыл бұрын
X and Y reading from HMC5883L are used to calculate the Magnetic north direction. If you hold the module with X arrow directly pointing to North, the X reading will be maximum and Y reading = 0. Similarly if you point Y arrow to North, Y reading = Maximum and X = 0. So, X and Y reading varies according to the module orientation. From the X, Y reading you can find the Azimuth angle, that is angle between Magnetic north and Forward direction. Here, X arrow of the module is used as forward direction. So, if you get Azimuth = 90 deg, you are holding the module with X arrow pointing directly at East.
@sukhee55 жыл бұрын
MCUatWork so in the video X is pointing North, Y is pointing West. is that correct? 0:43
@MrFrisky885 жыл бұрын
@@sukhee5 No, at 0:43 X is pointing West and Y is pointing South.
@MrFrisky885 жыл бұрын
@@sukhee5 In this datasheet: www.jameco.com/jameco/products/prodds/2150248.pdf on page 21, 22 you can find the formula for Azimuth for different conditions of X and Y.
@shlokjadhav20054 жыл бұрын
What is that P and R given on the oled display ?
@MrFrisky884 жыл бұрын
Pitch and Roll
@owenpowell32823 жыл бұрын
Help please. I got the error "cannot set sck period. Upgrade usb firmware "
@MrFrisky883 жыл бұрын
I guess you can ignore this error and should not be affecting the programming of the chip. (This happens due to the programmer having Chinese firmware which sets SCK automatically)
@shlokjadhav20054 жыл бұрын
And what is H ?
@MrFrisky884 жыл бұрын
Heading (or Yaw)
@sankarsaikumar770110 ай бұрын
I want this product brother
@DonEldarreiny3 жыл бұрын
HELP: Hi, i tried the code and everything but when i run the make all command, i keep getting error "../../common/ssd1306/ssd1306.c:467: warning: 'y' may be used uninitialized in this function" Please assist.
@MrFrisky883 жыл бұрын
It's fine. This is not an error, only a warning that you can ignore. The output hex file will be generated anyway.
@251piyushbandre39 ай бұрын
Please provide me hex file of thus code
@anupteke20076 жыл бұрын
Hi, Thanks for uploading videos and code. I just want to know whether its possible to get Pitch or Roll in +180 to -180? Currently its + 90 to -90 Degree...
@MrFrisky886 жыл бұрын
The formula used here for finding Pitch and Roll gives result in the range -90 to 90 only (which sufficient for tilt compensation calculations). To get full 3D rotation angles you will need to change the formula, which I don't have enough knowledge about. I think you can easily find some implementation by little bit of search. Good luck.
@owenpowell32823 жыл бұрын
Hi could you show me how to programme this?
@WagonLoads4 жыл бұрын
Hi, will this work with just the MPU-9250 alone?
@MrFrisky884 жыл бұрын
MPU9250 alone is sufficient for the project. But additional code for MPU9250 is required to retrieve magnetometer and accelerometer readings.
@WagonLoads4 жыл бұрын
@@MrFrisky88 that sounds great! My first tablet had a working compass, which allowed me to use Google Sky Map. My current tablets don't have a compass. I was wondering if there was a way to get Sky Map to see the MPU-9250 ,so that my tablet will show me what star my telescope is pointed at?
@MrFrisky884 жыл бұрын
@@WagonLoads Great idea. Though, I don't know how you would pass the sensor data to the tablet so it can be used by Sky Map. May be you could use Bluetooth (BLE).
@emmetray97034 жыл бұрын
Hi. Thanks for code. I copied your code, compiled, did everything by the same way, BUT compass is changing when I'm tilting it. I can't understand what I'm doing wrong. I'm working in Atmel Studio (Windows) , I'll send you my project, circuit pictures,.can you help me please? I'm begging you, please.
@MrFrisky884 жыл бұрын
Hi, I guess the magnetometer and accelerometer modules are not aligned perfectly. Make sure that X-axis of magnetometer and accelerometer point in the same direction.
@emmetray97034 жыл бұрын
@@MrFrisky88 Hi. I aligned them . May I add you in skype and send my circuit pictures, code ? Please?
@MrFrisky884 жыл бұрын
@@emmetray9703 ok, may be email is enogh
@emmetray97034 жыл бұрын
@@MrFrisky88 Thank you ! tell me your email please, my email is "giorgigelava@yahoo.com"
@Cris_Izagui6 жыл бұрын
Works like a charm. Is possible change MPU6050 for ADXL345? Can you help me?
@MrFrisky886 жыл бұрын
Yes, an ADXL345 accelerometer module can be connected instead of MPU6050 module. Code needs to be adjusted for accessing registers of ADXL345. I don't have a module with me and also need to refer the datasheet of ADXL345 to know more.
@Cris_Izagui6 жыл бұрын
@@MrFrisky88 Ok. I will be try. Thanks!
@Cris_Izagui6 жыл бұрын
Hello. This code works directly on Arduino ? Thanks!
@MrFrisky886 жыл бұрын
Hi, if it works on ATmega8, it should definitely work on Arduino. Unfortunately, I never worked on Arduino platform, but only with C on AVRs. I think, creating an Arduino project with the source code of this project should work without any problem. Try it.
@fatih19225 жыл бұрын
Thanks for the video sir. Your source code helped me a lot. I did this with arduino for rapid prototyping purpose.
@xt1200z13 жыл бұрын
What changes did you make to the code? I'm trying to do the same. I did find the address for my HMC5883 was 0x0D, but still not working.
@kadrimetin3 жыл бұрын
@@xt1200z1 it can be qmc5883l chip. registry address are different.
@xt1200z13 жыл бұрын
@@kadrimetin Right, found the datasheet and got the correct registers, think also the LSB and MSB are backwards plus the order X,Y,Z. All is working now with atmega328p but compass is not correct. Thinking the data coming from the qmc5883l is different from the original HMC5883L.
@251piyushbandre39 ай бұрын
Please provide me hex file of this code
@7grounds6 жыл бұрын
will this compass work when installed on a vertical wall
@MrFrisky886 жыл бұрын
When this compass is installed with its flat face parallel to the wall, the tilt will be 90 degrees (roll or pitch). But the readings will never show 90 degrees. That's a problem in this case. It will show a reading near to 90 deg (85 to 89) for roll or pitch. I think it will be better to install the board perpendicular to vertical wall (parallel to ground) and place the OLED display for vertical reading.
@pjwlk5 жыл бұрын
Thanks for sharing, very useful.
@251piyushbandre39 ай бұрын
Please provide me hex file of thus code please 🙏🏻
@ScottyGolf4 жыл бұрын
Can I buy that one from you?? please I'm serious message me back. Thank you
@MrFrisky884 жыл бұрын
Sorry, I don't have this one with me now. Anyway shipping cost will be much more than cost to build this. I guess you can build this without much difficulty.