Pages: [1]   Go Down
Author Topic: The GY-26 Compass sensor module  (Read 4458 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. anyone who has any experience with the GY-26 digital compass sensor module....
having a hard time finding something usefully anywhere.
starting to think it was a bad idea buying one of these.

Anyone with any info will be highly appreciated.  smiley

best regards...


* sku_70580_0.jpg (44.08 KB, 600x600 - viewed 45 times.)
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25732
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
starting to think it was a bad idea buying one of these
Why?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8669
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. anyone who has any experience with the GY-26 digital compass sensor module....
having a hard time finding something usefully anywhere.

No experience but it looks fairly simple:
http://www.elechouse.com/elechouse/images/product/GY-26-USART%20Digital%20Compass/gy-26%20manual.pdf
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Norway
Offline Offline
Sr. Member
****
Karma: 0
Posts: 344
Just dip it in mercury and power it up
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I was just ordering this module....
 
Using it in IIC mode, how would I get compass reading.
I mean it sais in the manual that reading 0x01 address gives the 8bit HIGH of the angle and address 0x02 gives the low 8bits
So how do I translate this into real degrees??

Is the output in steps of 0.1 or 0.01 degrees per bite or what (since serial response is in 0.1deg resolution) ? the manual is somwhat unclear on I2c response and only shows what to write to get response...
Do I need to map UART (serial) response against I2c response to decode this?
Logged

Maryland
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Chemist w/ electronics hobby. New to Arduino programming.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The program provided by drix at:
http://iteadstudio.com/iforum/viewtopic.php?f=16&t=1963&p=9229#p9229
is sufficient to talk to the compass. It also prints the first three bits from the compass' measurement, of which only the second and third bits are meaningful. HOWEVER, the compass reading stays the same. The three bits output appears as 0 239 239 over and over again. The calculated angle is then -411, and that doesnt change either. Nothing changes no matter what angle the compass is when it is started or while the program is running. I tried a few program variations but nothing seems to work. I really need this to work because my project is due in a few weeks. PLEASE HELP ME.Butchman2000
 
Posts: 1
Joined: Tue Jan 10, 2012 8:21 pm
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8669
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It also prints the first three bytes from the compass' measurement, of which only the second and third bits are meaningful. HOWEVER, the compass reading stays the same. The three bytes output appears as 0 239 239 over and over again.

That is very strange.  The value 239 (decimal) will not fit in a byte.  The code actually shows the values are displayed in HEX so 0x239 is 569 which is WAY too big to fit in a byte. You also don't show the part where is prints "Received angle: ".  Perhaps you copied and pasted the code incorrectly?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25732
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The value 239 (decimal) will not fit in a byte.
Wuh?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone.

Im new here. I just got the gy-26 compass and i connected it to a usb->rs232 converter. Im using a common comport transmitter to send data to my compass. When I send C0 as hex the led does turn on so it means im in calibration mode. Thats fine

But after i get out of calibration mode i try to send 31 as hex and i get nothing back accept for a 31hex back. I cannot get any readings from it. I connected everything directly without any use of capacitors etc etc. All gnd together and both vcc together. Ok like that?

Appreciate your help.
Thanks
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

someone already managed to put it to work?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, here's an example of the code in this link, serial connection http://www.higoraraujo.com.br/?p=1007
Logged

Pages: [1]   Go Up
Jump to: