Showing posts with label Repair. Show all posts
Showing posts with label Repair. Show all posts

Thursday, July 17, 2014

Hacking Together a Replacement Switch for an LED Lantern

My sister recently asked me to have a look at an LED lantern she uses around the house, mainly to lock up her chickens at night.  It had been dropped and the switch mechanism damaged.  She wanted to see if anything could be done without spending too much.

Lantern
Arlec CL100 Lantern
The switch is a rotary type and is on the top.  It's designed to be removed to replace the light.

Switch
Lantern Switch
Removing the switch is done by unscrewing the top.  This is where the damaged occurred.  The light was dropped on this corner, causing a large piece of the plastic thread to break off.  I considered glueing it back together, but after playing around with for a bit I got the impression that if I didn't get it exactly right it would easily break again.  So I decided to replace the top entirely.

Switch
Switch Damage
So how do I go about doing that?  Let's take a look inside.  The first thing to notice is the four terminals on the white plate.  The inner two are connected to the LEDs, while the outer two are threaded rods that are used to hold the light together and at the same time connect the LED's to the battery in the bottom of the lantern.

Contacts
Battery and LED Light Contacts
Normally the switch on top electrically connects these terminals to operate the light.  The functionality of this is what needs to replicated.

Contacts
Switch Contacts
I had an idea of how to replace the top, but I needed to remove the metal cowling on the top to make more room.  It seems to only be held on by a rubber retention ring.  I don't actually know the purpose of it.  It seems to be decorative.

Cowling and retention ring
The outer thread can be seen, and now that the cowling has been removed there is more room to work.

Outer Thread
Outer Thread
While we're at this point I'll take a minute to show the light bulb.  It's made of 4 PCBs soldered together to make a rectangular tube.  These boards hold the LEDs and current limiting resistors.  If you remove it, pay attention to polarity, like most LEDs it'll only work one way.

LEDs
LED assembly
The light is passed through a diffuser to create a more even spread of light.

Lantern Diffuser
Diffuser
Anyway, back to fixing the light.  I simply added an old switch I had in series with the battery and LED terminals.  I added as much insulation as I could in case a wire came loose, but everything seems fairly firm.

Wiring
New Wiring
That's all well and good, but you can't have the switch and wires hanging loose.  They need to be held rigidly to prevent damage.  After thinking about it for a bit I came up with the perfect replacement.  An end cap for PVC storm water pipe.  It's just the right size and is made of a relatively strong plastic.  The end cap was attached to the lantern by drilling some holes around the perimeter and threading cable ties through them.  I could have riveted it on, but it would have made it hard to fix anything if it breaks in the future, besides that, it could have cracked the plastic.  I could have also used self tapping screws, but after you insert and remove them a couple of times the thread in the plastic would be damaged.

Switch
PVC End Cap Cable Tied In Place
It's not the most elegant of repairs, but it was cheap and quick.  This is one of those occasions that having a 3D printer would have been handy, but it would have taken longer to design and print the part than my quick fix took.  All up, this cost about 3 bucks and about three hours of time while watching TV, so we'll say an hour of actual work.

Saturday, June 14, 2014

12 Volt Reversal Switch with Dynamic Braking

As you may or may not know my father has a few mobility problems, and a while back he built a winch controlled platform to help him get in and out of the bath.  Up until now there haven't been any problems with it, but recently the momentary switch has started to show intermittent problems.  It still raises and lowers the winch, but it has an extra function that isn't working well.  When the switch is released it returns to the centre position and places a short across the motor.  This is important because it adds something called "Dynamic Braking" to the winch.  When you short out a motor like this it's equivalent to putting a brake on it, if you leave it open circuit the winch won't hold loads and will slowly lower what it's holding.  In this case that is my Dad.  Getting in and out of a bath on a platform that slowly sinks is almost impossible.

We've had this problem before, but were able to clean out the switch and get things working again.  I would have liked to replace the switch but the dynamic braking feature can't be replicated with a normal DPDT switch, and I can't find a replacement anywhere.  Even though I'm holding one in my hand everyone I've spoken to says they don't exist.

