Loading

Kategory:

Create a digital compass (Devantech Magnetic Compass - CMPS03)

Bookmark and Share
Whoa have more guns per week to make a new post. Flavor-it's none the less. As long as there is time, and its components, today I will discuss about creating a digital compass uses Devantech Magnetic Compass (CMPS03). Hmm never thought to make a compass that can point to the direction of Qibla as a guide to pray (for Muslims), but using digital components? So this component is one alternative to make it.

Appropriate datasheet, actual compass module is designed specifically for use in robots as an aid to navigation. The goal is to produce a range of numbers to represent the position of the robot. It uses a compass sensor is sensitive enough to detect Earth's magnetic field. The output
of this sensor they installed two perpendicular to each other that is used to calculate the horizontal component of Earth's magnetic field. The shape and configuration of these components is as follows.
Create a digital compass (Devantech Magnetic Compass - CMPS03)
This module requires a 5v power supply with a minimum current 15mA. There are two ways to get the sensor readings. With the PWM signal (pin 4) or I2C interface (pins 2 and 3). PWM signal is modulated shaped pulses. Pulse width varies from 1ms (0 °) to 36.99mS (359.9 °). In other words 100us per degree to offset 1mS. Another way is to use I2C. Pin 2 and 3 is an I2C interface and can be used to obtain a direct readout of the module. Do not forget, give a
pull-up resistor of 10 K (the absolute value of these guns, 4k7 also) in both this pin to VCC (5V). For signaling I2Cnya about gini rich (in datasheet)

Next, let's create a design tool. Here I use the PCB holes to make mounting the module, while I give pin pin header for I2C supply and to facilitate connections to the microcontroller. Image sequence is like this





In the circuit we use the method of reading the I2C. Pins SDA and SCL PortB.6 I connect to the microcontroller PortB.7 ATMEGA8535, while the LCD I connect to PortA.0 - PortA.5. Oiya, there are additional, there are actually pin for calibration, which is pin 6. But here I leave not connected anywhere. Once the circuit is made, please use the file below, but first download it (if ditampilin here too long). FREE ...

program and the schematic circuit

of about gini nih would




video preview
video

download preview it here . Hmm according to my experience, this component has a drawback that when used in areas that have a substantial magnetic field. Well it's the principle of using a magnetic sensor, so if there is a magnetic sensor in the "existence" we do not want is already bound to interfere with sensor readings. In the robot example, one sensor can result in disruptions put sensor readings. The laying of the sensor is too close to the DC motor can be the cause. Then, is there a material that can reduce the actual magnetic field in the form of noise that interfere with this? the answer is "SURE THERE!" .. just do not know what I've read and read .. anyway, he says stainless steel can, but .. who knows .. just try it on .. So, may be useful and can be made ​​in reference. Any questions, criticisms, or suggestions? Can contact me directly or fill out the form below comment .. :)
Thanks for reading: Create a digital compass (Devantech Magnetic Compass - CMPS03)
Related Posts Plugin for WordPress, Blogger...