PIC & MXD2125 Based Elevation Module
One of the aspects of amateur radio I enjoy is EME. Having built my own elevation system I then needed a way to feedback the angle. I tried many ways in the past such as potetiometers but ended up be introduced to the MXD2125 dual axis accelerometer device. This can be used, along with gravity, to measure tilt, the angle vs down. Comparing both X & Y axis outputs the resolution can be very small, smaller than is required. Up until now the way I got the angle back was from one of the axis digital outputs by converting it to an analog voltage by using an RC circuit which my elevation controller could work with, but not very well. The main problem is the analog voltage is not pure DC and I have in the past observed inaccurate readings and sometimes it just fails to work, but this maybe wiring also. To cure this headache I set out to make the system as fully digital as posible so I decided to measure the pulses from both axis directly with a PIC and then either convert that to a voltage with a DAC/Digital Pot or send it to the shack by serial and process it there by either re-designing the controller to work with serial feedback or converting the serial to analog there. When I searched for info on this idea I came accross a webpage by Frederic, F1OAT who has alredy used a PICAXE-08M with an MXD2125 - info about his circuit is here and at the bottom of this page here. I also came acress some code which uses a PICAXE-18M to control a Maxim DS1803 digital pot, which I have some samples of, over I2C so in the end my solution uses that. I built a test circuit using a PICAXE-08M and with the help of Frederics code proved I could get it all to work. Today I finished the project using a MXD2125, a PICAXE-18M, and a DS1803 so I now have a 'digital' means of reporting the angle. I found at 0 degrees I get a voltage of ~0.2v and at 90 degrees ~4.3v out of the DS1803 which is about 0.045v per degree. The digital pot has a resolution of 0.0195v per bit when fed from 5v. No calibration is needed at the sensor end, only as much 'swing' as possible between 0 degress and 90 degrees. As the output is linear the LVB Tracker is calibrated for 0 degree voltage and 90 degrees voltage and so knows what the anlge is based on these to stored values, being digital it shouldn't drift over time, something I think is happening with the RC circuit...
Downloads
ExpressPCB Schematic and PCB layout v2.0 (ZIP) | |
File Size: | 21 kb |
File Type: | zip |
Schematic and PCB Pictures v2.0 (ZIP) | |
File Size: | 17 kb |
File Type: | zip |
PICAXE Code v2.0 (BAS) | |
File Size: | 4 kb |
File Type: | bas |