Translate

Friday 12 August 2016

Arduino Fast GPS datalogger - with switchable units, configuration of U-blox GPS in runtime, and KML. The International Version !!

Well, here it is folks.

Ryan's Dad lives in Australia, and Ryan wanted to make a version of the fast GPS datalogger that his dad could use on is boat.

After sorting out the problems Ryan had with his U-blox GPS module here, we set about a few mods.

Firstly, was to be able to select the units of speed selectable when the unit first starts up. The sketch now looks for a button, connected between A3 and ground. This allows the unit to be set for KPH (Kilometres per hour), KTS (knots) and MPH (Miles per hour). This is selected by the new void configureUnits. It times out after a couple of seconds. The configureUnits void sets a flag, which selects which type of data is written to the Speed variable, and written to both the display and the card.

 Here's Ryan's version, bread-boarded and tested on the bench.










Here's the new schematic, showing the addition of the "Select units" switch, and the extra connection to the GPS module to allow us to set the Ublox receiver's configuration.



And, of course, the new code:


Thursday 4 August 2016

Automatic configuration of ublox M6 GPS receivers for Arduino during runtime.

My good friend Ryan wants to make a GPS tracker with KML, as detailed on this very website.

He wants to make a couple of revisions, which I'll publish here later...

But, he runs into a problem.

It doesn't work....

After some careful examination of the receiver, and checking the configuration with the U-blox U-center application, it becomes apparent that the receiver isn't storing the new configuration (57,600 baud serial, and 200mS update rate) after a power cycle... It defaults to 9,600 baud and a rate of 1s.

... damn it, a faulty receiver. So another is tried. Same results...

So, presumably the receivers aren't faulty....

This is one of the guilty receivers....

.... notice anything??







Here's one of mine....

... and there's the difference. See where the "faulty" receiver has a white circle marked with a 2??  Mine has a battery fitted. After a quick look at the datasheet for the U-blox chip, this is a RAM back-up battery. The configuration settings are stored in RAM. On Ryan's receiver these are lost as soon as the supply is removed.




Ryan looked into getting the correct battery and fitting it, but it's got one helluva specification, and was about £7... which is a touch expensive considering the GPS module was £9!

How about sending the configuration data from the sketch every time it starts up?

Why not....

I did a few experiments with two FTDI boards connected to a receiver...

In this picture you can see I've connected the lower FTDI to the receiver, RX to TX, TX to RX. This FTDI is used to communicate to the U-Center application. The top FTDI is used to "sniff" the serial data on the TX line on the first FTDI. Only it's ground and the RX pin are connected. This is so I can run a terminal program and grab the configuration data when I click "send" on the u-center application.

After a bit of buggering around with Real term (download from here.) I grabbed the data, in hex, being sent to the receiver from u-center.

This is what it looks like:

Set to 200mS rate

B5 62 06 08 06 00 C8 00 01 00 01 00 DE 6A B5 62 06 08 00 00 0E 30
 
set 57,600 baudrate

B5 62 06 00 14 00 01 00 00 00 D0 08 00 00 00 E1 00 00 07 00 02 00 00 00
00 00 DD C3 B5 62 06 00 01 00 01 08 22

So, now we just need to send that each time we power up...

You'll need to add a wire from the Arduino's TX pin to the receiver's RX pin, so the receiver can receive the configuration commands.

Here's the code snippet, you'll just need to add it in the void setup ()




.... and so on. I'll post up the whole thing , and the modifications we made to Ryan's tracker soon!

Saturday 30 July 2016

The Mirfield Electronics ME-64270 Quad-band 6m, 4m, 2m and 70cm antenna review.

Now I'm not usually one to review things, but this is a bit unusual...

It's a 4 band ham radio antenna. It covers 6m (50 MHz), 4m (70MHz), 2m (145 MHz) and 70cm (430 MHz)

The reason I want to give it some publicity, is the fact that it's small, at only 1.2m in length, covers 4m, and I had some good service from the supplier....

