Geekshed – M1BXF Rotating Header Image

July, 2011:

PICAXE-18M & MXD2125 Based Elevation Module

MXD2125

One of the aspects of amateur radio I enjoy is EME.  When I was active on 2m (144MHz) EME I built my own elevation system using a jack-arm but I then needed a way to feedback the angle.  I tried many ways in the past such as potentiometers then Sam G4DDK introduced me to the MXD2125 dual axis accelerometer device.

Elevation_PCB_Bottom_Arrow  Elevation_PCB_Top

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 analogue voltage by using an RC circuit which my elevation controller could work with, but not very well.  The main problem is the analogue 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 possible so I decided to measure the digital pulses from both X and Y axis’s directly with the PICAXE-18M 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 elevation controller to work with serial feedback or converting the serial to analogue there.

When I searched for info on this idea I came across a webpage by Frederic, F1OAT who has already used a PICAXE-08M with an MXD2125 – info about his circuit is here and at the bottom of this page here.  I also came access some code which uses a PICAXE-18M to control a Maxim DS1803 digital potover I2C, which I have some samples of, 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.

Elevation_Scematic_v2.0

The finished project uses a MXD2125, a PICAXE-18M, and a DS1803 and provides a fully ‘digital’ means of reporting the angle by converting it to a voltage.  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 degrees 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 angle is based on these to stored values, being digital it shouldn’t drift over time, something I think is happening with the RC circuit…

Code:

Images:

MXD2125_Elevation_Mounted MXD2125_Elevation_Mounting_Info

MXD2125_Elevation_Boxed MXD2125_Elevation_Closed

Elevation_PCB_Bottom Elevation_PCB_Top_(Boxed)

 

Revision:

240711 – Project posted to web.

LVB [Tracker] Extender

LVB_Extender_Fitted.jpg

I started using an LVB Tracker by G6LVB (also of FunCube Dongle fame) to control my Yeasu G400RC and KR-5400 rotators which have my directional antennas on them – The G400RC + homebrew jack-arm elevation was mainly for EME and the KR5400 was for satellite work.  I had to built an elevation feedback circuit, I chose a MXD5125 for this but I found I still lacked some of the features of more advanced rotators and with the LVB Tracker being controlled by serial using the GS-232 protocol I found this would be easy to remedy using a PIC.

LVB_Extender_v2

The main features I wanted to add were the ability to input a wanted heading and then leave the rotator to goto that heading instead of having to hold any button down as the rotator can be slow and my attention span is short.  I wanted to have a button for ‘park’ to put the antenna in it’s ‘resting’ direction and an easy way to just rotate 45 degrees or 180 degrees (flip) at a time, I also added a button to toggle a relay which was used to switch the satellite antennas from RH to LH circular polarization and back again.

This shows how I interfaced the LVB extender (in yellow) with the LVB Tracker (in blue)…

LVB_Extender_BlockDiagram

In the end I used a PICAXE-28X1 chip as I needed a bit of program memory and lots of input pins.  The input buttons consist of UP, DOWN, CW & CCW plus LH/RH, Park, +45 degrees and +180 degrees.  The serial from both the LVB Tracker PIC and PICAXE-28X1 are TTL so I connected the serial to the LVB Tracker between the PIC and the MAX232 chip used for RS-232 level conversion.

Whenever UP, DOWN, CW, CCW, +45 degrees or +180 degrees button are pressed the first thing my LVB Extender has to do is read the current positions using the GS-232 “C2″ command which prompt the LVB Tracker to output both current azimuth and elevation positions which I read and store. From these positions the code works out what needs done with them.  If it is UP, DOWN, CW or CCW then it runs a loop to increment or decrement the original position for the duration of the button being pressed with increasing speed over time.  It writes the value back to the LVB Tracker on every loop.  If the +45 degree or +180 degree buttons are pressed the LVB Extender again reads the current positions using a “C2″ command and either adds 45 degrees or 180 degrees to the value and writes it back to the LVB Extender ensuring the write command has the originally read elevation value to this is not effected.  The Park button sends a stored position, from my old QTH in JO02ab the best heading for me was 127 degrees azimuth and 0 degrees elevation (best for monitoring 144.300 into Europe).  The Park heading is programmable only in the code, I made no provision to set it on the fly, main because I didn’t know how when I created this, I do now and will add it if requested.

