Art of Electronics SM: Capacitors Lab - "Mains Garbage Detector". Author Intent? - Page 1
Forum section: electronics / beginners

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 09, 2017, 04:19:09 pm
content: HiIf you've had a chance to work through this course - I am looking at Lab 2.L 2.3, Mains "garbage detector". Up to this point we have done nothing more complex or dangerous than put a few volts across a cap and resistor. Then suddenly in 2L. 2.3 we are faced with the attached diagram, showing a transformer attached to (US) mains. This raises a few questions:1. The parts list includes a 266JB6 transformerhttp://img1.findic.com/266f12-ZTV7LjBi-yZ2g4vxaq.jpg. Are we meant to be wiring that up for the circuit, or is this another case where a piece of off the shelf hardware is provided should you be taking the course in a lab?2. Is this going to be ok to use with UK 230Vac? The diagram is clearly intended for US power [despite being a globally sold book]. The transformer can be wired in series to give 230Vac, will I still see 6.3Vac on the transformer?Note, the point of this lab is not to learn about wiring a trasnformer, its for learning about noise on AC lines. It just seems a huge leap to be going from 5V DC to mains. If you've done it, how did you carry it out? I am doing this course for practical learning, having done a degree many years ago. I keep having to skip labs because of its design for a university setting. Its sold as being applicable for people at home though (author even provides references to sadly non-functioning links to more information for those "working through this book on your own"), and each lab builds on the next.What am I missing? Has anyone made a companion guide or similar?

author: mariush
author_rank: Super Contributor
timestamp: May 09, 2017, 04:34:53 pm
content: For that exercise you can use any transformer that outputs 6.3v AC or something close to that on the secondary side.The primary winding it's up to you : you could buy a transformer that has two 110v primary windings and connect them in series to obtain 220v (which is close enough to 230v that it won't affect the transformer in any significant way), or you could buy a transformer that has only one 220v/230v primary winding.Farnell has a bunch of them in stock, any of them would work just fine.A lot of transformers will also have either two independent windings on the secondary side which can be joined in the middle to obtain a higher voltage, or could be connected in parallel to obtain the voltage of a single winding but double the current.Some transformers will have a single winding but with a "center tap" , a wire in the middle of the winding which allows you to get half the voltage between two pins, or use that center tap as ground for the secondary side and then the other two pins become positive and negative voltage.It may be cheaper to buy a transformer with two independent windings or with a center tap and use them in the 6.3v configurationHere's all the transformers that Farnell has which should work for that exercise (i've included transformers that output only 6v AC because the difference between 6v AC and 6.3v AC is small enough) :http://uk.farnell.com/w/c/transformers/isolation-transformers?isolation-transformer-primary-voltages=1-x-230v|2-x-115v|2-x-115v-1-x-230v|2-x-115v-2-x-230v|2-x-120v&secondary-voltages=2-x-6.3v|2-x-6v|6.3vFor example, here's this transformer :http://uk.farnell.com/block/avb3-2-2-6/transformer-3-2va-2-x-6v/dp/1131487It has two 115v primary windings on one side , so you connect together the center pins to convert that to a single 230v primary winding.It has two independent 6v secondary windings on the other side, so you can connect the first pin to the third, and the second pin to the fourth and you get a single secondary winding of 6v but with twice the current capability. Or, you can just connect the 2nd pin to the 3rd and you get a single secondary winding of 12v

author: Ian.M
author_rank: Super Contributor
timestamp: May 09, 2017, 04:37:25 pm
content: That's what university lab technicians are for - putting parts like that in a plastic project box with a fuse, switch and mains lead with 4mm binding posts for the secondary to keep the 1st year mouth-breathing muppets from killing themselves..Assuming you are a *reasonably* competent person (i.e. can wire a plug or replace an appliance cord without killing yourself or your family), and there are no kids around or idiots who'll mess with what's on your bench, just hook it up to a 2 wire mains lead and a BS1363 plug (with 3A fuse) using a 3 way 'chocolate block' screw terminal block, Use the spare way to put the two primaries in series for 240V operation. However you *MUST* get the primary phasing correct - if one of them is reversed it will blow the fuse or even the primary, so if in any doubt whatsoever STOP and ASK (posting a *GOOD* photo of the label on the transformer and/or a link to its datasheet with wiring information).

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 09, 2017, 04:53:12 pm
content: Hi MariushThanks for your in depth reply, its appreciated. I do have a transformer already as mentioned. I've been finding that the parts list for the course is incomplete and keep having to order more bits, so if possible would like to avoid getting more transformers. The data sheet for the one I have (the recommended course transformer, though this may be for the PSU build later in the program) is herehttps://www.hammfg.com/files/parts/pdf/266JB6.pdf. That shows how to wire it for 230vac.The next step in the lab is to wire it up as per the attached, with the 6.3 vac section inline with a resistor. Do you think that will be relatively easy to accomplish?Many thanks

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 09, 2017, 04:54:24 pm
content: Ok cheers Ian, I will give the "posting a picture of my death trap" method a try!By the by, does the author hang out here by any chance?