Switch
Original Winch Switch
I could have bought something like the product below, but with shipping it would have cost me around $100, and if it were to brake somehow, it's not easy to get hold of another one.

Reversing Module
http://www.cncelectrical.com/servlet/the-13234/Cole-Hersee-Solenoid-Reversing/Detail
Last time this happened I came up with a contingency plan using standard off the shelf automotive relays, so I dusted that off, made some improvements and started building.

I had a few requirements when designing the system.  It had to made of easily obtainable parts, and it had to be reasonably easy to service.  In case I'm not around Dad can fix it himself.  It also had to be as waterproof as practicably possible.  This was to prevent the same problems with water ingress that caused the last one to fail.  This is what I came up with.

Electrical Enclosure
Relay Operated 12 Volt Reversal Switch with Dynamic Braking
This was a difficult project, technologically, it's far from ground breaking, the biggest problem was trying to source quality components from places like ebay and the local electronics store at a reasonable price.  Nothing was exactly what I wanted, I just had to make do with what I could get.

The first thing I had to do was determine the current draw of the motor.  Since I didn't have a meter that would measure such a high current I had to build an adapter.  It turns out that the maximum current draw is about 25 Amp.  Although I would have liked a bit of headroom, I used this as my design current.  All the components I could easily source were rated for 25 Amp or higher, and since it's not in continuous operation, I'm happy with that.  It might only operate for a maximum of 30 seconds at a time.

The operation of the circuit is pretty simple, it consists of two relays and a momentary SPDT switch with a centre off position.  The diagram below shows the operation of the circuit.  It should be familiar to anyone with an electronics background.  It's a H bridge motor controller, but with one important benefit.  By using relays instead of semiconductors, it's impossible for shoot through current to occur.

When the switch is in the centre position none of the relays are energised, connecting both of the motor terminals to the negative supply line via their normally closed contacts.  This shorts out the motor implementing the dynamic braking feature.

Circuit Diagram
Reversal Switch in the Braked Position
When relay 1 is energised, the motor moves forward.  It's negative terminal is still connected to the negative supply line via the normally closed contact of relay 2, while the positive motor terminal is connected to the positive supply line via the normally open contact of relay 1.

Circuit Diagram
Reversal Switch in the Forward Position
When relay 2 is energised, the current though the motor is reversed.  It's negative terminal is connected to the negative supply line via the normally closed contact of relay 1, while the positive motor terminal is connected to the positive supply line via the normally open contact of relay 2.


Circuit Diagram
Reversal Switch in the Reverse Position
To control all of this I used a cheap pendant switch from ebay.  It's rated to 250 Volt, 5 Amp, personally I wouldn't trust it at that voltage, but for a 12 Volt, 100 mA signal it's fine.  It claims to have a mechanical interlock that prevents both the up and down connection being simultaneously pressed, but I've been able to press them both at the same time.  In this design that doesn't matter, all it does is active both relays and connects both terminals of the motor to the positive supply effectively braking it.

Switch
Pendant Switch
The inside is straight forward.

Switch
Pendant Switch Internals
Annoyingly I couldn't get a rubber boot to fit a small cable.  Apparently they exist but I couldn't source one.  I intended to use an old extension cable I had, but it was too small.  The easiest solution was to just get a half inch 4 core cable and use only three of the cores.  A bit wasteful, but it got the job done.

Cable Seal
Pendant Switch Rubber Boot
Finding a cheap enclosure with a rubber seal was hard enough, so it was rather annoying when it came time to install the cables and the threads on the glands were too small to fit through the case.  I had to hack together a bit of a milling machine to create a recess in the case to make everything fit properly.

Electrical Enclosure
The Milled Recess to accommodate the Cable Glands
Installation of everything required a base plate and some mounting brackets.  How I went about that is described in a couple of past posts.  DIY Relay Brackets and Waterproof Enclosure Mounting Plate.  I did have to slightly change how the relays were mounted to create more room.

There isn't anything special about the relay.  It's something that can be sourced from pretty much any automotive supply store.

Relay
30 Amp Changeover or SPDT Relay
Even though this is personal project, I wanted to try to do everything as professionally as possible.  Within reason of course.  One thing that really bugs me are uninsulated crimp terminals, so all of mine are insulated.  If something works itself loose, it can't short out on other terminals.

