Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Monday, May 26, 2014

Adventures in 3d printing Or "I Finally Built a RepRap!"

I've wanted a 3d printer for quite some time. A few years ago I stared building one that, to say the least, was poorly engineered and under constructed. It never actually worked at all. Some of the designs could have worked, especially in a large CNC machine, but were just not a good fit for a small 3d printer. I've been eyeing the RepRap i3 models for a while now, last week I bought a kit (less electronics).

RepRap i3 with cooling fans and filament spool.
Note spool is on backwards to allow for the sloped ceiling in my lab.


Assembly was quite straightforward, there is a partial guide, though it skips (or I missed) some key steps.

A few tips:

  • Final alignment of the XZ (vertical) frame should be done after assembly. Just line it up so the extruder will reach the front and back of the Y frame and is square.
  • I printed thumbnuts to fine tune the bed leveling, it makes it really easy to get it spot on. I used these "Easy Heated Bed Leveling Thumbnuts"
  • The Z axis endstop was a pain, part of it was I used the wrong mount, but I printed this "Adjustable Z-Axis Endstop Arm" to make it easier

Fire in the Hole!

Everything I (and probably everyone else) build has some "teething" issues. I had (and am still having) a few. After I got it set up fairly good I started a print and it seemed to be working nicely, then the Sanguinololou literally caught fire (there were flames). The bug list for the Sanguinololou says the traces for the heated bed are too small, so I had reinforced them with wires before this point, it was the wires that caught fire. Turns out the mosFET shorted and the bed just stayed on continuously drawing ~16A. I salvaged the board and put a new mosFET (all I had on hand was a 12A logic level one) put it back together, set it to pwm at 50% and it lasted about 30 seconds before shorting too (I was watching this time). I swapped it again, added a reverse diode and ran it through an automotive relay (so the mosFET turns the relay on and off). That works really good.

Electronics, complete with rats nest

Now that the fires were out It was time to try some real prints. The filament won't stick to the bed. No matter what I do it won't stick. I tried cleaning really well, nope. gluestick helped, allowed me to print the upgrades I mentioned, but was hit or miss. I researched, tweaked settings, spent the better part of a day on it. Finally my brother was over and (looking on his tablet) said "they say here that Reprapper brand glossy black PLA won't stick to glass, use blue tape". Yep, I had Reprapper brand glossy black PLA filament, and yes, it sticks really well to blue tape.

A Sheep! Here's the first print that I took a picture of.

A few remain

Now I can print, I've still got a few issues left, mostly "dialing in" problems.

  • Overhangs and bridging don't work quite right. I've been lowering the extrusion temperature and it really helps. I started at 200C and am down to 180C for the first layer and 175C after that. A box fan after ~5 layers helps even more.
  • I printed some large parts and they warped, pulling the blue tape off the glass. The cooling fan bracket printed really nice with the 182C/177C and bed at 35C settings. this might be licked, but can't say yet. 
  • The first layer of big parts will bunch up a bit during infill, leaving stuff sticking up that can catch the extruder. If it gets 3 layers or so it will bury the problem and will complete fine. I might still be a touch close on my z-axis start point or it might be something else.

Future plans

  • Upgrade to optical endstop for Z-axis. It should be considerably more repeatable than a mechanical endstop, so I think it would be a big improvement. The X and Y axis are not nearly as critical, so I don't see any need to change those endstops.
  • Upgrade the electronics so I don't need a computer hooked to it and add cooling fan support. I've got several options: MosFET board and sd adapter, MosFET board and android tablet, Panelolou (includes Mosfets on the interface board and SD on the panel). I'm leaning toward the tablet option. The software looks really cool. I need to try it sometime.
UPDATE: I printed a bracket to mount some 40mm cooling fans, but all my small fans are 50mm, so I printed a 50mm bracket. Seems I chose one bad fan (rattles) so I'll have to replace that at some point. It makes a huge difference. I'll do another post on integrating it with the electronics.

Links

http://www.thingiverse.com/thing:208137 - thumbscrews
http://www.thingiverse.com/thing:267927 - Z-Axis Endstop Arm

Friday, October 18, 2013

Electric Fence Charger Repair