The LH/RH button only toggles a relay to switch a voltage to the antennas.  If azimuth value reaches 360 degrees the code converts it to 0 degrees and if it reaches 0 degrees it converts to 360, both are able to be set if you like to go over the limits a little.  On elevation the counting is limited to between 0 and 90 degrees.

LVB_Extender_AND_LVB_Tracker LVB_Extender_Buttons

LVB_Extender_Fitted LVB_Extender_Boxed

Code:

 

Revision:

240711 – Project posted to web.

Icom (CI-V or band Data) to Yaesu BCD Band Data Converter

After the 2011 Camb-Hams DX’Pedition to Arran and using the Discovery 64 on 6m and making some good contacts on it I decided to bite the bullet and go buy a decent 6m Amplifier.

I have been thinking of getting an amplifier for HF and 6m for a while but didn’t want to have 2 extra amplifiers in the shack, one for HF and one for 6m (50MHz).  There are a few options about for a combined HF + 6m amplifier and luckily a Yaesu VL-1000 Quadra (1KW HF and 500w on 6m) recently came available second hand at Martin Lynch and Sons so while standing out in the single spot in the garden at the Arran DX site where I could get decent and reliable Vodafone coverage I gave them a call, agreed a price and had it shipped, bullseye!

The Quadra needs to switch bands for bandpass switching which can be achieved by sniffing RF from the exciter or via Yeasu’s 4 bit Band Data interface which most Yaesu radios support.  However my exciter is an Icom IC-756pro3 and Icom do external band switching by varying a voltage on a single pin between 0v and 8v depending upon the band selected (note WARC bands are not individually identified), I could also use the CI-V frequency data (with CI-V Transceive set to ON):

image

L = Low / 0v, H = High / 5v

The Project

CI-V to Yaesu Band Data_v1.1 Icom to Yaesu Band Data_PCB_v1.0

So what I need to do is build an interface which takes the Icom Band Voltage from the Icom IC-756pro3 ACC2 port and converts it to Yaesu 4 bit Band Data.  If I wanted to use just CI-V I could use a PICAXE-08M (8 PIN) which support 4 output pins, Yaesu Band A to D and one serial in PIN used for CI-V but the SERIN support for the 08M is limited.  I decided to go for a PICAXE-20X2 as it has a hardware serial pin, supports 19200 baud, the fastest the IC-756pro3 manages and gave me plenty of spare pins.  My final spec sheet was:

  • Auto switching between CI-V and Icom analogue band data as source input.
  • 4 pins outputting Yaesu Band Data to the Quadra VL-1000.
  • 8 additional user configurable pins, i.e. selected pin go high on selected band to drive external equipment like coax relays.
  • Support remote (on/off) switching of the Quadra VL-1000 by providing 13.8v to the Quadra when the IC-756pro3 is switched on.
  • Have the PTT line integrated within the interface connections, it is not connected nor needed for the PIC.

NOTE:  I found the VL-1000 manual is close to useless with regards to the Pinout diagrams – it has a picture with pins numbered but has a list next to it in in letters A,B,C etc…  I also blew the 5A fuse inside my IC-756pro3 and damaged a track later on by not getting the 13.8v on the correct pin, i.e. following the manual so be warned.

The PICAXE code:

Download the code, schematics and PCB layout here.

The code is split into 2 sections based on whether the CI-V is connected.  If the CI-V is connected by default it is high which can be detected by the PIC which is what the line in the code equalling ‘IF CIVinPIN = 1 or CIVorADC = 0 then’ does.  If there is CI-V then the PICAXE runs the CI-V routine to decode the frequency and works out the MHZ and 100KHz, i.e 14.123MHz becomes decimal 141.  If there is no CI-V connected (the CI-V input to the PICAXE chip will be 0v) then the PICAXE uses a routine to look at the band data voltage using ADC to determine the band, first you need to make sure you don’t put more than 5v into the PIC, so you divide it with a couple of resistors R1/R2 so the voltage is 0.6 that of its original (i.e. 8v becomes 4.8v to the PIC). You then simply read the voltage as a function of ADC, 4.8v is 96% of 5v (we are using READADC10 which is 10bit value and the max ADC value is therefore 1024) so 4.8v = 96% of 1024 the [max] ADC value is 983. All we now do is for each band give a lower and upper limit for each ADC value (accounting for rig variance) and if the ADC value falls within a range then the appropriate band is chosen and BCD pins set accordingly.