Wiring
Insulated Terminations
Even the large terminals on the terminal block are heat shrunk.  I initially tried to make my own terminals, but came to my senses pretty quickly. DIY Eye Terminal Proof Of Concept and Bending an Eyelet Terminal Without Tearing the Metal describe how I went about doing things.

The terminal block may seem a bit redundant, and your right, it is.  In most cases the cabling could be easily connected straight to the relays, but I feel this will make it easier for my father to service it.  The main board can be easily removed and serviced on a bench.

Wiring
Terminal Block
After wiring up all the connections I realised I had made a mistake.  It wasn't bad, but when the circuit was in the braked position, both terminals were connected to the positive terminal of the battery to give dynamic braking.  There is nothing wrong with that electrically, but from a corrosion protection stand point it isn't great.  The constant 12 volts on the motor in a humid environment is likely to promote corrosion.  This was easy to solve though by swapping the normally closed contacts of the relays to the negative supply rail.  This also reversed the direction of the motor and was fixed by swapping the positive and negative motor connections on the terminal block.  The images above reflect the way the circuit was originally connected before the changes, but the circuit diagrams above are correct.

A bill of materials and a wiring schedule for this project can be found here.  Hopefully this will make future maintenance easier.  The diagrams below are used as a reference in the wiring schedule.

Wiring Diagram
Annotated Terminal Block diagram

Wiring Diagram
Annotated Pendant Controller Diagram
I'm quite happy with how this turned out.  The total cost was 140 dollars.  Although that seems high, by the time I purchased an off the shelf solution and put it in an enclosure it would have cost more and replacement parts would have been harder to get.  Most importantly Dad can get out of the bath easily again.


Sunday, April 20, 2014

Digital Calliper Teardown and Repair

I'm waiting for some parts in the mail for my next post, and as you guessed, they haven't turned up yet.  I only had a day or two to come up with an article, so I was happy when my father came to me with his digital callipers that weren't working.  He'd left a battery in them too long and it had leaked, causing so much corrosion that one of the terminals had broken off.  He wanted to know if I could repair them.  While fixing them I thought I'd take the chance to document the tear down and find out how they work.

Callipers
Digital Callipers

As usual, getting to the insides required me to remove a sticker on the back to get at the four screws holding the case together.  What I found inside had me perplexed, there was no mechanical connection between the circuitry and the slide mechanism, I had expected something like a rack and pinion gear and some sort of rotary encoder.  The PCB had a series of tracks on it that indicated some sort of capacitive sensing but I still wasn't sure.

Calliper Parts
Calliper Parts

As I mentioned before, there are a series of parallel tracks on the PCB that indicate a capacitive sensing system.  From the vias it appears that every forth one is connected,  when you see the other side of the PCB it will become clear that every eighth track is connected.  It was still unclear how everything worked though.

PCB
Calliper PCB back

After a bit of Googling I found a description of how this type of digital calliper works.  It's from the Anyi Instrument company in China and I'm going to place a screen capture of it below in case it disappears from their site in the future.

It's simple in concept but complicated in the details.  Underneath the ruler markings is another concealed circuit board.  It's comprised of a series of conductive fingers that interact with the traces on the PCB to form a variable capacitor that changes as the two surface move over each other.  How that's converted to a measurement of length is more complicated.

Calliper explanation
Explanation of capacitive sensing system

Someone has done the hard work of probing the exciters on the main PCB for me.  This site about DROs (Digital Read-Outs) by Nick Müller is an excellent resource.  Below is an image of what was captured.  For all money it looks like a 8 phase PWM signal.  From what I can tell, by measuring how well each of these signals is capacitively coupled to the grounded frame, the ic can then use signal processing to sense its position.  It is not an absolute sensor, it's relative, this means it needs to be zeroed before each use, but can detect small amounts of motion once calibrated.  For those of you more enthusiastic, I've found a patent from the late 80's that describes the system.

Waveforms
Exciter signals

 Anyway onto fixing the thing.  Removing a few more screws freed the PCB from its enclosure.