Electric Fencer
My parents keep some goats. An electric fence is the best way they've found to contain them. Basically you run multiple strands of metal wire around the field supported by insulators, then hook it up to a "fencer" that pulses a high voltage, pulse through it once or twice a second.

Never Do This (rant)

I've heard of people just hooking the (fence) wire up to a 110/220 volt line. That's a dangerously bad idea! Grab a line hooked up to a fencer and you'll get a jolt, but it's intermittent, and it won't kill you (pacemakers / various health conditions excluded). Grab a 110VAC line in wet boots and you're going to have a very bad day, you could DIE! or your kids, or whoever, it's a really really bad idea! DON"T DO IT!

Back to the topic

Lightning is a potential problem with these as they have electronics in them and they are hooked to (potentially) several miles of wire. A strike within a few miles may well induce a serious spike in it. They are pretty rugged though, as they expect to have thousands of volts present during normal operation (20KV insulation is specified for the hookup wires).

Anyway, we've been using this one for years (10+?) before it just stopped working. We've had to replace the fuses several times, and they were blown, but replacing them didn't fix it this time, so I took it apart. We swapped in a new unit while this one was broken, as we had no way to tell when or if I could fix it.

Operation (seems to go like this, I could be wrong)

  • 120VAC is run through a transformer that (I think) both steps up and down the voltage (I didn't test this, and couldn't see any markings) There are fuses and MOV's on the a/c input for protection / filtering. 
  • The high voltage feed is rectified and charges the big capacitor. (there could be some flyback or something going on here too, idk) The low voltage is rectified and powers most of the circuit board. (probably some regulation in here)
  • The large cap is discharged by the SCR through a second transformer that steps the capacitor voltage from hundreds to thousands of volts. The output is connected directly to the case (ground) and a heavily insulated terminal (fence). The case is grounded by multiple grounding rods with the first no more than 20ft away.
  • The whole unit is built into a grounded metal box (Faraday cage?), there should be no arcing inside it (or anywhere actually), but there is a very audible "Tick" when it's working. A wire, grounded to the case, placed near the insulated output will jump a bright blue spark over 3/4 of an inch!

Diagnosis

  • This isn't something I want to test on my bench, as the voltages / EM pulses could easily damage my test equipment. 
  • Fortunately it's a pretty simple circuit, so it's not that hard to figure out. 
  • A visual inspection didn't turn up anything obvious. 
  • A few minutes tracing circuits indicated that the TO-220 SCR (2n6509GOS) would be the place to start (this would take the brunt of a surge on the fence loop). 
  • I tried to test the SCR in-circuit. It failed, but I couldn't be sure the other components weren't interfering so I removed and tested it. It still failed. So for ~$1.50 I ordered a new one and now it works!

If you mess around in one of these be very, very careful! High voltages all over the place! That cap looks like it could kill a horse!

Top PCB
The main (active) components were the 2n6509, a 2n6028, and a LM324. I ordered all of these, but only needed the SCR.
Bottom PCB
The SCR is a 2n6509GOS 800V 25A
Failed SCR, Doesn't look damaged, but it tested as failed, and replacing it restored the unit to operation.

Links

http://www.circuitstoday.com/how-to-test-an-scr

Thursday, February 21, 2013

Lead Acid Battery Desulfator

UPDATE 2:
My parts have arrived, I've got the schematic sorted out (I think). I think I'm going to do a start to finish post on my current PCB fab procedure and make a new board, even though the other one seems to work. I've got the correct parts and the other pcb is together and working. I'd like to see if they work differently.

Desulfator-RevB - KiCAD 3D Render

The Theory:
When a lead acid battery sets discharged sulfate crystals form on the  plates, reducing the surface area and thus potential capacity of the battery. A desulfator pulses a high voltage / current spike into the battery that causes vibrations that knock the sulfate crystals off the plates.
The usual frequency is around 1khz, though the vibrations are usually in the mhz range. It's described as ringing a bell. The desulfator rings it a thousand times a second and the harmonic vibrations actually do all the work. Therefore the actual frequency doesn't seem to be particularly important.
It would probably be best to remove the battery from the vehicle so we don't pulse high voltage through computers, regulators, etc. It may take a week to several months to restore a battery anyway, so doing it out of vehicle is preferable anyway.