I'd been contemplating sticking something on the roof for a while, to get better access into the local repeaters for a natter on 2m and 70cm every so often. It's got to be fairly small so as not to aggravate the neighbours or the wife....

Then I spotted a small ad in the back of RadCom magazine for a quad-band co-linear antenna. It wasn't too pricey either, having 4m is really good too. Most quad-bands are 10m, 6m,2m and 70cm. I have a magnetic loop that works well on 10m, so that doesn't really interest me.

I placed an order on the website at www.mirfield-electronics.co.uk, and very soon a cardboard tube arrived.

So, it's Sunday. The weather was looking promising, I had half a reel of RG-8 co-ax cable that would do the job, only to be thwarted. One of the radial elements didn't have a thread, and the mounting brackets seemed to be missing... :(

I telephoned the number on Mirfield's website and left a message...

... and a super chap called Martin rang me back about half an hour later (on a Sunday too!). I explained the situation.










He was great, "What WAS I thinking, must have had a bad day!" He promised to post next day, and good to his word, a nice new radial, and the missing mounting brackets turned up on Tuesday.

So, It's Saturday, and once again the weather looks favourable.

I gather the parts and assemble the antenna....













The antenna is fitted with a SO259 "UHF" connector at it's base. Quite why anyone would call it UHF is beyond me. It's a pretty poor connector at VHF, let alone UHF.... anyway, it seemed good enough for Icom to put on the back of their UHF radios, so maybe it's just me... an N-type connector would have been preferable, but at this price point, I'm more than happy.





Having soldered a PL259 on to the RG-8 co-ax, slide the coax and connector through the support tube, making sure the screw hole is pointing towards the antenna. I also slid a piece of heat-shrink tubing on too... Don't do what I did, and forget to slide the mounting clamps onto the mounting tube first!







A couple of laps of self-amalgamating tape are used to give the connector some protection against the elements, and the heat-shrink makes a tidy job ....









... slide the mounting tube onto the bottom of the antenna, and do up the screw. The mounting tube is steel, and I wonder if it could have been made a little thicker for strength. Seems to work OK though...

When doing up the mounting clamps, I found it helpful to keep them flat against the floor, as when you do up the screws, they tend to move about a bit....

I've left the radials off until I get the thing up on the roof...












So, a couple of hours later, and it's up....

(Glad I did it too, the TV co-ax was in an awful state!)








So how's it perform?

Gain figures are quoted as 2.5dBi on 6m, 2.5dBi on 4m, 3.5dBi on 2m, and 5.5dBi on 70cm. I've got no way of checking those, but the antenna opens up repeaters on 2m I haven't heard for years, and fully quietening on local repeaters at just 5 watts. The antenna is rated to 60 watts.

VSWR is better than 1.5:1 on all the frequencies I'm interested in.

Good points...

The service from Mirfield was superb.
It's short.
It's cheap.
It's largely well made, and looks like it will stand the test of time.
70 MHz!

Minor grumbles...

SO259 "good buddy" connector.
Mounting tube could be more robust.

Friday 29 July 2016

CCT811 Video modulator massive failure.

Remember my warnings and concern about the CCT811 video modulator?

This is the offending model in question. Apparently it's also being sold under various guises, one model quoted to me is the RF9000. If it looks like this, I'd be seriously concerned....




I wrote about it here. Please take a moment to read this, if you haven't seen it before.

Well, settling down for an afternoon of vintage TV fun, I switched the video rack on....

Crack, crack, crack, bang! Uh-oh...

"It's bound to be the modulator" I thought.


I was right. It had opened the fuse I'd retro-fitted. (If you have one of these awful modulators, time to stop using it!) Damned glad I fitted one... lord knows what would have happened if it had tried to short out the mains without the protection of a fuse... Fire would have been a REAL possibility.

I opened it up and expected to find a mass of blackened bits, but no.  Now I've giving up on this I thought... but it's so useful!

It looks as though the insulation had failed on the transformer, and destroyed the semi-conductors in the drive-side of the supply.

I thought I'd remove the ghastly existing "switched-mode" blocking oscillator, and replace it with something ...

1) Electrically safe.
2) Reliable.