author: Ian.M
author_rank: Super Contributor
timestamp: May 09, 2017, 05:07:24 pm
content: I would suggest mounting the transformer on a wooden base with some thin rubber feet ,with a cord grip (taken from a dead plug) for the mains lead , a 3 way chocolate block for the primary (L, N, center tap) and a 4 way chocolate block for the two secondaries. That way its a lot less hazardous than flapping around loose on your bench. As the transformer itself is double insulated,, it doesn't require an Earth. Remove the mains lead if you are doing experiments that involve driving its secondary.If you've got aQuickTest, you can skip the cord grip and wiring a mains lead - just jumper it to the QuickTest as required with 500V rated hookup wire or a short piece of two core mains flex.

author: mariush
author_rank: Super Contributor
timestamp: May 09, 2017, 05:35:36 pm
content: With the block style transformers like the one I linked to above , those have pins on the bottom.So for example, you could get a circuit board slightly larger than the transformer, solder the pins on the circuit board bottom. Add a fuse on the bottom of the PCB if you want, and you could also add a terminal block on the circuit block for the secondary windings (the kind with screws, insert the wire and tighten the screw)Then you could screw 4 holes in the edges of this circuit board, and use 4 spacers to connect this circuit board to a bottom board made of plexiglass or wood, basically to make it impossible to students to touch anything that's mains voltage (the bottom of the circuit board). All they would be able to touch would be the screws on the terminal block.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 09, 2017, 08:13:23 pm
content: Quote from: mariush on May 09, 2017, 05:35:36 pmHi MariushIts actually me that's the student! I am doing the programme for myself as its sold as both a lab and home course (given some outlay for parts of course). I am going to use the exsiting transformer, but use the terminal blocks both yourself and Ian mentioned and a wooden base. If I can find some kind of plastic housing that would be even better. Not quite the cost free solution I was hoping for, but ehh you can't put a price on knowledge eh?

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 09, 2017, 08:16:19 pm
content: Quote from: Ian.M on May 09, 2017, 05:07:24 pmThat sounds ideal, I will do it this way. One quick question, you mentioned using a 4 pole terminal block for the secondary side, can I ask why? In the diagram from the spec sheet (attached) I had assumed there would be a series wiring (shown in blue) for the secondary side too, meaning a need for only a three pole terminal block. Should this be a parallel connection on the secondary side?Thanks

author: Ian.M
author_rank: Super Contributor
timestamp: May 09, 2017, 08:28:51 pm
content: Different experiments may call for series or parallel connection. To avoid wear and tear on the transformer wires, its best to put them in individual terminals and add any jumpers required for series or parallel on the other side of the terminal block.'Choc block' connectors are so cheap its not worth skimping. The secondaries are each 3.15V, so to get 6.3V you'll initially want them in series.Also I wouldn't bother with a case or cover unless you've got young kids. If you need one, the minimum would be a screwed down insulating cover over the primary side terminal block, to make it difficult to stick a screwdriver into any live terminal. It could be as simple as a small block of wood glued on either side of the terminal block with a hard plastic cover held by two screws.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 14, 2017, 09:10:14 pm
content: HiI have now got all the bits of kit and have wired the transformer up as per the attached photo. Note that the colour scheme on the right, secondary coil, is reversed vis a vis the diagram in my post above and in the hammond datasheet: YELLOW, GREY, BLUE, RED in reality vs the converse in the diagram. However their iso drawing of the transformer also reflects the reality of the part. Is this just a convention?http://www.hammondmfg.com/pdf/266%20Insert.pdfI do realise the fuse needs to go inside the plug, that was just to show that I selected a 3A fuse. I wired an earth to the casing as suggested. I didn't have any mains lead earth wire so I used two runs of thinner gauge hookup wire. Continuity is checked on all lines and is good. Screwdriver is just to weight down the secondary wiring for the photoWired as per current IEE standards with mains live being brown and mains neutral being blue. Earth is green and yellow. Both coils are in series config as per the red and blue boxes attached to the post above.I also put a 10V sine at 50Hz through the setup to see what the result was, those results are attached. Oscilloscope is a rigol DS1054Z so volts / div are the number in the bottom left divided by 10Amplitude is there too. 9.75V in, 300mV out. Ratio is 32.82828282, not sure if this is applicable at this voltage but if I apply that to an input of 234V I get about 7V, which is higher than the expected 6.3V. Anything of concern or just down to inaccuracies / my lack of skill with an oscilloscope? NB I am not going to put mains through my oscilloscope!Am I good to wire this into a circuit or is there anything needs changing in your view?

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 14, 2017, 09:27:48 pm
content: Photo of the setup used for the oscope measurement attached for reference