Desulfator Rev. B - Top
The Specs:
  • Unit is controlled by the venerable 555 timer, although an attiny would work and allow more control / monitoring of progress.  (Possible future design)
  • Should work on many voltages
  • May work on nicad's too.
  • This is basically a reference design. I want to see if (and how well) it works before spending a lot of time designing my own system (if I even need too, let's not go reinventing the wheel right?)
  • I'm trying for a compact design, altoids tin or smaller. preferably 50mm x 50mm, as if it works well I may get a batch made and try to sell them.

Desulfator Rev B - Bottom
Limitations:
  • As the battery size increases the amperage needs to increase. Two resistors can be replaced with pots to adjust the frequency and duty cycle of the 555, but this results in increased heat on the inductors. (we'll try the default settings to start)
  • Increased amperage requires bigger, more expensive inductors.
  • It's not self-powered, so a trickle charge is needed for operation.
  • No reverse - polarity protection, hook it up backwards and you will probably destroy it. (I'm going to look into this, doesn't seem it would be too hard to prevent this, definitely looking into this before selling any)
Notes:
I'm basing this on Ron Ingraham's design, I don't think he followed the component numbering of the original, so if they say you can substitute something for R1, it may not be R1 in the schematic.

Update 1:
My parts haven't arrived and I've run out of patience. So I scrounged some inductors (about 600uh and 180uh) substituted some other parts and it seems to work.

Only found two problems:
1. I  missed a trace (somehow missed it in the schematic) and that prevented the duty cycle from dropping below 25% and caused the frequency to change with it. it was really frustrating. I eventually found it and added a bodge wire. Now RV2 adjusts frequency and RV4 adjusts duty cycle. I also added a 180K resistor to RV2, but that's just because I only had 100K pots (should have been at least 300K+. I highly recommend using pots for these. Then you can just dial it right in. (with a power supply and scope or by ear and watching that nothing gets hot)
2. Stupid (me) used non-polarised caps (C) instead of polarised caps (CP) in the schematic, so 3 caps were backwards.

I've corrected all these things in the schematic. I need to clean up the schematic and get it uploaded. I'm not sure if I'm going to roll all this into Rev B or go to Rev C. I have made a number of minor changes, but it's not a redesign by any means.





Rev. B Changes:
1. Replaced R2 & R4 with Pot's for adjustment. Resistors should fit instead, so it's optional
2. Added C41, C43 for more options on the low esr cap.
3. Noted in schematic different options for assembly.
4. Has component locations for several variations on the circuit. Board shouldn't be completely populated.
5. Might have placed the power connector on backwards. Oops.
6. PCB layout is Copyright for now. Free for Personal Use. I may release it to public domain eventually. I just don't want anyone selling these untested boards yet.

Links:
KiCAD + PDF Files

Make sure you add the cache library at the very top of the KiCAD libraries for the schematic. It's a PITA it doesn't do this automatically. The PDF's may or may not work, they gave me a fit. Make sure you print at 100%, no scaling.
Pictures of latest board in my PCB Fab post

Desulfator Information (mine is based on the low power - Ron Ingraham design)

Tuesday, October 16, 2012

AVR Dragon Jumpers - ISP for Atmega 168/328/etc

I've been trying my hand at etching pcb's lately. As a result I needed to burn a bootloader on a Atmega 328 and I didn't put a ISP header on my target board. I really need to get in the habit of doing that. Usually I just stick it in my dragon, connect it up with a bunch of jumpers and burn it.

A while back I saw someone had made a whole set of boards for this purpose. You just plugged in the board and never get a wire crossed again! I made a brief search for them but couldn't find anything useful (schematic, pcb layouts, etc). So I made my own. So far I have made the ISP for the 168/328. Sometime I will make the HVPP for these and both for the 644/1284.

You may notice that I have a mix of male and female headers. When I got my dragon I put mostly female headers on (excluding JTAG and ISP) so I could use normal jumpers rather than special female ones. I still think it was a good idea, but most people use all male headers, so the board could use all females.

I only put the used headers for ease of use and cost control. For soldering I put all the headers in place on the dragon then added the board. It keeps everything perfectly aligned.


Etch-resist was a laser printer transfer, cupric chloride etch solution. I'll do a post on that whole process later.


I intended to attach the KiCAD Schematic and PCB file here, but I can't see how to do that (might not be possible), so I posted it over on TryThisTv.com

Saturday, March 3, 2012

Logitech Wave Missing Keystrokes & Teardown

My Logitech wireless keyboard started missing keystrokes. It's really irritating. I tried a few different things before I figured it out.
  •  It was recommended to not have it's receiver plugged into a hub, so I plugged it directly into a usb port, that didn't fix it.
  • I tried the "smash it in frustration" approach, which only succeeded in breaking one of the feet.
  • It was so bad I decided to tear it apart and either finish it off or fix it. I didn't find anything to fix.
  • I eventually discovered that it works great backwards, or if I hold my hands at a funny angle. it seems the PCB and antenna are under the wrist pad, and something is causing me to interfere with it.
  • I dropped the receiver behind my desk almost at foot level and the keyboard seems to work great now. The mouse is another story...
  • I'm contemplating running a new antenna around the perimeter, so part of it is not under my hands
Teardown
 It's all held together with philips screws, Thank you Logitech for not using some stupid tamper-resistant screws. Be careful, pulling the membrane off created quite a static charge, I hope I didn't do any ESD damage.
 The switch thingie is a 3 piece plastic thing with circuits and contacts on the top and bottom with a separator in the center with holes for each key
I wiped each piece down with rubbing alcohol.
 
Reassembly
 Put the zoom button and mute button on the lower part, all the other keys are snapped into the upper part.


Wednesday, January 18, 2012

Fixed a dead 1284p

The Problem:
Through the 1284p saga I ended up with a 1284p that I couldn't burn the bootloader to. It was working (sprinter running, random serial errors and restarts though) then the next day it quit. Later, when I tried to burn the correct fuse bit and bootloader I received a Device Signature = 0x000000.

Unless something had corrupted it, it had the Ext Crystal Osc. setting. I figured the fuse problem out after this chip died. I came to the conclusion that either something was messed up with the fuses or the micro was completely dead. I wanted to build a Fusebit Doctor, but didn't have the time to start another project at this point, so I bought a 644p and shelved the 1284p.

The Solution, or "I Had a Lucky Break!":
I kept thinking about the dead micro, it was really bugging me. Finally I decided to try it with a crystal oscillator instead of the resonator to see if that was it. I found a 16mhz crystal in my spare parts box and replaced the resonator on my breadboard with it, couldn't find 22pf caps, and the caps I found didn't work with it.

I still managed to burned a bootloader on it with just a 16mhz crystal, no caps. Now it seems fine again with the resonator and the new fuse settings, go figure.

Tuesday, January 17, 2012

Parallax 7345 RV Power Converter (SMPS)

See Also:
Parallax 7345 Repair Tips

A friend had a Parrallax 7345 power converter for a RV that didn't work. We know what happened, It's designed for 120VAC only and somehow got hooked up to 240VAC. So it released some of it's magic smoke. (and probably made a big BANG noise I imagine)

Basic Info:
  • The big heatsinks may have 300VDC+- on them, Be careful! (obviously if it's on the heatsinks, it could be anywhere, like those 2 big caps) It doesn't just go away if it's not plugged it either.
  • 45A@13.8VDC (7300 series 45A)
  • 120VAC input
  • Despite the fancy "converter" name it's just a big Switch Mode Power Supply (SMPS)
  • Schematics are not available (Parrallax has on their page "We do not give schematics to anyone perod", or something to that effect), as with most things in the RV universe, they are expensive to replace and don't expect any help repairing them.
The Diagnosis:
It was pretty easy to locate the fault, as there was black stuff all over one spot. (Note: I'd already removed the heatsink from the bridge rectifier in the first picture and cleaned to bottom a bit when I took the second picture)
I looked it over good. It seems a MOV (metal oxide varistor) is missing (vaporized in fact), but that wouldn't prevent it from working, it just shorts the ac line together when they reach a certain voltage, with it gone it should power up, unless something else is broken. Sure enough the line filter next to it had melted a wire clean off, I didn't see it at first because the MOV had left a bunch of residue that hid it.
The other black spot on the circuit board (far left) is under the output resistors, they work fine, but must run a bit hot under prolonged load.

I bridged the broken wire on the filter, sheilded my face and plugged it in. It powered up nicely, made a moderately loud buzzing noise (no load), so I unplugged it and connected it to a 12V battery. Absolutely quiet now, but putting an amp or so into my battery. The battery is connected to an inverter I use for emergency power, so I plugged a toaster in and it jumped right to 45A. I ran a couple toaster cycles then let it fully charge my battery and all seems well.


The Repair:
I couldn't find an exact replacement for the filter, so I had to make a few mods to the board for the one I found. I had to guess on the MOV, I used a 175V MOV (datasheet said 150VAC max) I still have no idea what size would have been right, I even spent a couple hours trying to find how to choose the voltage and still didn't come up with an answer.

But a new MOV and line filter later it's back in service. The good news it the MOV did it's job, protecting all the electronics after it, it should have had a fuse in the AC line and the MOV and line filter may have survived. There was some minor damage to the traces around the line filter and MOV, but nothing too bad. The owner was instructed "Don't hook it to 240 again!", but I think he already knew that.

The other side of the board, nothing wrong here, just in case you want to see it:


Update:

I picked up a broken 55A version of this unit. As far as I can tell it's exactly the same board. I'm going to do a post and probably a video of diagnosing and repairing it, but that may be a while. 
I was going to post the correct value of the MOV, but it doesn't have one. The MOV footprint is not populated. I have the numbers off the filter, but google hasn't helped my find anything about it, so it may be a wild goose chase. In case it helps someone:

Filter:
06847475-000 843TC6
AXM EIA-17-0315-1A

Monday, January 16, 2012

ArduinoISP

Intro:
If you read Part 2 of my Sanguinololu Build you saw my arduino ISP (in Circuit Programmer) built on a breadboard to burn bootloaders my 1284p's. It worked really good, but I had to be really careful not to bump any wires loose or pull them out accidentally.
Some day I may buy a proper ISP, but until then it would be nice to have something that would work on the rather rare occasion I actually need one. So I decided to make something more permanent but not require a dedicated Arduino either.

The Project:
  • Connect an Arduino to any 6 pin AVRISP header
  • Include status LED's
  • Be completely removable (mounted on headers)
There you have it, 3 led's (Pulse, Error, Data?) Schematic was figured from the Burning the Sanguino Bootloader using Arduino as ISP page.  LED's are dead bugged on the header, not sure if you even need the cap. just plug in the 2 headers, the 6 pin ISP plug and burn away!

Seems to work so far, Tried it on my other arduino, not really extensive testing, but seems to work.I'd like to make a couple pcb's for various chips with the 6 pin ISP header on them, but that's all for now.

UPDATE:
Just built a second one, decided to move the ground from the power side to the io pin side, that allows selection of 5v or 3.3v on the VCC wire. or you can leave it disconnected if your target is self powered.


Tuesday, December 27, 2011

Sanguinololu 1.3a - Part 3:Not Out of The Woods Yet

See Also:
Part 1 - Build
Part 2 -  Trouble in Paradise


After the events of the last 2 parts I thought the Sanguinololu was finally working properly. But that would have been too easy, right? (I wouldn't have called it easy.) Of course not, something's still not right. Now I could upload and download firmware fine, and they seem to work. Except...
  • Both boards seem to reset or reboot at random.
  • One board gets a lot of serial errors, I resoldered the FTDI chip several times. I'm convinced my soldering is OK.
  • I noticed that touching my scope's 10x probe to the resonator pins produced serial errors and seemed to crash the 1284p some times
Turns out the Sanguino, from which I tried to use the bootloader and related software, as per the instructions on the Sanguinololu wiki page, is built with a crystal oscillator, not a ceramic resonator, so the fuse settings may be different. The Mighty 1284p bootloader is also set to a crystal oscillator.

I used http://www.engbedded.com/fusecalc/ to calculate new fuse settings

I burned Mighty 1284p bootloader with new fuse settings (changed in boards.txt):
Low 0xD6
High 0xDC
Ext  0xFD

I ran the controller connected to usb (no motors or external power) for over 3500 lines of g-code without error. Previously it would error some where between when it connected (before the build even started) and definitely before 200 lines of g-code.

I hooked up my motors and ran another build. I haven't built a frame yet, I've got other projects to finish first, but it ran the motors for a full build (11222 lines, the sample build-benchmart.stl), so we'll call it good for now.

From what I have been able to find the fuse settings for the Sanguino and Mighty 1284p are just plain wrong for the Sanguinololu. They are for a external crystal oscillator. Apparently the full sweep oscillator setting is required for a resonator. The above settings seem very stable so far.

UPDTATE: I just got a 644p to play with, I haven't had a lot of time for testing yet, but it seems stable on both the default settings (ext crystal osc) and my modified fuse settings. I think almost everyone uses the 644p and this may be the reason I haven't found anyone else with this problem. I'm inclined to believe that my setting (full swing osc - ceramic resonator) is correct for both micros, but the 644p doesn't mind the wrong setting nearly as much as the 1284p. I've still got more tests to run on it, so I'll update as I go.

Monday, December 26, 2011

RobertShaw HV SP715A furnace ignition module

House call today, a furnace wasn't heating, seems this usually happens on a bitter cold weekend, that's a holiday, and usually after any store that might have be open earlier is closed. Today's wasn't quite that bad, but I have to say it. Anyway, here's the run down from the phone conversation:
  • Pilot was lit
  • Thermostat was calling for heat
  • Breakers were on
  • Main burner wasn't coming on
I was thinking a bad limit, transformer, or gas valve (not much else on a simple pilot furnace)., But when I arrived I found the furnace was actually a HV (Spark) ignited furnace.

Sorry about the quality, cell phone in basement, at least I took a picture of it.
The  Robertshaw sp715a control box:
  1. Turns on the pilot gas
  2. Jumps a spark until it senses a flame
  3. Turns on the main burner
Since it wasn't trying to light the pilot (audible clicking and a visible spark in the pilot area) it had detected that the pilot was lit, but for some reason the main burner was off. A quick check with a multimeter verified 28vac at the pilot terminal, and about 2vac at the main burner terminal. I was trying to pull the thermostat wire off the control when the main burner suddenly lit! Surprised, I let go and pulled my hand out as the burner shut off. I tried it again, confirming when I pulled on the wire (and flexed the PCB it was connected to) the burner came on.

You can't really see them in the picture, but 2 of the solder joints on the big black relay that controls the main burner were cracked. I had to run to a store to buy a soldering iron (a $6 firestarter), but it was quicker than driving home to solder them. I resoldered and reassembled the furnace. They've got heat and didn't have to buy a $100 module (or wait in a cold house until I could get one either).
Steve

UPDATE: A Few Links




Wednesday, December 14, 2011

Sanguinololu 1.3a - Part 1: Build

See Also:
Part 2 -  Trouble in Paradise
Part 3 - Not Out of the Woods Yet

I've been playing with electronics a bit lately. I've built a bench power supply and an ESR Meter.

I make a case for the Power supply out of an old atx psu case, but haven't found a good one for the ESR meter.

Then I found the RepRap. Of Course! Why buy a box for $5 when I could build a machine that would print me one for just $500? So it was settled.

Oh yea, my brother is building a cnc machine and after the tedious job of wiring up those two projects a cnc pcb router seemed like a really good idea. I'm not sure if the reprap frame is sturdy enough for what I have in mind, but I'm going to build something along that line. Of course the most fun part of the whole project is the electronics. After looking around a bit I decided to build a Sanguinololu to control the machine.

I bought bare PCB's, and assembled pololu (stepstick) boards from ebay, all the components from Mouser (BOM from the Sanguinololu page)

The FTDI Chip Installed:
The USB jack and related Components:
The Pololu Headers, decoupling Caps, etc:
I'm really bad about taking pictures, I am improving, but at this point I got busy and stopped taking pictures, so we skip way ahead to the completed board:
The Pololu Drivers arrived the today:
The Pololu drivers came with tiny heatsinks, here is the completed board, drivers and all:

I did one Sanguinololu for my brother and one for me, the first took about 6hrs, the second about 2. I had some trouble and I'll cover that in another post.
Steve