OK. First things first. To find out if it still functions.

I removed the transformer, and connected the workshop power supply between the end of the rectifier diode, and ground....






It seems to want about 6.5 VDC to operate, and has even remembered the settings it had before the power supply failed... good.

It's drawing about 165mA at that voltage, so a supply is not too challenging!






I decided to have a look in the drawer of redundant wall-warts to see if I could find anything suitable, and I spy one of my favourites, an old Nokia phone charger!

Now I always pick these up from boot-sales for a few pence, and are very useful. This one is rated at 3.7 Volts, at 350mA...

"But Andy, you said the modulator needs 6.5 volts to work" ... and so it does, but this particular Nokia charger is unregulated. Off-load it makes about 10 Volts.... Will it make our 6.5 volts at 165mA?

I solder the white +VE lead to the anode of D107, and the black lead to the far right hole (viewed from the rear of the modulator) left behind when I removed the transformer...










... and switch on....

Eureka! It works.










So it's now electrically safe, and I can sit back, and watch some "proper" TV....








Friday 22 July 2016

Arduino GPS master clock with 433/315 MHz transmitter

I've got a few clock projects in the back of my mind, and this is a bit of an aside to them all. I also wish to upgrade the Astronomical clock project, as the DS1307 often drifts about, losing and gaining seconds as it feel like it...

The idea is to have a master clock, GPS locked with built in 433 MHz transmitter, which will send an accurate time signal to the other clocks to bring them into sync. The transmitter will be triggered randomly, at least once every 24 hours, or by a push button connected to pin 12.

I'll be re-using the code from the quick and dirty 7-segment GPS clock here, and some of the code for the transmit function from the dehumidifier project.

I've added a 4x20 LCD display, with I2C piggyback interface board, and the u-blox GPS module we've used in the GPS logger.

The GPS module will be configured by the sketch itself, to 200mS refresh rate.

There's two sketches, the GPS clock itself, and a simple test receiver sketch to check everything's working as it should.

The I2C display is a generic display, purchased from eBay, and uses the PCF8574 I2C receiver IC. I tried a couple of different libraries, but eventually settled with the library from https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads which works well with my display.
Well also use the virtual wire library to handle our comms, https://www.pjrc.com/teensy/td_libs_VirtualWire.html and the most excellent TinyGPS++ http://arduiniana.org/libraries/tinygpsplus/

There's an LED connected to pin 9, which blinks on and off every time the seconds are updated.

Here's the schematic...




... and the hardware lashed up for testing.

The second arduino is acting as our test receiver. There's no RF module in there as yet.. It's coupled to the clock arduino, GND is coupled, and pin 10 on the clock is connected to pin 9 on the receiver board. It's also supplying 5V to the other board.







Here's the data being displayed. Date (in UK format DD/MM/YYYY) , UTC time, latitude, longitude, no of satellites in use, horizontal dilution of precision and the number of seconds until the next transmission.







Here's the output from our terminal window, connected to the receiver board, showing the time and date are being correctly received when A3 is pulled to ground.




So, the final build looks like this...

You can see the antenna is simply a straight piece of wire, 173mm long (for 433 MHz modules, other frequencies will need a different length)


And assembled. Managed to cut the right sized hole for the display for once!











Here's the GPS receiver, which I'm going to mount remotely on the roof, so it get's good reception. I've stuck it into of a water-proof IP rated box, and fitted a Buccaneer connector.









OK, so to the code....

This is the transmitter code:



and the test receiver code...



Now all that remains is to box it up, and create some clocks!

Wednesday 13 July 2016

Arduino Fast GPS datalogger updated. Now with KML!

