It seems that although I managed to build Andy G4JNT's PIC circuit properly, and his code is just fine, that the decoder will not yet work because the GPS module is configured incorrectly.
So now I have to configure it, which means getting it connected to the PC to run Ublox U-Center software to allow me to change the set-up. This it looks like I have to do in RS232. So, its back out with the iron and the 9-day D-types!
Update - well, it turns out my GPS module uses TTL levels, not RS232 - it even says so on the module!
My one and only USB to TTL conversion module I cannot find, so thats yet another item on order from the Far East, and yet another project or experiment put on hold for up to a month waiting.
And, it also means ive finally succumbed to the temptation to order the Airband receiver kit! Looking at the circuit for this, its clear that its a blatant copy of the Ramsey Electronics kit, but at a fraction of the price.
Musings and adventures in amateur radio, electronics home construction, military comms equipment, charity long distance walking, life and career
Wednesday, 2 September 2015
Sams first PIC project
Today I sat Sam down and introduced him to the MikroBasic software for PICs, and to the PICkit2 software. I also talked him through some basics of the PIC chips themselves, and how to use the data sheet to decide on pin connections and the like. We then had a go at creating a program.
At first, although it compiled fine, I was stumped how to configure the chips. It turned out to be my own error - i'd modified the example program, which meant that since I hadnt started a new project, it didnt bring up the configuration window! Once i'd found that out, I could set the internal oscillator as we wanted. Next, I found that the Mikroelektronica software is not directly compatible with the MPLAB PICkit2. I had to find where it stored the .hex files and import them.
Ok, so our program isnt going to win any coding awards! -
its just a simple LED traffic lights sequence. And it took me a couple of hours to fathom turning the Port A analog comparitors off! But the point is that between us, Sam and I coded this without any help, and it works!
From now on, I will let Sam work the necessary programming out to improve the project. His next task is to add a second set of LEDs, following the reverse sequence - essentially a set of roadworks traffic lights! Oh, and to get a flashing amber!
At first, although it compiled fine, I was stumped how to configure the chips. It turned out to be my own error - i'd modified the example program, which meant that since I hadnt started a new project, it didnt bring up the configuration window! Once i'd found that out, I could set the internal oscillator as we wanted. Next, I found that the Mikroelektronica software is not directly compatible with the MPLAB PICkit2. I had to find where it stored the .hex files and import them.
Ok, so our program isnt going to win any coding awards! -
its just a simple LED traffic lights sequence. And it took me a couple of hours to fathom turning the Port A analog comparitors off! But the point is that between us, Sam and I coded this without any help, and it works!
From now on, I will let Sam work the necessary programming out to improve the project. His next task is to add a second set of LEDs, following the reverse sequence - essentially a set of roadworks traffic lights! Oh, and to get a flashing amber!
Tuesday, 1 September 2015
More playing with PICs
In my effort to convince Sam that the future is Smart Machine to Machine embedded processing, and turn his interest towards learning to code for such, ive first introduced him to the Raspberry Pi model B+, which he is using with Scratch to design simple games, and also to the Arizona Microchip Peripheral Interface Controllers (PICs)
Now, im no programmer, I gave up when computers went to 16 bit address lines! So mostly I find code on the 'net for the PIC applications I require. I will freely admit here that much of this comes from Andy Talbot G4JNT who I wish to formally thank within the pages of this blog! It is his AD9850 controller code that im currently building into a working VFO unit.
Ive also bought one of the little GPS modules above. Ive already powered it and tested the 1PPS output, which works just fine. Next, I will again delve into Andy's webpage and use his NMEA display code to read the position information from it.
I was planning today on purchasing a Clansman PRC-320, advertised as a full CES kit for the amazingly low price of £145. It seems that the seller of these, despite claiming to have many, didnt know what the going rate for them was, and on the apparent 'advice' of 'a military surplus dealer' pulled the sale when I was no more than 15miles from him! A complete waste of my time. I am rather annoyed at this, I dont for a moment believe that the seller didnt know what they sell for!
The unit I have sadly has to go back to its owner shortly, I just need to arrange that. I'll be sad to see it go, ive sort of grown attached to it!
Now, im no programmer, I gave up when computers went to 16 bit address lines! So mostly I find code on the 'net for the PIC applications I require. I will freely admit here that much of this comes from Andy Talbot G4JNT who I wish to formally thank within the pages of this blog! It is his AD9850 controller code that im currently building into a working VFO unit.
Ive also bought one of the little GPS modules above. Ive already powered it and tested the 1PPS output, which works just fine. Next, I will again delve into Andy's webpage and use his NMEA display code to read the position information from it.
I was planning today on purchasing a Clansman PRC-320, advertised as a full CES kit for the amazingly low price of £145. It seems that the seller of these, despite claiming to have many, didnt know what the going rate for them was, and on the apparent 'advice' of 'a military surplus dealer' pulled the sale when I was no more than 15miles from him! A complete waste of my time. I am rather annoyed at this, I dont for a moment believe that the seller didnt know what they sell for!
The unit I have sadly has to go back to its owner shortly, I just need to arrange that. I'll be sad to see it go, ive sort of grown attached to it!
Sunday, 30 August 2015
AD9850 DDS module and controller working
After successfully getting the DDS controller PIC and its 2 line LCD up and running yesterday, today I rejigged the breadboard to fit the AD9850 DDS module on. The PIC talks to this via an SPI serial bus, and the module gives two square wave and two sine wave outputs at the programmed frequency.
At first, it seemed that it would only give the right frequency above 14MHz! Anything below becoming progressively more inaccurate, until around 5MHz where it was all over the place!
After a nice hot bath, and a bit of a think, I went back and gave the frequency counter a bit of a kick! I realised it was the counter that was playing up, not the DDS module! A bit of fiddling with the input ports, the range switch and the trigger level and I proved the output of the DDS on all the controllers 'standard' frequencies, which are all within the amateur bands, this including 500kHz and 137kHz!
I just need to add the encoder now and some real buttons!
At first, it seemed that it would only give the right frequency above 14MHz! Anything below becoming progressively more inaccurate, until around 5MHz where it was all over the place!
After a nice hot bath, and a bit of a think, I went back and gave the frequency counter a bit of a kick! I realised it was the counter that was playing up, not the DDS module! A bit of fiddling with the input ports, the range switch and the trigger level and I proved the output of the DDS on all the controllers 'standard' frequencies, which are all within the amateur bands, this including 500kHz and 137kHz!
I just need to add the encoder now and some real buttons!
Saturday, 29 August 2015
DDS controller LCD working
After a bit of faffing about, I managed to find a datasheet for the 16x2 LCD I currently have. From this ive been able to completely rewire the ribbon cable connecting to it. But the trouble didnt end there!
At first, thinking I had it properly wired to the PIC, my PSU went into short circuit protection! Oops, clearly something isnt right. It turns out that every connection number has the same function on this LCD as on a standard module - except pins 1 and 2, GND and Vss on a standard, are reversed on this one!
That sorted out, it still wouldnt work, and the PIC began to get hot! Oh dear. So, I pulled the whole lot of connections off, and refitted them again one by one, to ensure whichever incorrect pin I had didnt happen again. My reward for doing so was a working LCD! Next step then is to find an encoder (or wait for the one coming from the Far East) and get the control inputs working. Once happy with the inputs and the display, i'll add the expensive part - the DDS module itself!
Ive also today ordered some 16LF84A's for some older PIC projects, and some 12F683's to experiment with. The 12F683 is an 8-pin 8-bit MCU, but is non the less a remarkably versatile and powerful little device! With on board A/D, some amazing low power options, a huge array of timing and clock options, and PWM capabilities.
At first, thinking I had it properly wired to the PIC, my PSU went into short circuit protection! Oops, clearly something isnt right. It turns out that every connection number has the same function on this LCD as on a standard module - except pins 1 and 2, GND and Vss on a standard, are reversed on this one!
That sorted out, it still wouldnt work, and the PIC began to get hot! Oh dear. So, I pulled the whole lot of connections off, and refitted them again one by one, to ensure whichever incorrect pin I had didnt happen again. My reward for doing so was a working LCD! Next step then is to find an encoder (or wait for the one coming from the Far East) and get the control inputs working. Once happy with the inputs and the display, i'll add the expensive part - the DDS module itself!
Ive also today ordered some 16LF84A's for some older PIC projects, and some 12F683's to experiment with. The 12F683 is an 8-pin 8-bit MCU, but is non the less a remarkably versatile and powerful little device! With on board A/D, some amazing low power options, a huge array of timing and clock options, and PWM capabilities.
Friday, 28 August 2015
Clocking on
A few spare moments today allowed me to breadboard the PIC LCD clock. Although I didnt include the setting buttons, instead using a flying ground lead to pull down the appropriate pins. The first PIC programmed on my PICkit2 worked just fine.
Even this circuit is overkill on a PIC! Theres a 4MHz crystal there, plus 2x 22pF caps - the PIC 16F628A can do all that internally!
So now I have a known working programmer, I can check out the rest of my LCD modules, and ive moved onto breadboarding the AD9850 DDS module controller. I'll test the LCD drive and memory store/recall routines first, then add the encoder, and finally the DDS module itself.
Im looking into maybe buying a Clansman PRC-320 HF manpack of my own, and one of the things I would be doing to it is adding an external VFO and frequency display system!
A big problem I have though is that out of my selection of LCD modules, I have only one 16 x 2, and no 4 line modules. The controller project specifies a 4 line module, but will work with a 2 line unit. The trouble is, my 2 line x 16 character module has a non-standard pin-out, and I cant get it to work with the DDS controller code. Ive tried the DDS code against one of my 16x1 single line displays, and it does display the frequency (or rather, what the chip thinks the frequency might be, with neither DDS module nor encoder attached!). So, ive ordered a few various LCDs and an encoder from China.
Even this circuit is overkill on a PIC! Theres a 4MHz crystal there, plus 2x 22pF caps - the PIC 16F628A can do all that internally!
So now I have a known working programmer, I can check out the rest of my LCD modules, and ive moved onto breadboarding the AD9850 DDS module controller. I'll test the LCD drive and memory store/recall routines first, then add the encoder, and finally the DDS module itself.
Im looking into maybe buying a Clansman PRC-320 HF manpack of my own, and one of the things I would be doing to it is adding an external VFO and frequency display system!
A big problem I have though is that out of my selection of LCD modules, I have only one 16 x 2, and no 4 line modules. The controller project specifies a 4 line module, but will work with a 2 line unit. The trouble is, my 2 line x 16 character module has a non-standard pin-out, and I cant get it to work with the DDS controller code. Ive tried the DDS code against one of my 16x1 single line displays, and it does display the frequency (or rather, what the chip thinks the frequency might be, with neither DDS module nor encoder attached!). So, ive ordered a few various LCDs and an encoder from China.
PICkilled?
Oh dear! After successfully reading the data fill of a previously used PIC 16F628 last night, the programmer then refused to see the chip! Nothing I did could get the PICkit2 to detect the IC again.
This morning, I found out another device, this time a 16F628A, and successfully wrote and verified a fill to it. The original chip still refuses to be detected. Possibly I killed it faffing about last night trying to find the correct location for it on the ZIF socket, and exposing various pins to the programming HV. I cant rule out an iffy programmer at this stage though.
Next step then is to test the newly programmed chip. The code ive used is for an LCD clock. I'll be using one of the LCD modules I got from Finningley rally, to which ive just added a row of SIL pins. No easy feat, as the damn holes wouldnt clear of old solder. Hopefully, this will prove both the programmer and the LCD!
This morning, I found out another device, this time a 16F628A, and successfully wrote and verified a fill to it. The original chip still refuses to be detected. Possibly I killed it faffing about last night trying to find the correct location for it on the ZIF socket, and exposing various pins to the programming HV. I cant rule out an iffy programmer at this stage though.
Next step then is to test the newly programmed chip. The code ive used is for an LCD clock. I'll be using one of the LCD modules I got from Finningley rally, to which ive just added a row of SIL pins. No easy feat, as the damn holes wouldnt clear of old solder. Hopefully, this will prove both the programmer and the LCD!
Thursday, 27 August 2015
Can you PIC it? Yes you can!
After the disaster that was my previous K150 PIC programmer, I opted to order a clone of the Microchip PICkit 2 ICP device, and a ZIF adapter for it.To test this out now its arrived, I found out a previously programmed PIC chip, which I know contains code for a CTCSS generator.
A few little teething troubles to start with. First, the actual style of USB connector on the PICkit2 fooled me, and I tried them all before finding the right one! But I was rewarded by the PC finding the driver, and by the devices power light coming on. So far, so froody. Next, I had to find software that would interface with it. None of the programming packages I had installed would see it, which was worrying. A perusal of the unmarked CD that came with it led me, via a swim through a sea of Mandarin, to a copy of the PICkit2 software. With this installed, it sees the device! Yay! It tests the device ok - another Yay! So I attached the ZIF adapter and installed the chip - another yay? nay!
It took me quite a while, and a lot of head scratching, to fathom out exactly where in the ZIF socket the chip was supposed to sit. In the end, it turns out its one place left from the far right hand side! And theres three jumpers to set correctly as well. With this worked out, I told the programming software that it was a 16F628A chip and hit read... the programmer tells me "No 16F628A detected - Found a 16F628 Instead", but it still makes me go and change the selection myself!
But, that done, and it read the chip, and verified it. So im pleased that its working at this stage. Next step is to find a simple bit of code, say an LCD message display, blow the chip with it, and test it on the breadboard. Once im happy its all working, I can start doing some of those PIC related jobs ive had hanging about.
Another correction to a previous disaster, the demolition of my antenna coil, has had me order a nice shiny new coil all the way from Canada. Im hoping that this 21uH coil will let me build a 20m Bugcatcher mobile antenna, and then allow me to find tapping points to match 17m, 15m, 12m and 10m, oh and perhaps 6m too. It has two sides with alternate indented turns, which will make tapping easier, so long as the ideal tap points are on those sides!
But this might have to wait a bit. Ive yet to test the satellite beam on air, and this is the priority as far as antennas goes.
A few little teething troubles to start with. First, the actual style of USB connector on the PICkit2 fooled me, and I tried them all before finding the right one! But I was rewarded by the PC finding the driver, and by the devices power light coming on. So far, so froody. Next, I had to find software that would interface with it. None of the programming packages I had installed would see it, which was worrying. A perusal of the unmarked CD that came with it led me, via a swim through a sea of Mandarin, to a copy of the PICkit2 software. With this installed, it sees the device! Yay! It tests the device ok - another Yay! So I attached the ZIF adapter and installed the chip - another yay? nay!
It took me quite a while, and a lot of head scratching, to fathom out exactly where in the ZIF socket the chip was supposed to sit. In the end, it turns out its one place left from the far right hand side! And theres three jumpers to set correctly as well. With this worked out, I told the programming software that it was a 16F628A chip and hit read... the programmer tells me "No 16F628A detected - Found a 16F628 Instead", but it still makes me go and change the selection myself!
But, that done, and it read the chip, and verified it. So im pleased that its working at this stage. Next step is to find a simple bit of code, say an LCD message display, blow the chip with it, and test it on the breadboard. Once im happy its all working, I can start doing some of those PIC related jobs ive had hanging about.
Another correction to a previous disaster, the demolition of my antenna coil, has had me order a nice shiny new coil all the way from Canada. Im hoping that this 21uH coil will let me build a 20m Bugcatcher mobile antenna, and then allow me to find tapping points to match 17m, 15m, 12m and 10m, oh and perhaps 6m too. It has two sides with alternate indented turns, which will make tapping easier, so long as the ideal tap points are on those sides!
But this might have to wait a bit. Ive yet to test the satellite beam on air, and this is the priority as far as antennas goes.
Monday, 17 August 2015
High Pass Filter Blues
Ive just found a moment to throw the newly built diplexer onto the spectrum analyser to see how it actually performs. Heres where the advantages of having the matching tracking generator show themselves!
The 2m Low Pass section performs just as would be expected, cutting off at about 230MHz.
Sadly, the 70cm High Pass Filter section cuts off at 138MHz! Hmmm, I think that might be a tad too low! I'll have to have a play with it tomorrow and see what needs to be adjusted to get the cut-off to match that of the Low Pass section. Having only three components - two ceramic 4p7 caps and a air core coil, it cant be that hard to adjust!
The 2m Low Pass section performs just as would be expected, cutting off at about 230MHz.
Sadly, the 70cm High Pass Filter section cuts off at 138MHz! Hmmm, I think that might be a tad too low! I'll have to have a play with it tomorrow and see what needs to be adjusted to get the cut-off to match that of the Low Pass section. Having only three components - two ceramic 4p7 caps and a air core coil, it cant be that hard to adjust!
Sunday, 16 August 2015
Antenna Gains and Losses, And Finningley ARS Rally
Today, at 06:00, I loaded my car with a fine selection of vintage and surplus components and modules (or junk, as Julie describes it) and headed off to Sandtoft for the FARS Rally. Turnout today was good, a few more traders than last year it seems, and more visitors. And, unlike last year, the sun shone all day!
Sadly, neither of my two assistants could make it. This meant that apart from before the door was open to the punters at 10:00, and after everyone had gone and most of us were packed up (around 14:00), I couldnt leave my pitch, and therefore had very limited spending opportunity! In the end, not counting the cost of a cheeseburger (no hot drinks as i'd taken a flask of coffee!) I only spent a fiver! That got me a vintage roll of solder (but nice and hefty, for a quid!), three antenna whips, two 16x2 LCD modules (the 'valuable' parts, according to the organizing genius Kev) and a small plastic box with three BNC connectors - more of that later!
I wont talk profit on here, but suffice to say I made enough to cover costs, and to consider purchasing now a dew heater for my camera lens!
But the rally hasn't been the only thing going on. Bob M1BBV asked me if I would make him an antenna for 6m FM for SOTA use, in exchange for some camping equipment. A bit of a think and I settled on an end fed half wave design. Using one of my 5m telescopic fishing pole blanks, and some RG-58, I knocked this up in a couple of hours. A piece of PVC pipe with 13t of coax on forms the balun, which is slipped over the pole, and the end of the antenna has a string which is tied to the poles end piece eyelet. This means it stays vertical when extended
A bit of steady trimming and the match was brought to close to 1:1 at the FM calling channel.
and thats the end of that coil! On a plus note, i've got the balun for my Cobweb housed into a nice IP rated box. Some silicone is still needed, but theres no rush
So, what about that box from the rally? Well, when opened up, I found this
So out that bit of coax came! In its place, went a VHF Low Pass Filter, and a UHF High Pass Filter, collectively, known as a Diplexor. Although not intended to handle more than a few watts, this means that I could use my tape measure satellite antenna with a dual band radio
With the glues now set, it was today time to work out how to attach the two parts of the tape measure antenna. Really, this is three antennas in one - a VHF/UHF satellite dual band antenna, a 2m SOTA beam, and a 2m ARDF antenna. This means that the UHF section should be a snug fit, but easily removable when just the 2m antenna is needed. The solution to the problem of mounting the UHF antenna onto the VHF boom was solved with another bit of the smaller tube, some more glue, and two holes
Each boom end has a hole drilled of 12mm diameter. An inch length of the thin tube inserted into the UHF boom hole, and secured with glue. The hole in the VHF boom carefully sized to be a snug but not tight fit for this, turning it into a locating lug. A reusable cable tie attached to the UHF boom at the point between the two coax baluns allows the two booms to be secured together.
And the final photo shows my assistant Sam holding the completed antenna
Next step then is to test it in combination, and then have a go at working through SO-50!
Sadly, neither of my two assistants could make it. This meant that apart from before the door was open to the punters at 10:00, and after everyone had gone and most of us were packed up (around 14:00), I couldnt leave my pitch, and therefore had very limited spending opportunity! In the end, not counting the cost of a cheeseburger (no hot drinks as i'd taken a flask of coffee!) I only spent a fiver! That got me a vintage roll of solder (but nice and hefty, for a quid!), three antenna whips, two 16x2 LCD modules (the 'valuable' parts, according to the organizing genius Kev) and a small plastic box with three BNC connectors - more of that later!
I wont talk profit on here, but suffice to say I made enough to cover costs, and to consider purchasing now a dew heater for my camera lens!
But the rally hasn't been the only thing going on. Bob M1BBV asked me if I would make him an antenna for 6m FM for SOTA use, in exchange for some camping equipment. A bit of a think and I settled on an end fed half wave design. Using one of my 5m telescopic fishing pole blanks, and some RG-58, I knocked this up in a couple of hours. A piece of PVC pipe with 13t of coax on forms the balun, which is slipped over the pole, and the end of the antenna has a string which is tied to the poles end piece eyelet. This means it stays vertical when extended
A bit of steady trimming and the match was brought to close to 1:1 at the FM calling channel.
Of course, such an antenna for 6m is pretty long! It doesnt all fit in the photo above! But at least this antenna project was a success. My attempts to build a 20m and up mobile antenna of the 'Bug Catcher' design, unfortunately ran foul of my personal muppetry, when I attempted to remove excess enamel using a wire brush wheel
and thats the end of that coil! On a plus note, i've got the balun for my Cobweb housed into a nice IP rated box. Some silicone is still needed, but theres no rush
So, what about that box from the rally? Well, when opened up, I found this
So out that bit of coax came! In its place, went a VHF Low Pass Filter, and a UHF High Pass Filter, collectively, known as a Diplexor. Although not intended to handle more than a few watts, this means that I could use my tape measure satellite antenna with a dual band radio
With the glues now set, it was today time to work out how to attach the two parts of the tape measure antenna. Really, this is three antennas in one - a VHF/UHF satellite dual band antenna, a 2m SOTA beam, and a 2m ARDF antenna. This means that the UHF section should be a snug fit, but easily removable when just the 2m antenna is needed. The solution to the problem of mounting the UHF antenna onto the VHF boom was solved with another bit of the smaller tube, some more glue, and two holes
Each boom end has a hole drilled of 12mm diameter. An inch length of the thin tube inserted into the UHF boom hole, and secured with glue. The hole in the VHF boom carefully sized to be a snug but not tight fit for this, turning it into a locating lug. A reusable cable tie attached to the UHF boom at the point between the two coax baluns allows the two booms to be secured together.
Next step then is to test it in combination, and then have a go at working through SO-50!
Subscribe to:
Posts (Atom)