If the band voltage is say 6.2v out the radio what band are we on? Reduced first by R1/R2 the voltage becomes 3.72v into the PIC, this has an ADC value (3.72/5v * 1024) of about 762 which rightly falls into the 80m band range. 80m has a lower ADC limit of 700 and an upper ADC limit of 799.

Remember the PIC code is split in 2, the top half is for CI-V decoding and the bottom half band voltage decoding.

When the radio is switched on 13.8v is taken from ACC2 on the IC-756pro3 which powers the PICAXE and also goes to the VL-1000 to switch it on, ensure the remote switch on the back of the VL-1000 is set to ON.

Updates:

230711 – Version 1.1 released:

  • Improved CI-V string searching
  • Additonal checks in Band Data routine to ensure we didn’t get there by mistake

Code now works fine with HRD controlling the radio over CI-V and all band switching works independent of whether the radio or HRD initiates a band switch.

170711 – I received an email from Jack Brindle, W6FB who commented “There is one change I would suggest in the output table, though. The BCD code 0×0 is not defined, but is used by some manufacturers. For example Elecraft uses it in the K3 for 60 meters. However, 0xF (all ones) _is_ defined as a no-band selector.”  So with that in mind I’ve changed the code so ‘no band selected’ is now all 1’s (0xF) – which turns out to be 70MHz, see my post about that.

150711- I received a comment from Barry GM3YEH who uses the Icom to Yaesu BCD Band Data Converter on his radio with N1MM contest logging software and a 5B4AGN  BPF and found the rig stays in sync with N1MM software but the BPF only changes to the correct band temporarily then drops into a ‘no band selected’ state after a second or two.  Barry suggested it might be down to N1MM polling the radio which the interface sees as 0v on the CI-V line which makes the code execute the Band Data Voltage code for which there is no band voltage data so it defaults to 0, ‘no band selected’.  On 230711 I reworked the code so it now has a much better CI-V ‘search’ string so it doesn’t get false values and also added an extra check in the Band Voltage code as there were times, as mentioned above, that the code would move there even if it was receiving CI-V data.

/END UPDATE:

IMG_20110514_142314IMG_20110514_130445IMG_20110514_130436IMG_20110514_012341IMG_20110514_012328IMG_20110512_195125

SCAM12 Installation

So I was convinced for my new mast I would use a SCAM12 after seeing G4ERO’s installation (picture on his QRZ page).  I had done some antenna work round at Colins QTH and seeing how simple it was to erect (BINGO!) and take down.  The mast is approx 3m when down (with antennas on) and the top of the SCAM12 is 12m when up.  The SCAM12 is pneumatic and requires about 22PSI of pressure when fully up and mine stays up for days. The SCAM12 is fully rotate-able and sits within a swivel base/mount but I use a rotator at the top which you can see below the 6m/4m antenna so you can work out and see the SCAM12 is low when down. I do plan to move this to the bottom when I get round to working out how best to do it.

IMG_20110325_165858

And when up:

IMG_20110417_161248

Mounting the SCAM12 I again took advice from Colin G4ERO and dug a hole about 100cm x 30cm x 30cm, bought a 2.5m long 178mm x 102mm x 19mm universal beam, modified it, (see below) put it in the hole and aligned it for vertical. I then concreted the bottom 50cm of it, let it set and filled and packed the rest with mud.

IMG_20100918_162558

As the SCAM12 is able to rotate, there is a bearing in the bottom of the mast so it is not a good idea to mount it direct onto the ground.  So I welded a bracket on the bottom to hold the SCAM12 off the ground.  I then used threaded bar and some angle iron to hold it against the universal beam with some wood between both to tighten against.  Since these pictures were taken I’ve repainted the universal beam Hamerite ‘Highland Green’ which is more similar to the SCAM12 colour.

IMG_20100926_134357 IMG_20100926_134322

As the mast is pneumatic I got a small compressor for 30EUR at a Dutch Radio Rally which take 2 minutes 40 seconds to put the mast fully up.  I’ve fitted it with a remote control and pressure switch to it automatically switched off when at the correct pressure. The SCAM12 comes with a key to allow the air out and it takes a minute to come down.

IMG_20110227_193410

There are guying points for 4 guy ropes on a slip ring but so far I have not guyed the mast at home and it’ has been up in quite strong winds, if I’m worried about the wind I only put a few sections up.  The sections can also be locked off if the SCAM12 is planned to be up for an extended period of time.