Now Updated (again) with selectable speed units, and configuration of U-blox GPS in runtime, avoiding the need to use U-Center to configure the receiver.  Click Here!

The fast GPS datalogger project is the most popular project on here. Link.


It's been working well on the race car since it's inception, and has provided some really useful data to improve the performance of the driver!

What isn't so great is how the data is stored. It stores everything, regardless of fix, number of races etc, so it's a headache to filter out each race, and remove useless invalid data, either without a time stamp or valid position or speed, and then turn it into something that could be used. I have been painstakingly converting the data into KML, which we can directly read with mapping software, such as Google Earth.

I've made some modifications to the software to sort out some of these issues... here's the new features:

Each time the record switch is pressed, valid GPS data is required, and once obtained, a new file name is created from the current time, HHMMSSCC.kml  (in UTC, CC representing centiseconds here), and the KML header file is written.

Now the file is built as in the previous version, except this time in KML format.

Speeds below 5 MPH are not recorded.

When record is switched off, the KML file is completed and closed.

So once the card is removed from the unit, simply read the kml file from the card, and open in google earth.

So I went out for a quick jaunt in England's green and pleasant....










... and loaded the KML file straight into google earth.

No more tedious editing required!

No changes to the hardware are required. Just remember to disconnect the RX line from the GPS module when attempting to load the new sketch.


Here's the code:


Sunday 10 July 2016

Grundig TK120 repair

Gareth (a fine chap from the motherland) walks into the workshop with a bin bag under his arm....

"My Father-in-law's dug this tape recorder out of the attic. It's got a recording of him on it, but he says there's no sound. Can you have a look?"

Yeah ... why not?

It's a Grundig TK120, in distressed condition. It looks like it's been left rather too close to the fire!















... and after removing the tape and the top cover, the immediate issue is all the rubber parts have disintegrated....










Now the belts are no real problem... but the drive idler tyre is going to be...

After some head scratching, and some looking about for suitable parts, an O-ring is super-glued to the remaining idler wheel....







Now to replace the belts. So I unscrewed the four screws with blobs of paint on, to remove the top plate. DO NOT DO THIS!

FATANG! All the spring loaded control levers fired out of their mounts.... Thankfully their positions are quite simple to work out, but very fiddly.... several hours later and the thing is back together....

Here's how it should have been done!..


Underneath the deck is a small plate, with two screws... undo those to gain access to the bottom of the capstan flywheel....


... and work the belts about the bottom of the flywheel, through the small hole. It's still fiddly, but much less agro than re-aligning the top mechanism!



















You'll need to remove the take-up reel and clutch to replace the take-up drive belt. The belt itself is straight forward. The clutch reassembly is a bit tricky...

This is the bottom of the deck, showing the new tape counter belt... Remove the little pulley and it's clip from the take up reel shaft. There's another clip underneath and an antifriction washer. Remove those.




Turn the machine up the right way, and remove the take up spool...











This will reveal the take up clutch, and it's little three pads... if they've fallen out, don't panic... they'll be there somewhere!










Fit the belt and reassemble the clutch. Some adjustment of the clip above the small pulley we removed earlier may be required to get the right amount of friction on those pads, but it's not difficult.

The motor was a little sticky on this machine. I stripped the lower bearing off and re-lubricated it. It now spins like a top....

... there's still no sound.


This is rapidly traced back to an open-circuit HT fuse, it's replaced and there's some audio briefly. The HT (and heaters) is provided from two extra windings on the motor. There's no transformer. Clever stuff. Garrard and BSR used a similar trick on their record changers in the 60's. The electronics are a simple design with just two valves, an ECC83 and an ECL86.

The main smoothing capacitor is getting warm. A sure sign that it's had it day. It's a two section 50uF+50uF 350V part. I replace it with two suitable caps.









Switching back on and there's audio again... but it rapidly fades.... A check round the other caps proves their innocence... I'm not liking the look of the getter flash on the top of the ECL86 triode-pentode valve though, it looks like it's had a hard life.... The getter flash should be sliver or black looking, and should have nice sharp edges...





