Random stuff on informatics, computer science, physics, etc.

Month: March, 2014

Bulding a DC power supply and a current amplifier

And here goes something in electronics. This was something very simple, but one of my professors in the university needed a 15/30V DC power supply AND a current amplifier in order to feed a system with very small impedance. Since he required both things simultaneously, I decided to put everything into the same case.

This is partly a guide on how to build these things and partly a brief description of how I did it. I could try to make this more general, but I guess that would only complicate things. Suffices to say, a lot of these things can be done in a different way, different components can be used and the end result will still be the same. The input and output voltages can, obviously, be different with a small change of components.

I will split it into two parts: part I is concerned with the power supply itself and part II with the current amplification and buffer in order to feed this low impedance circuit.

Part I: 15V/30V Power supply

For this part you will be needing the following components (you will also need some tools, which depend on how you plan to assemble things):

• 15V*2 transformer
• 1x diode bridge
• 2x 1000 uF electrolytic capacitors
• 1x LM7815 positive voltage regulator
• 1x LM7915 negative voltage regulator
• 2x 220 uF ceramic capacitors

Optionally you will also need an adequate fuse, switch, LED and appropriate resistance for the LED.

First transform the mains AC current (220V @ 50 Hz in my case) to 15V (@ 50 Hz in my case) by using a transformer with two secondaries (careful when handling transformers if they are connected to the main socket!). Transformers are very simple devices which consist of two coils and a metallic core (usually iron) and functions via magnetic induction.
For security reasons you should connect a power switch and an adequate fuse between the transformer and the main power. In the output of the transformer you can connect an LED (using an appropriate resistance in series with it, to avoid burning it) to indicate whether the device is on or off (true, the LED will blink, but at 50 or 60 Hz you will not see it!).

Power supply schematic

Next we need to rectify the signal. What happens is that the signal from the mains is a sinusoidal signal which, with respect to the ground, varies between 230V and -230V (I live in Europe). We want the signal to be always positive or only negative. To do this we use a diode bridge (Br in the schematic). Diodes are solid state devices that only allow current to pass in one direction. You can either build your own diode bridge, or buy a pre-assembled diode bridge (which I recommended).

We now need to filter the signal, that means converting the sinusoidal circuit from the mains into something more constant (the aim at the end is to have a completely DC signal).

For this use two high capacity electrolytic capacitors, 1000 uF (C1 and C2 in the schematic). Be very careful how you connect electrolytic capacitors. Polarity is important with these guys. Assemble them the wrong way and they may explode! (yes, it does make a lot of noise, but it’s usually harmless) You should now feed the resulting signal into voltage regulators. In my case I used the LM7815 (positive terminal voltage regulator) and the LM7915 (negative terminal voltage regulator). Note that if you need a different output voltage, you should use different voltage regulators. This may be all that you need, but in my case I was not satisfied with the end result, since there was still high frequency noise, so I added two low capacity, 220 uF, ceramic transistors (C3 and C4 in the schematic)

And that’s it! You should now have a clean DC signal and three outputs, +15 V, 0 V and -15 V, so you can either have an absolute voltage of either so 15V or 30V.

In case you want to build the circuit on a PBC, it’s better to use an adequate software and send it to a company specializing in doing PBCs. I projected mine in Eagle.

Power supply PCB (Eagle)

Power supply schematic (Eagle)

Part II: Current amplifier

For this part you will be needing the following components (you will also need tools, which depend on how you plan to assemble things):

• 1x BC547C
• 1x 2N3055

For the current amplification I decided to use the so called Darlington pair. It basically consists in an arrangement of two transistors and has a very high input impedance, a very low output impedance (which was necessary in my case), so you can use it to feed circuits with very low impedance (speakers, for example) and amplifies current instead of amplifying voltage (also what I wanted). One can also obviously have voltage amplifiers. A small note here is that such circuit MUST be powered (it’s an active circuit, which is obvious. Think about it this way, power is V.I. If the output voltage is the same as the input and you increased the current, energy must be coming from somewhere, right?). In fact, the power supply previously built can be used to power this circuit!

Now, I won’t delve into transistors since that would make this too long (it’s probably already too long), so I’ll assume you know some stuff about transistors (if you don’t, read Wikipedia). We need the transistors to be always in the active zone. This means $V_{BE}$ must always be above 0.7 V (for normal npn transistors).
In our case we connect the BC547C (Tr1 in the schematic) and the 2N3055 (Tr2 in the schematic) as in the schematic.

Darlington pair

