|
Homebrew Equipment A place to show, design and discuss the weird and wonderful electronic creations from the hands of individual members. |
|
Thread Tools |
2nd Mar 2018, 9:22 pm | #1 |
Pentode
Join Date: Jan 2015
Location: Greenock, Inverclyde, UK.
Posts: 161
|
Capacitor reformer & leakage current indicator
I built this as a learning exercise in Arduino programming. It may be of interest to others. I used parts I had to hand, but there is nothing expensive or hard to get. Works from a 9v source and is current limited so should be safer than mains derived voltage sources (although the charged capacitors must of couse be treated with appropriate precautions). I've used two Arduino's - a Nano takes care of voltage/current monitoring, timing, display, etc and an ATtiny85 drives the step up transformer. I'm sure that further optimisation of the circuit is possible - but it works! At least it does on the capacitors I have to hand. Screenshots attached are from forming a new 220 uF 400v cap.
If requested (and mods permitting) I will also upload the Arduino sketches etc. All comments welcome |
3rd Mar 2018, 6:11 pm | #2 |
Rest in Peace
Join Date: Feb 2004
Location: Hexham, Northumberland, UK.
Posts: 2,234
|
Re: Capacitor reformer & leakage current indicator
That looks like a well designed useful bit of kit. My reformer, built many years ago is old style with analogue meters etc. I have yet to be brave enough to venture into the Arduino world, or even the world of the Raspberry Pi. Maybe one day.
Alan. |
3rd Mar 2018, 7:11 pm | #3 |
Nonode
Join Date: Dec 2012
Location: Stockport, Greater Manchester, UK.
Posts: 2,085
|
Re: Capacitor reformer & leakage current indicator
Ditto, wish I could design with code. How does the Arduino control the voltage from the inverter? and what's that driver device?
__________________
- Julian It's good here |
3rd Mar 2018, 7:32 pm | #4 |
Dekatron
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
|
Re: Capacitor reformer & leakage current indicator
Nice! I have no experience of using Arduino but I’ve seen imaginative and useful projects, just as yours is. Thanks for sharing that, really well thought out.
(I sometimes do have a little laugh when I see on the forum a post that says all parts used are ‘in [the makers’] parts box’; some people have a whole Farnell’s worth of accumulated active and passive components!) Nothing unusual in your case, but it’s a thing that does happen. It’s a friendly observation that is just noting how our harmless collecting zeal may span decades and rooms-full of handy spares!
__________________
Al Last edited by Al (astral highway); 3rd Mar 2018 at 7:38 pm. |
3rd Mar 2018, 9:49 pm | #5 |
Pentode
Join Date: Jan 2015
Location: Greenock, Inverclyde, UK.
Posts: 161
|
Re: Capacitor reformer & leakage current indicator
Julian - The inverter is driven by an Attiny85, which is an 8 bit microcontroller (in this case in an 8 pin DIP package). It can be programmed like any Arduino device using the Arduino platform. It could well be possible to generate the inverter drive signals directly from the Arduino Nano (subject to timing constraints) but as the Attiny85 really is “as cheap as chips” (about a pound) I took this route. Also it let me build and test the inverter separately from the main board and gave me some more practice in coding. The Nano reads the divided voltage generated and when it exceeds the set value signals the ATtiny85 to stop via pin 2, so it’s a non-proportional (bang-bang) control loop. I’ve attached the code (or Sketch as referred to in Arduino) below.
Al – my parts box(es) have been accumulated over more than a few years (or decades) but I do have an occasional purge so I can’t rival Farnell The bicolour LED was amongst bits gathered from the bargain bins when Tandy went out of business, still its original packet. Found a use for it at last! |
3rd Mar 2018, 11:53 pm | #6 |
Heptode
Join Date: Jan 2009
Location: West Lothian, UK.
Posts: 760
|
Re: Capacitor reformer & leakage current indicator
I would be very interested to see the Nano sketch as well.
May I also ask you to re-post the circuit in pdf format as my old eyes are having trouble with the jpg image...
__________________
George |
4th Mar 2018, 1:25 pm | #7 |
Pentode
Join Date: Jan 2015
Location: Greenock, Inverclyde, UK.
Posts: 161
|
Re: Capacitor reformer & leakage current indicator
George - here's the circuit in pdf format. I'll upload the Nano sketch separately.
|
4th Mar 2018, 1:46 pm | #8 |
Pentode
Join Date: Jan 2015
Location: Greenock, Inverclyde, UK.
Posts: 161
|
Re: Capacitor reformer & leakage current indicator
And the sketch for the Nano. Next stage would be improve the filtering for the leakage current display. The first stage of fitering is in hardware i.e the LPF formed by the LM358. Its then averaged in the code using a simple artihmetic mean of 50 samples; a running average would be better but I'm still thinking about how best to do that.
|
4th Mar 2018, 1:48 pm | #9 |
Heptode
Join Date: Jan 2009
Location: West Lothian, UK.
Posts: 760
|
Re: Capacitor reformer & leakage current indicator
Thanks for the pdf. I have printed it out and it is crystal-clear.
Raking in junk boxes now... I don't have any serial/I2C displays so will have to think about that. Ah - posts about to cross - I will download the Nano sketch now...
__________________
George |
19th May 2018, 9:32 pm | #10 |
Octode
Join Date: Feb 2009
Location: Wallasey, UK.
Posts: 1,308
|
Re: Capacitor reformer & leakage current indicator
Wow, this is impressive. Any chance of a picture of the build itself?
|
20th May 2018, 6:16 am | #11 |
Moderator
Join Date: Mar 2012
Location: Fife, Scotland, UK.
Posts: 22,798
|
Re: Capacitor reformer & leakage current indicator
There doesn't seem to be anything to protect against the possibility of an inverter transistor getting left on during software development or if it gets latched up. Shouldn't happen in normal use but would make smoke if a bug happens.
David
__________________
Can't afford the volcanic island yet, but the plans for my monorail and the goons' uniforms are done |
22nd May 2018, 9:13 pm | #12 |
Pentode
Join Date: Jan 2015
Location: Greenock, Inverclyde, UK.
Posts: 161
|
Re: Capacitor reformer & leakage current indicator
"Any chance of a picture of the build itself?" - OK. It looks better with the lid on
With regard to David's comment regarding protecting against a transistor getting left on, in my case the PSU is limited to less than 1 amp which gives a degree of protection. During development there were occasions when the transistors got hot but they survived! No issues now its up and running though. |
23rd May 2018, 4:19 pm | #13 |
Dekatron
Join Date: Jun 2016
Location: London, UK.
Posts: 3,687
|
Re: Capacitor reformer & leakage current indicator
I like the inverter design. Very neat! I'd be sitting there messing around with multivibrators and swearing
I'd add a current limit in series with the driver transistors (not the uC!) or I'd blow it up. Rsense = 0.6 / Imax R1 = 470-1k ish (not overly critical) T1/T2=BC337 |
25th May 2018, 9:57 am | #14 |
Octode
Join Date: Feb 2009
Location: Wallasey, UK.
Posts: 1,308
|
Re: Capacitor reformer & leakage current indicator
Thanks for the build pic. It looks beautiful to me. I know nothing about Arduinos yet, but this opens new vistas for me.
|