This is sort of brown looking....













... and checks on the avo valve tester show the triode is very low at 0.6 mA/V (It should be 1.5 when new) and the pentode section won't read at all! When testing the pentode section, there's a blue glow inside the anode structure, a sure sign there's some gas in there. A replacement restores operation, and the dulcet tones of a young man playing the guitar once again issue forth from the speaker... recorded some 50 years ago!


Audio quality isn't fantastic. These machines were a bit of a domestic novelty really. After transcribing the contents of the tape, Gareth described the quality as "Like a walkman with flat batteries", which isn't a bad description at all...

Friday 24 June 2016

Mitsubish MC8000 audio system repairs.

Sadly, my friend Richard's dad passed away a while ago...

"There's some stuff here Andy, would you like it? I'd rather it went to a good home."

So it's now my duty to the man, to get it all going.....

This interesting audio unit was amongst the gear. It's a Mitsubishi MC-8000, originally sold by my old employer, B.V.Harrod (sadly long gone), and has it's original speakers and cabinet.

 ... and yes, that's the right way up, it has a vertical linear tracking turntable.


After some cursory checks, I give it some mains. There's a motor running somewhere, the turntable doesn't work, neither does the cassette, but the radio works fine!













Off with the back, and it's immediately obvious why the turntable doesn't work .... the belt's missing!

Actually it's not... Some of it is in the bottom of the cabinet, and some has stuck to the turntable flywheel. I quickly clean it up, with some wipes and a bit of IPA. Sizing of these things can be a pain, but it's easy really. Get a piece of string, and wrap it round the motor shaft and flywheel, where the belt would run, and cut the string. This will be the approximate circumference of the belt. Now belts are sold in dimensions of diameter, width and thickness, so divide the length of your string by Pi... in this case it's 200mm, and about 5mm wide.

The arm is driven by two other motors too. One raises and lowers the arm, and the other is used to track the arm across the record.

The belts that drive these functions are also in a bad way... just touching them leaves a nasty sticky black mess. A bit of IPA to clean up, and some replacement belts see the turntable working....













... now the motor continuously running is the motor in the cassette deck.... probably another belt!  It's buried right in the bottom of the cabinet. See that brown, spotted thing lying across the circuit board? That's a bit of turntable belt!







... the motor nicely dates the unit from 1980...












Getting the transport out requires a lot of disassembly, and quite a considerable amount of cussing....


















... but eventually yields ... I will not be beaten by mere machinery!












... sure enough the capstan belt has gone the same way as all the others! I'll change the lot...



















The tape transport is carefully disassembled to gain access to the belts..












..which involved removal of the record switch actuator lever. Capstan flywheel is removed to clean the remains of the belt off...










... and some suitable replacements found from the belt box. The capstan belt measures in at 71mm. There's a 2.8mm wide belt which will do nicely.










The deck is repaired, and time to contemplate re-uniting it with the rest ... look at all those screws!











Finally back into the lower part of the cabinet!


























... and that reunited with the top...

Thankfully, all the plugs are nicely labelled...


















... and once the transformer is re-fitted, speakers connected, it's tested...




A new stylus is fitted, and the turntable works a treat. Sounds far better than I had expected... unfortunately there's nothing but a nasty hum from the cassette deck. It appears either the wiring to the tape head, or the head itself is open circuit.... I dread having to remove the transport again. Closer inspection reveals the wiring to the head is broken, and it's been repaired before.. there's some evidence of a poor soldering job, and the wires have been left very short. Thankfully, access, although difficult, is possible through the front, after removal of the door, and the repair is completed.








Here's a quick video of the turntable in action....

And, finally, a few photo's of the original dealership who supplied the unit. These were taken on the last day of trading, back in November 2005.. a sad day.

Shop front...














Interior... looking sadly empty :(






























and the workshop...