In this case, since we have two transistors, we need that $V_{B^\prime E^\prime }$ exceeds 1.4V.
In case you are feeding an AC signal, you may need to sum a constant DC component to allow this (this is easily done anyway). In my case, since I wanted to use the output signal of a signal generator that allowed me to have a DC offset, I simply didn’t care about it,

Again, you can print everything into a PCB.

Current amplifier schematic (Eagle)

Current amplifier PCB (Eagle)

My Eagle files are available here.
And well, that’s all of it! In my case I bundled everything into a metallic case not only for safety reasons, but also to allow the components to dissipate properly (I attached some of them, like the power transistor, to the case, to serve as a heatsink) and also because it looks much nicer. Here’s the drawing I glued to the front of the case (the small hole at the top left corner is for the LED).

Case front

Replacing missing Skoda Fabia estate trunk cover lock piece

I love my Skoda Fabia estate 1.6 TDI (5J, 2010 facelift): it has plenty of room, was not expensive, it has a nice VW engine, all the extras I need and good fuel consumption.
Unfortunately one of the pieces holding/locking the trunk cover in place when it’s extended fell of and this seems to be a fairly common problem with the Fabia estate. It’s really annoying because it involves removing some of the car’s panels. It is, however, not a difficult procedure and you can do it at home and avoid going to a repair shop.

Trunk cover before replacing piece

Lock piece missing

The retractable trunk cover is held into position by two plastic pieces, one at each side. Unfortunately these pieces have a tendency to fall from their place. In this case you can either take the car to a garage, or fix the problem yourself. You probably won’t be needing a new piece (it should be somewhere between the panel and the body work) but if you do decide to buy a new piece (which I did), the parts number is 1Z9 867 925 D 47H (the old parts number seems to be 1Z9 867 925 C 47H – this is the SAME piece).

The trunk cover lock piece

The trunk cover lock piece

You will need the following tools:

• T10 bit (torx)
• T15 bit
• T25 bit
• H5 bit (hexagonal), a big flat screwdriver or simply a coin
• 10 mm wrench
• Panel removal tools (not really necessary, but useful)
• Flat screwdriver or pin removal tool

You will need to remove 3 panels, or 2 panels and pull a bit the panel where the piece is supposed to go, if you’re lucky.

Although you won’t probably take long enough time to drain the car’s battery, I recommend you start by removing fuse number 23 (15A) in order to turn off the trunk light.

Start by removing the bottom panel by the trunk lock.

Bottom panel

You will have to remove 2 pins and 2 nuts (10 mm). The pins consist of two parts: an inner and an outer one. The inner piece needs to be pulled out before you can remove the entire pin. You can achieve this by easing a flat screwdriver under the pin head or by using a pin removal tool (the screwdriver works really well, so there’s no need to buy the tool, in my opinion).

Pin

Then remove the nuts near the bottom of the panel using, for example, a ratchet wrench. The panel is still attached to the bodywork by metallic clips, but just needs to be pulled out (if you have those panel removal tools, it will make the job much easier).

You need now to remove the grey side panel by the window. It is attached to the bodywork by some metal clips and nothing else. You just need to pull it out (don’t be afraid to use some strength, these panels are not that fragile). Again those panel removal tools may come in handy. It may happen that one of those metal clips will remain attached to the bodywork. If that’s the case, simple pull them out and re-insert them into the back of the panel.

Small side panel

Metal clip

You are now in position to remove the screws from the big side panel where the piece is supposed to fit. You will need to remove the following objects (note necessarily in that order):

• The nut holding the lights, using either a big flat screwdriver, a H5 bit or a coin
• 1xT10 screw (holding some sort of hook into position)
• 3xT15 screws (one where the trunk cover fits, another beneath the side panel you removed and the other beneath the bottom panel you removed)
• 1xT25 screw (beneath the hook)

T15 in the trunk cover insertion

T15 at the top

T15 at the bottom

T10 and lights’ nut

Hook and T25

There will still be a pin near the seats that you should remove in case you want to remove the entire panel. This may be necessary in case you want to look for the missing piece. In case you have a new one which just needs to be clipped into position, you don’t really need to remove the entire panel but simply to pull it away from the bodywork. In this case you don’t need to remove the pin.

Now, simply pull the panel away from the bodywork (again, it is be held into place by some metallic clips) and attach the trunk cover lock piece.
That’s basically it! Put everything back in reverse order.

Trunk cover after replacing piece

P.S. I am not responsible for any damage your car incurs in following this guide. If you have absolutely no idea of what you’re doing, you’re better off taking the car to a repair shop.