author: rstofer
author_rank: Super Contributor
timestamp: May 14, 2017, 09:45:09 pm
content: That's a lot nicer setup than I would have made. I would have soldered the primary leads and used heatshrink tubing. Your setup is better.Don't worry about that 7V thing. The 6.3V rating is at full load (more or less) so naturally, the unloaded voltage will be higher.I can't really read the measurements on the photo (better to use image capture to USB) but the x10 comment leaves me wondering. All of that x10 stuff should be taken into consideration by the scope and it is set to x10. If the probe is set to x10, the voltages should be the actual value. Maybe I misread that...I don't know if I would add secondary fusing or not. The primary fuse is far too large to protect the transformer (I think) and it would be nice to match the secondary (125%). I don't want high secondary current because I want to protect the attached <whatever>. I might fuse the secondary at 0.1A or 0.5A. If there is an 'oopsie', I would like to be able to salvage some of the components.

author: john_c
author_rank: Contributor
timestamp: May 14, 2017, 09:48:35 pm
content: Quote from: SpannersToSparks on May 09, 2017, 04:54:24 pmI wrote to Winfield Hill at his harvard.edu address one time. He was super nice, and even sent me a preprint related to my question about HV amplifiers.I think they like to get fan mail. Who wouldn't!

author: Ian.M
author_rank: Super Contributor
timestamp: May 14, 2017, 10:13:01 pm
content: Yes, the addition of a pair of inline fuse holders with 1A or lower fuses, one in series with each secondary would make it more idiot-proof, but the transformer itself isn't grossly expensive and one of the aims of studying electronics in a formal manner is to learn how not to be an idiot with circuits and components. As-is it will fail safe - either the fuse in the plug will blow, and/or the primary winding will blow.Do replace that hookup wire when you have some scrap mains lead available or better replace the mains lead with a two wire one. The transformer is a double-insulated split bobbin design and doesn't need earthing for either safety or signal integrity. If you replace the earth wire, use a crimp ring terminal and bolt it to the lug using a shakeproof washer.I'd still recommend screwing everything down to a wooden base - if during in one of your experiments, you accidentally snag a wire and it gets yanked off the bench when you move your chair, its far safer if the fall is not stopped by the leadout wires, as that could damage their attachment and insulation.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 14, 2017, 10:51:25 pm
content: Quote from: rstofer on May 14, 2017, 09:45:09 pmHi, I actually did buy some 1A fuses as there is an experiment later that uses them with the transformer. I must admit it didnt fit the plug and so that was why I went with the 3 :palm:Did not realise you could get inline fuse holders! I will look into that with making the setup more permanent.The probes are indeed set to 10, I had some fun fiddling around with those. I do notice though that the measured amplitude fluctuates a lot depending on the v/div I have selected. In that pic I selected what seemed the most stable. And yeh sorry for the blurry photo! 9.75V in, 300mv out.The setup was Ian's suggestion, so compliments passed his way!

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 14, 2017, 10:56:06 pm
content: Quote from: Ian.M on May 14, 2017, 10:13:01 pmHi IanI did remember your comment in B&Q today! I looked for a nice bit of wood, but the smallest I could find was this beaut bit of sanded log section for £16. Was a bit too much to spend on, and a touch heavy to carry! I will try and find something suitable though.Yeah I wasn't totally happy with the hookup either. I am tempted to go and cannibalise an old plug socket. I actually bought two three wire plugs + flexes online for the build, so I would prefer to keep them. I will go with getting a proper crimped attachment, I think I have some kicking about! As long as the extra earth wire isn't directly causing a problem?Thanks again, was good fun putting this together. Gave me an excuse to go and browse drills and things as well

