Translate

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...