PCB
Calliper PCB front

Removing the corrosion from the battery contact was easy with small file.  The board was then cleaned with some flux and a cotton bud and the contact re-tinned.

PCB
Corroded battery terminal

The top of the board is relatively bare.  There's a chip on board, a crystal, a battery holder, the exciter traces that connect to the tracks on the other side of the board, there is also the pad where the LCD zebra connector contacts the board.

PCB
Calliper PCB top

Conveniently there's also a port on the side that allows other devices to read the measurement data.  I didn't probe it, but it's well documented and rather easy to read.  The writer of Robocombo has done a great job of documenting the protocol.  I'll paraphase their work.  There's a ground, clock, data, and a 1.5 Volt line.  8 times a second the data is transmitted.  The measurement is transmitted as an integer that is 100 times the measurement in a 24 bit block with data being read on high to low transitions of the clock signal.  The first bit is a start bit,  the 21st bit is a sign bit, and the last three bits appear to be unused.  There is also a description of the protocol on the blog yuriystoys that indicates that the 24th bit is a flag for mm/inch mode.  In the inch mode it appears to send the data as how many 2 thousandths of an inch are in the reading.

Callipers
Calliper data port

After I reassembled the callipers I found the part of the battery holder that had snapped off.  It wasn't too hard to solder it back in place.  It was higher than the original design and wasn't as springy.  This was overcome by using a slightly thinner 1.5 Volt battery of the same diameter and a bit of folded cardboard above it to keep the battery in firm contact with the terminal below.

Battery compartment
Calliper battery compartment

There you have it, a functioning set of callipers again.

Callipers
Fixed Callipers

Monday, December 9, 2013

Onga JM100 Pump Teardown

The pressure pump connected to our rainwater tank failed the other day.  It didn't stop working, it just sounded really wrong and got too hot for the short amount of time it was running.  I'd previously replaced the motor run capacitor on this particular pump and was reasonably familiar with its operation.  As a first step I checked the things I know best, the electrical components.  The 10 uF motor run capacitor was fine, it was reading a perfectly acceptable 9.8 uF.  The winding resistances were however way out of whack.  When I last repaired the pump I took note of the readings, and they had changed significantly since then.  They were now about one sixth of what they used to be.  If some of the windings are shorted it pretty much means it's beyond repair, but I decided to pull it apart for fun, and to see if there was something obvious that could be causing the problem.  So even if the pump can't be repaired there's at least a guide that others can use if they need to pull their pump apart.

Warning - This article describes equipment and circuits that operate at high voltages.  Don't attempt to repair any high voltage circuits if you're not trained to safely work with electricity.  You may be seriously injured or even killed.  For further information read the blog's Terms Of Use.

I hadn't done anything like this before so I tried to find some sort of service manual.  Although not an exact match but the parts diagram in this manual was a fairly accurate representation of how the pump was constructed.

I started by removing the pump head and taking off the fan cover.

Fan cover removed

Pump head removed
At this point I took a moment to inspect the impeller on the motor and the diffuser in the pump head for any signs of wear.  Everything looked fine.

Brown diffuser in the pump head
The next step is to remove the pump stand from the bottom and disconnect all the electrical wiring.  If your not sure how to reconnect everything take lots of photos for reference.  Removing the fan at this stage is a good idea.  It may take some doing, but it can be pried off with a flat bladed screw driver.

With the fan removed, a screwdriver can be used to lock the shaft in place while the nut holding the impeller on to the shaft is removed.

Pump stand removed
Removing the impeller seemed to disturb a colony of ants inside the motor.

Ants inside the motor
After removing the impeller you'll be faced with the layout in the image below.  To remove the black plastic plate the seal on the shaft needs to be removed.  Once again it may take a while to figure it out, but it can be pried off with a flat bladed screwdriver.

Seal on the shaft
Ignoring the ants for the moment, all that's left to do now is to remove the end plate of the motor.  There's another rubber seal on the shaft that can be removed easily.  Once this is done the bolts holding the plate on can be undone.  To remove the plate, gently tap the other end of the shaft where the fan used to be attached, this will push the plate off.