author: rstofer
author_rank: Super Contributor
timestamp: May 14, 2017, 11:03:51 pm
content: I tend to use a lot of clear acrylic for bases. Wood is ok but i prefer plastic.Not an issue here but I can CNC machine acrylic better than most woods and it is easier to get. I have a large retailer of plastic just a few miles away. I can also drill and tap acrylic.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 14, 2017, 11:04:49 pm
content: Quote from: rstofer on May 14, 2017, 11:03:51 pmThats great, I hope to get a small cnc machine in the future! I do have a 3d printer on the way though

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 14, 2017, 11:26:02 pm
content: Quote from: john_c on May 14, 2017, 09:48:35 pmhaha great! I should try that one

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 15, 2017, 01:57:16 am
content: I got it up and running. I used a glass cooking dish to both cover the transformer and hold the leads in place with its weight, seemed an effective solution! I have rubber matting on my bench as well.At first I couldn't understand why my amplitude showed 20+ volts and my multimeter showed 7+, and after a lot of headscratching I found an RMS calculator and all became clear (again, I knew it really but actually using it is somehow different!). I thought it was my probe settings but those matched and were fine.I also heard that the voltage in the UK can vary widely, with the local voltage here apparently going up to 240 / 250v AC. I don't have the guts yet to put the UNI-T I got free with the oscilloscope in the mains to check. I may wait until I have a nice expensive fluke or something.... explains why I am seeing 7V though even with a cap and resistor in the circuit.EDIT: This now seems off. The scope is showing 7.5V RMS which agrees with the multimeter. If I divide the transformer's rated 234V input by its 6.3V output, I get a ratio of 37.143 for the transformer. Working backwards, this would mean my mains was a stonking great 278 volts plus. What am I missing?The first part of the experiment also worked nicely, got to see the noise on the line. Feels like something of an achievement!So thanks again to everyone who helped

author: rstofer
author_rank: Super Contributor
timestamp: May 15, 2017, 03:58:14 am
content: The open circuit voltage will always be high. Put a rated load on the transformer and the voltage will fall.

author: Ian.M
author_rank: Super Contributor
timestamp: May 15, 2017, 08:29:01 am
content: With the quality of construction you have shown, the glass dish was entirely unnecessary unless you were just using it to keep curious cats from batting at the mains wiring.Don't be too scared of using a CAT-II rated meter to check the mains voltage downstream of a plug fitted with a BS1362 fuse. However if you are at all suspicious of the meter, DON'T hold or touch it or its leads while making the test. Power off. Select correct mode and/or range on the meter, clip the leads on to the points you want to probe. Stand clear, power on, take reading without touching the meter or leads and power off again.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 15, 2017, 11:45:05 am
content: Quote from: rstofer on May 15, 2017, 03:58:14 amHmm that's what I thought too, but I have got a .01 uF Capacitor and a 15K resistor attached as per the experiment, would this be enough to qualify as a load?

author: Ian.M
author_rank: Super Contributor
timestamp: May 15, 2017, 12:19:16 pm
content: No. A quality transformer is rated to deliver its nominal output voltage at its rated current when fed by its nominal supply voltage, and usually has a figure for regulation expressed as a percentage which is the amount the output voltage can rise above the nominal voltage at lower currents.For series secondary connection of your transformer its rated for 6.3V @1.2A, with 234V in. That would be a 5.25 Ohm load.Your load is approx 1/1900 of the rated so the voltage drop from unloaded will be negligible.The measured 7.5V unloaded output would indicate that the regulation is about 16%, assuming 240V AC supply. If your supply is a bit on the high side it might be a little better than that.

author: rstofer
author_rank: Super Contributor
timestamp: May 15, 2017, 02:41:31 pm
content: An automotive tail light draws about 1A at 12V (the older lamps). I don't know what it draws at 6V but it should provide a load for the transformer.Actually, the brake element on this particular bulb draws a little over 2A at 12V and the tail light filament draws about 3/4A:https://shop.advanceautoparts.com/p/sylvania-3157-longlife-mini-bulb-pack-of-2-3157llbp2/5081912-PI didn't hunt for a bulb that might be easy to breadboard. There are others...

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 15, 2017, 05:16:28 pm
content: Cheers Ian,I had assumed that bigger ohms = bigger load, looks like this is something for me to learnI measured the voltage, didn't blow up and read 245, so is a little on the high side here but not hugely.