Motor end plate
You now have access to the rotor, bearings, and stator coils.  Apart from the ants, I couldn't see anything out of the ordinary here.  The bearings seemed to turn freely and there was no obvious damage to the motor windings.

Disassembled motor
I used a compressor to clear all the ants out and then reassembled the motor.  It didn't sound any worse, so I'll take that as a win.  I'm still not entirely sure what caused it to fail though.  It could have just been a random breakdown of the winding insulation, that caused part of the motor to heat up causing the insulation on other windings to break down.  Maybe the ants damaged the winding.  Who knows.  One thing is for certain, this motor has reached the end of its life.

Monday, November 5, 2012

Improvised Motor Reversal Switch With Dynamic Braking

Sometimes tracking down an unusual replacement part can be almost impossible and you just have to use what you can find.  When the main switch on a 12 volt DC winch failed recently I found myself in this situation.  The problem is that it's not a normal switch.  It's a rocker switch that short circuits the load terminals when in the centre position.  When connected to a motor this creates a dynamic braking effect which gives the winch a holding torque.  The other two positions simply apply 12 volts from a battery to the motor with different polarities to give forward and reverse motion.

At first I tried to replace the switch, which didn't go too well.  When you don't know what to Google for, and salesmen tell you that the thing in your hand doesn't exist, you kind of hit a dead end.  Luckily after cleaning the switch contacts it worked again and was put back into service, but I still wanted a solution in case it failed in the future.  I've come up with something, but haven't been able to try it, so for now it's just a theory.

All of the functionality apart from the dynamic braking can be done using a Double Pole Double Throw (DPDT) rocker switch and a little wiring.  In the centre position the switch disconnects the winch motor from the battery and leaves the motor open circuit allowing it to turn freely.

Motor Reversal Switch Dynamic Braking Wiring
Motor Unpowered - No Braking

By flicking the switch one way, voltage is applied to the motor and it turns.

Motor Reversal Switch Dynamic Braking Wiring
Motor Powered

Flicking the switch in the other direction applies the voltage again, except with the polarity reversed causing the motor to turn in the other direction.

Motor Reversal Switch Dynamic Braking Wiring
Motor Powered

To brake the motor while the switch is in the centre position a relay needs to be added.  The relay needs to be rated to operate at the same voltage as the load you are trying to control.  By connecting the motor to the common and normally closed terminals the winch motor will be short circuited when the relay isn't energised.

Motor Reversal Switch Dynamic Braking Wiring
Motor Unpowered - With Braking

When the switch is in the up or down position, the relay is energised and the motor's second terminal is connected to the DPDT switch via the common and normally open terminals of the relay.  As before, the position of the switch determines the polarity of the voltage applied to the motor, which controls the motors direction.

Motor Reversal Switch Dynamic Braking Wiring
Motor Powered - Braking Disengaged

Motor Reversal Switch Dynamic Braking Wiring
Motor Powered - Braking Disengaged

The dynamic braking that the motor experiences when its terminals are short circuited can be thought of in a couple of ways.  I tend to think of the motor acting as a generator, which drives a current through the motor, this current tries to drive the motor in the opposite direction.  These opposing motions lock up the motor and create a braking effect.  You can also think of things in terms of Lenz's law.  When moving a magnet though a coil, the current induced will generate a magnetic field that opposes the motion of the magnet.

There is one really important thing to make sure of before trying this.  The terminals on the relay coil need to be able to handle a positive or negative voltage.  If the relay is controlled by a single coil you should be fine, if however it's a solid state relay you may need to look into things a bit more.  Even if your relay is controlled by a coil you need to be make sure it doesn't have a diode across the terminals to protect the rest of the circuit from back EMF.  If you skip this step there'll be a race between the diode and the fuse for the first to fail.  In my situation protecting the rest of the circuit isn't necessary.  If however protecting the circuit from the back EMF created when voltage is removed from the relay coil is important, you could place an ordinary diode before the DPDT switch, between the battery and the switch.  You could also put a bidirectional TVS diode with a working voltage of at least 12 volts directly on the relay coil.

In theory this should all work, I can't see any problem with it.  So when the time comes I'll be prepared and have a solution ready to go.