author: rstofer
author_rank: Super Contributor
timestamp: May 15, 2017, 05:21:10 pm
content: Ohm's Law:http://www.physicsclassroom.com/class/circuits/Lesson-3/Ohm-s-LawI rather like the delta-V idea versus what we usually use which if V (or E)The famous equation is simply E=I*R. For a given E, if R increases, I decreases.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 15, 2017, 05:35:05 pm
content: Quote from: rstofer on May 15, 2017, 05:21:10 pmHaha of course. I knew the law but somehow didn't make the connection .. ohms law .... I is inverse to R, so smaller R = more current. Great!Is it a little more complex to work out for this circuit exactly, as its AC? Would we not need the impedance calc for it, or does it simplify? Please forgive the low level questions, this is all what I am working through right now

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 15, 2017, 05:37:33 pm
content: Quote from: rstofer on May 15, 2017, 02:41:31 pmI have a few bulbs in my kit, I will give this a go, thanks!

author: Ian.M
author_rank: Super Contributor
timestamp: May 15, 2017, 05:42:05 pm
content: As the mains voltage can fluctuate with the time of day due to demand variations, if you want to characterise the transformer, you should measure the unloaded output voltage before and after measuring the mains voltage using the SAME DMM. It would also be worth loading it resistively to about 1A and repeating the measurements, including the actual load current.If you use a bulb (other than 6V to 6.5V) for a load, check the bulb current at 6.3V using your DC bench PSU before connecting it to the transformer to be reasonably sure you aren't going to overload it. Beware of the burden voltage of your meter on its AC mA or Amps ranges - you really need to use two meters, with the voltmeter directly across the transformer output as inserting an ammeter will reduce the current sligtly, maybe enough to cause a detectable voltage rise.

author: rstofer
author_rank: Super Contributor
timestamp: May 15, 2017, 08:26:41 pm
content: Quote from: SpannersToSparks on May 15, 2017, 05:35:05 pmIn general, we are going to treat an AC source using its RMS voltage and internal impedance. We want the Thevenin equivalent source. We may not be able to get at the inductance value very easily but we can still look at voltage droop versus load current and come up with an equivalent internal resistance.Yes, everything about AC is a lot more difficult. Part of the reason is that impedance has a component that varies with frequency (reactance, inductive or capacitive) and we inevitably wind up with complex numbers when we want to draw the impedance on an X-Y (or R-X) plane (although sometimes we use magnitude and angle - not a vast improvement!). Next up, we want to look at the transient (step) response and that tends toward differential equations (DEs)and then we get into Laplace Transforms because it is a markedly easier way to solve DEs.Once you leave DC circuits, the math gets a lot deeper. Even DC circuits can be pretty ugly and require matrix algebra for the solution.I don't want to scare off the hobbyists, there are a lot of fun things to do that don't require much more than Ohm's Law. Even op amp circuits can be analyzed with little more than Ohm's Law and Kirchoff's Current Law.The Art of Electronics (and the companion lab manual) try to reduce the math and that's a very good thing. OTOH, tools like Matlab and wxMaxima make the entire EE program much more approachable. I was still using a slide rule when I graduated. The HP35 had JUST been invented and it was well out of my price range.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: May 15, 2017, 11:35:47 pm
content: Thanks for the video link, I will give that a good watch.Not to worry on recommending maths based material, though I am a beginner to electronics I have been a mechanical engineer for many years and so DE's, laplace etc are not entirely foreign. In fact it will be good to brush up on them!I think AoE moves onto much of it anyway, especially the main text has a lot more than the manual. Looking forward to it

author: rstofer
author_rank: Super Contributor
timestamp: May 16, 2017, 12:44:56 am
content: Quote from: SpannersToSparks on May 15, 2017, 11:35:47 pmEven if you have to brush up a bit, at least you have the math background when it comes up.I have been working to recover whatever I might have known back in the '70s by helping my grandson with Calc I and, perhaps, Calc II and DEs. We'll have to see...I have also been playing around with wxMaxima and Matlab and they are fantastic tools.Side issue: If you like Control Systems, there is a really great video seriesGiven something like Matlab, the topic is a lot easier to manage. No more Spirule for working root locus graphs!