Jump to content

Headache


esaj

Recommended Posts

6 hours ago, Rehab1 said:

I love coming over here to see more of your ongoing projects! I get a headache watching your headaches. Bet you 5  bucks I already know your next project: Edtracker wireless version. ?

I admit I did think about it (making a wireless version), but that would make it much bigger (On top of the Micro and MPU, it would need a Bluetooth-module and a battery), so it could become somewhat large and unwieldy. For the time being, I'm not going to chase after that, as I try to limit starting new stuff before I get some older projects out from the loop (or decide to abandon them instead of keeping them perpetually waiting for rework or something :P).

Last couple of nights I've been toiling away at this:

C92GXaB.png

s9OrKfn.png

It's a circuit I already designed sometime in the spring, a mosfet-based full-bridge (H-bridge) motor driver for the balancing robot. In the end, I needed to add 4 jumper wires, marked as front-side copper traces on the board, but I'm milling it as single-sided and then using wires to connect the vias.

The robot's been on hiatus for about half a year, as the ready-made L293N-based dual H-bridge and the first BJT-based motor drivers I designed and built still kept having overheating problems, plus they didn't give much torque (probably due to voltage drops in the BJTs themselves). I did build ONE of these drivers on a protoboard before, but never got around to do the second one (the robot has two motors, so two drivers). Now that I can mill my own PCBs, building it isn't that much of a hassle (but it's still a relatively large piece of hardware, almost 60 components... not to say that 60 components is "that much" in reality, complex boards can have hundreds if not thousands of components, but when working by hand... :P

 

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

Replaced the motor with a faster one (and attached an ER11A-precision chuck on the new motor first, which on itself was an "interesting" journey, that required 450-degree Celsius soldering iron heating it up several minutes and a hammer...). There actually might be a slight problem... the new motor could be too fast / powerful, trying to throw it into full throttle won't work (the motor will draw too big current spike and just moving jerkingly). Rising the rpm's slower it works, but I'm actually a bit scared it might blow something:

EDIT: Btw, that's not full speed yet...

 

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

The reason I've been mostly quiet this week is that I've been busy with "normal" boring stuff (you know, eating, sleeping, working, grocery shopping etc), and I ran of course into trouble with the new motor. I was afraid it could blow something up when testing Monday night. Well, it did do exactly that: blow the mosfet of the control board. Actually, how that happened in the end was that I tried to do a test cut using one of the very first test circuits I had used, and didn't check the G-code... the very first command was to drive the spindle down to around -20mm on the Z-axis. Apparently at that point I still hadn't learned how to properly probe & set the "zero Z", nor how to make the G-code like "it's supposed to", so I had just screwed around and found "something that works", which apparently had been setting the zero-G point about 20mm above the PCB-board. The end result was that the spindle bored itself into the sacrificial wood block beneath the PCB and came to a very sudden stop. After that, trying to spin the spindle would just jerk it around, and the "24V" & "12V" leds on the board would blink on and off. The software-side still worked, as the chips are powered directly from the USB-port.

I suspected at first that the step-down circuitry that turns the 24V input from the adapter into 12V for other uses (driving the steppers) had blown something. Couldn't figure out any problems with it just by measuring, but then I measured that the mosfet driving the spindle, and it had short circuited completely. So probably the stepdown was turning on, then turning off as it detected a short circuit and stuck in a "loop" of sorts. The mosfet was just a basic IRF 540N, which I have something like 30 pieces laying around, so problem solved! I'll just replace the mosfet and be good to go again.

UbOrotY.jpg

The original mosfet used a different packaging, and the back was soldered to a tinned plate on the board. I just used a heatsink, as there was a "normal" drain-pad too. One of the stepper-drivers (the red boards, they're actually Pololu A4988 stepper motor driver carriers, which you can get around 70 cents a piece of Aliexpress) is missing, I removed it to get better access while desoldering the old and then soldering the new mosfet.

Powering the controller from the power adapter, the 24V & 12V leds came on and stayed that way. Good. I installed the board back to the casing, wired everything up and connected to the controller from bCNC. The motor started jerking again and looking at the lights, yep, blinking again. For some reason, the original controller spins the motor for a brief moment when connection is made (maybe they've saved it into the "start up"-commands you can set up into the grbl-software). Apparently trying to drive the motor would again break the controller. Shit. Maybe there was something else wrong with the controller too. After a while I managed to find two sellers on Aliexpress that sell this exact controller, and the prices were 27.xx€ for one and 28.xx€ for the other. It doesn't sound that bad probably, but there are a couple of issues with that: I'd have to pay VAT, as the price exceeds the around 22€ -mark, below which no VAT needs to be paid, and it would take at least a couple of weeks for it to arrive.

The third reason was that I had expected it to be much, much cheaper. Why? Let's take a look at the board. At the bottom left corner, where there's the USB-port and pin header rows etc, there are a few chips and some other components. Closer inspection of these reveals that it's basically a stripped version of an Arduino Nano built directly onto the board, which makes sense, since it uses the grbl-open source CNC-controller software. A Nano costs around 1.70€ at cheapest (in Aliexpress, which means that the manufacturing costs must be much lower for them to make profit to sell it to me at that price with free shipping!). On the top left there is the input jack for the 24V adapter, spindle/laser driver, basically a mosfet and some supporting components. Those cost <1€ total. The Pololu drivers on the top right and their supporting components are a straight rip-off from the Arduino CNC shield, which, with 4 drivers (although this 3-axis machine of course only needs 3) can be get at around 4.50€. Finally, on the bottom right corner, there's the step-down buck-converter to make 12V out of the 24V (or up to 35V) input for the Pololu's & steppers. The components again can't be much more than 1-2€ "on retail", and much cheaper for larger-scale manufacturing. Of course they had to design the board, but still, the manufacturing cost must be peanuts compared to the almost 30€ price (actually, with VAT, it would have cost me around 35€, or much more, if I had decided to take a faster courier).

It just so happens that I have a couple of Arduino CNC-shields and a bunch (12?) of Pololu A4988's. Before finding this CNC machine on sale, I had played around with the idea of building my own from scratch, but that plan fell dead on the prices of the linear rails/guides/sleds and other mechanical parts (a proper ball-screw can cost >100€ alone). I already had uploaded the grbl-software to an Uno earlier when testing some steppers and put the CNC-shield on it, so I hooked it up to the machine, powered it from the battery-PSU with a LiPo (it has a fuse, so it shouldn't blow up in my face :D) and tried to drive the steppers. No problem there, except of course the settings weren't correct (ie. the number of pulses per millimeter), so it didn't move the bed/spindle head amount I asked it to. Luckily, anticipating possible problems with the controller, I had checked and saved the settings from the original a few weeks back (plus, since the Arduino-side of the controller still worked, I could have done it at this point too). In case anyone needs the info sometime in the future, the settings are basically the defaults, other than the steps per mm, which is 800 and the Pololus are configured to the smallest microstep (1/16th), with the Arduino CNC-shield that means that all the pin-headers below the Pololus must be shorted with jumpers.

After this, I had regained the control of the steppers. So far so good. Now I needed a way to control the spindle-motor. Running a basic brushed motor with PWM-signal should be simple, right? I hastily designed the next circuit:

PQz1TsO.png

V2 is the 5V PWM-pulse from the Arduino, V1 is the power to the spindle and the gate of the mosfet. Gate is driven by a complementary push/pull -BJT-pair and the resistors R2/R3/R5 are just for limiting current. Q3 & Q4 are needed so that the gate voltage goes up and down with the PWM (ie. when PWM goes down, the gate goes down etc). R4 & C1 are my bad attempt at figuring out how to do a RC-snubber (it turns out that getting correct capacitance and resistance-values for the snubber isn't that simple, and in the end I left it out), and D2 is for the motor "free-wheeling" (ie. when the pulse goes down, the coil magnetic fields collapse and cause a high transient negative voltage, which needs to be dissipated). D1 is just to protect the power source from the transients, should the diode not react fast enough, and in the real circuit, I moved it after the Q2 on the main rail.

18V was chosen because I cannot drive the gate to 20V or above (it will break), and because the motor was sold as 18V (actually, the specs sais 11.5k RPM @ 12V and 18k RPM @ 18V). Although I was happily driving it with 24V before during the earlier tests...

The makeshift driver was built on a stripboard and cutout:

ErYGwiI.jpg

I then salvaged a 500W ATX-power from an old computer to get the 12V voltage for the steppers (I didn't want to drive it from the LiPo-pack for a longer while ;)) but didn't have anything that I could get 18V out from "straight-out-of-the-box". I then tried to drive the spindle motor too with 12V from the ATX. It did run, but not very fast. I did some tests both with the original and the new motor, but wasn't really happy, the RPM was too low and the cutting wasn't clean (the protection diode also drops the voltage further). I tried to use a booster to get up to around 18V, but ended up seeing smoke coming from behind the machine... the wire-sheathings of the cheap molex-adapters I used to wire the board were melting! Too high current draw... I also tried to step-down the 24V input from the adapter, but that didn't work too well either (actually, I don't even remember what the problem was with that). At some point, I also got smoke out from the original motor... don't know if the brushes overheated (it kept getting really hot as it was running too slow for the fan inside the motor to keep it cool) or if it actually burned the enamels off the coil-wirings, haven't actually tested it since. After spending an evening and a night with these tests I gave up: I'd have to make do with the 12V and the newer high speed motor to mill a board for a better driver circuit.

I used KiCad to design the board:

a1Ow4f8.png

There's a few bypass caps at the inputs (12V & 5V), separate output for cooling fan with protection & freewheeling diodes, and separate inputs for the spindle power (both with DC-jack, like the adapter uses, and plain screw terminal). I didn't try to design the RC-snubber for the motor, but instead went with 10A10 (1000V / 10A continuous, a bit overkill maybe ?;)) diode and 75V TVS-diode (all I have are 75V and 12V TVS's, and 12V was too low). There's also a pulldown resistor at the gate and I replaced the transistor to which the PWM-signal comes into with an optocoupler to isolate the PWM / Arduino from the rest of the circuit.

n2PhtnN.png

This is an earlier screenshot of the layout, some of the resistor values have changed since and I hadn't added the gate-pulldown at this point yet.

The first attempt at milling this board didn't go too well. I first tried with 90-degree V-bit and 3-pass milling to get better isolation width, but the end result was lousy, with copper bits rammed into the milled cuts causing short circuits. I re-ran it with 30-degree bit and a bit deeper cut, with the end result of some of the smaller pads and traces disappearing almost completely. The edges if the cuts were jagged and had pieces of copper dangling. I tossed the board.

Second attempt with slower feedrate, 2 passes and 30-degree bit worked. The edges weren't clean this time either, but I was relieved to see that after sanding it a bit with 1000-grit sandpaper, the bits on the edges were just on the surface and the cuts were straight and clean underneath. For a moment there I was worried that the entire motor was moving back and forth so much that trying to get higher RPM would be pointless, as it would probably have even larger runout.

After soldering the components on the board, I first thought that I had overheated the optocoupler, as it looked like the signal wasn't coming through. After some measurements and testing I actually found out that the resistor on the PWM-input side was too large, and I needed to allow more current to flow. Dropping that to 1K solved it and I could drive a small DC-motor with it using 5V voltage. So far, so good... But what about the actual bigger motor?

I dug up a 20V / 6A adapter I had forgotten about (I "salvaged" it, along with the battery cells, from my cousin's broken laptop). Wiring everything up, I crossed my fingers, powered things up and connected to the board via bCNC. Firing up the spindle it started to run. Actually, it started to run very, very fast, much faster than the speed setting should allow it to. Trying to turn it off from the software, it just kept spinning. I pulled the plug. Shit. I was already pretty sure what I was going to find out, but nevertheless started measuring the board. Sure enough, the mosfet had shorted totally. Gate, source, drain, all in short circuit. Checking around the mosfet failure modes, I had a pretty good hunch what had happened: despite the diodes, the source voltage had dropped far enough into negative-range during the start up of the motor to pull the source and gate voltage difference to 20V or above, and the gate insulation had blown, shorting the entire thing.

Time for some late night emergency surgery. I replaced the mosfet, and added a 15V zener-diode and 20 ohm 0.5W resistor (value picked by more or less back-of-the-envelope calculation of maximum of 5V drop over the resistor to limit the current to 250mA max), hoping it would be enough to keep the voltage difference in check:

QkRWPUe.jpg

Not pretty... I swear the solder-job on the mosfet was much better before I had to desolder the broken one and solder a new one in! :D  The text was screwed up by the milling, the slow RPM seems to more like "tear" than cut the copper.

This is the component-side of the board, taken after replacing the mosfet (again, I swear the mosfet was straight on the first go, now it's a bit crooked ;)):
oQxvKwy.jpg

Love the "batwing"-heatsink, although it does take up a lot of space and is probably very much unnecessarily large for this anyway :D

So was that enough? Did the patient survive? After running some tests on the "fixed" board, yes, it runs well, the spindle speed can be controlled and nothing has (so far) blown, even when changing the speed up and down fast :) Also, no "higher speed" startup seems to be necessary as it was with the original controller and the new motor (I needed to first put the speed almost to max to get the motor spinning, and then could reduce it). Now, the next step is of course to make yet ANOTHER controller board, so I can add the zener & resistor "properly" on the board. Another thought I've had was to make it actually possible to control the spindle-speed with simply by a 555 to produce a PWM-signal and controlling the duty cycle with a potentiometer, the "software control" isn't really that necessary, as FlatCAM doesn't add spindle-speed commands on the output file, except for turning the spindle off at the end of the job (plus I don't bCNC lets you change the speed during milling, which could be handy at times).

The smart thing would have of course been to leave "well enough alone" from the get-go and not even attempt to put a higher speed motor on the CNC in the first place :P  But, hopefully after all this I'll have just as good (or maybe even better? One can hope... ;)) milling results as before, except I get work done quicker, as higher RPM means I can use higher feed rates. Even if higher RPM causes too much runout, I'm fairly certain the results will be at least good with lower RPM, and at least I'll have a working machine again :D  We'll see...

Edited by esaj
  • Upvote 3
Link to comment
Share on other sites

A nice 12-hour session later, I have re-designed, milled and soldered another controller:

kK2O0fJ.png

To save space, I first changed the bypass-caps at 12V and 5V inputs to smaller ones, the 2200/1000uF ones were probably overkill anyway. Left out the 12V output-connector, as I really have no use for it, at least for now. I then added a 47 ohm (the schematic says 22ohm, but I changed it ;)) gate-resistor to limit the current passing through the push-pull -transistors, added the resistor & zener to keep the gate-voltage in check and added a hefty 4700uF / 35V cap at motor power input (the idea is to help with the huge current draw at motor startup). Also, I wanted to be able to control the motor speed manually, so I put in a simple 555-based PWM-circuit. The layout got a bit tight, but I managed to cram everything in there:

BtozgvE.png

I milled the board, but only at 29% duty cycle (which means about 5.25k RPM), I really wish I could have changed the speed to higher while the milling was still in progress :P  Slight jagged edges at 150mm/min (2.5mm / second) feed rate, but got it all out with the 1000-grit sandpaper. The cuts were OK, but clearly I should have used more RPM. The old motor was doing fine cuts at that feed rate with 7000RPM (max speed), trying to go higher feeds it wouldn't do that good either. There were no problems running the motor over the drilling (5 different drill-sizes) & milling, total of about a 40 minutes of running. No visible runout at these speeds yet (I used a loop to check the traces afterwards, but I don't have anything like a microscope with sub-millimeter / micrometer scales or such to see it really precisely).

After building and testing this (my gf's already asleep, so I couldn't test it with the actual motor because of the noise it makes), I did notice a small design error: I've added a pinheader so I can put a jumper to enable the PWM from the internal 555-circuit, but forgot that I should have added another jumper to connect the optoisolator input-side ground to the board ground. Luckily, as I have the connector for the external PWM, I could just jump the optoisolator input ground to the board ground with a jumper-wire:

lotmW5t.jpg

The PWM frequency of the 555 is rather high (around 20kHz) compared to the GRBL default (3.9kHz). I'm interested to see if it will diminish (or add) the audible (and LOUD) noise while running, or cause other problems. Changing the frequency requires replacement of one capacitor (C6 in the schematic), but it's not that hard.

I had to lose the "batwing"-heatsink, not enough room, but I doubt the heat will become a problem. The 12/5V input connectors have both grounds in the middle, because that's the order of wires in the ATX-power cable. I'm slightly worried if the 35V cap might blow, although that would require the motor power ground-side to be pulled somewhere around -15V, at which point the mosfet gate will likely also be gone already... :D  Probably should encase the controller, or at least run it inside some sort of casing for the first tests, I do plan to encase it eventually anyway (that's why there's the "Fan out"-connector, so I can add a fan like in the original box). Although even the original controller used it, I have doubts about how well that DC-jack can handle the large currents in the long run.

After I get testing and encasing out of the way, I need to make proper connectors & wiring to the motor, the current blade-connectors I've used aren't really a good fit on the motor blades. I've also planned to add some small (1..10nF?) caps on the motor itself, between the terminals and from each terminal to the motor body. This should diminish the motor (electrical) noise, but increase the current draw a little bit.

 

Edited by esaj
  • Upvote 2
Link to comment
Share on other sites

Happy to report that the spindle motor driver works without a problem, and I managed to (after about 3.5-4 hours of testing and re-testing and adjusting things) to get proper cuts from the machine:

rImZu4I.jpg

8 cuts of the same circuit on two different types of PCBs. They are made in order from left-to-right, top-down, starting with the the left-side board.

5GrqhVG.jpg

Close up of the first board (sorry, the picture's upside down :P)m I was getting issues with large runout and rough (jagged) edges on the cuts, the bit was clearly "shaking" back and forth during the cuts. I've adjusted the speed gradually along the job (as I now can control the spindle speed on-the-fly with the potentiometer), that's why the quality gets better or worse as the job has progressed. I also played around with the feed override of bCNC, but had very mixed results (it seems the feed override itself is a bit buggy).

 

dm4mHEC.jpg

Second board, again the picture's upside down. First cut (on lower right, as the picture's upside down) was done with slower speeds (to lower the runout), but in the end I made it too slow and the tip of the V-bit chipped (that's why the last two pads & traces are missing, the bit no longer touched the board).

I then changed to another bit and this time moved the bit much deeper into the chuck/collet (earlier I had the bit protruding out a lot from the chuck), which finally got much better results on the edges (yet the cut isn't actually deep enough there). Third one (lower left) I stuck the bit way too deep into the collet (so only the very tip was protruding out, maybe 5mm worth :D) and also tried to adjust the cutting depth, but that didn't go so well (too deep cut). The final cut (upper right) was just perfect: no jagged edges, clean cuts, no runouts... I was again making the spindle run faster about every two pads, but the cut was consistently good.

Close ups (sorry for the angle, trying to shoot directly from above the loop and camera would shadow the board:

GYyRLeN.jpg

The very first cut, horrible results. At places the runout has removed the traces completely. Jagged, rough and uneven cuts, strong runout.

YxjWENt.jpg

The very last cut, sharp, no jagged/rough edges, just like before on the old motor.

I could probably now start to go to higher feed rates, as I can clearly push up the RPMs without too much runout, but first I'll likely need to encase things and make some more proper wiring for everything...

 

 

Edited by esaj
  • Upvote 3
Link to comment
Share on other sites

Didn't have much time/energy to do stuff I want to this week... nevertheless, here's the highlights (no Hunka, no nudity... yet):

5sANL9B.jpg

Test circuit cut with 800mm/min speed. That's over 5 times faster than before. The board hasn't been cleaned or sanded in anyway, only quickly vacuumed (most of) the chips off from the top before taking the picture.

brzB2SC.jpg

A bunch of small (26x9mm) circuit boards cut on a 50x70mm copper clad for a friend... unfortunately, I screwed up with the milling depth here, and not only was the cut quality bad, there's short circuits in almos every traces. Tossed the boards. Btw, those letters are about 1mm tall (about 0.04 inches).

Another picture to give some scale (there's a TO-92 -packaged transistor and a "normal" 0.25W through-hole -resistor next to them):

eetCe7A.jpg

Lately I've ordered some SMD (surface mount) components. Earlier I didn't want to get and use SMDs, because a) they're hard to solder, B) they don't play nice with strip-boards, and you can forget about trying to use dot-matrix boards and c) they're hard to solder. Did I mention they're hard to solder? Yes, they're hard to solder.

Anyway, now that I can make my own boards, I've actually started to think that while they're hard to solder, they're not impossible to solder. So, I quickly designed that same above circuit (it's actually a really simple led-driver), but using the SMD-components I had available instead:

uqGBcZg.jpg

Again, there's the TO-92 transistor & "normal" through-hole resistor for size-comparison, the entire board is about 19x8mm (0.75 x 0.31 inches). The SMD-resistors inside those strips are 1206-size (imperial code), which actually isn't that bad. The LED next to the board (that small yellow/greenish thing) is 0805-size. Finally, the 2N2222-transistor is in a SOT-23 package. To give you a better idea of the SMD-sizes:

2000px-SMT_sizes,_based_on_original_by_Z

I also have some LEDs in 0603-size, but I doubt I can (yet) solder those. Some people who have very steady hands have been actually capable of soldering 0402's by hand (and a microscope). I doubt I'll ever reach that level.

vjWuvPU.jpg

I actually managed to get the components there, and didn't even destroy any of them (small components heat up quick, and especially the transistor can easily get burned during soldering). The empty place in the middle is for a bypass capacitor, but I don't have any as SMD-components yet, plus it's not strictly necessary for this to work.

Qf4rsHF.jpg

Actually, there's a reason I want to learn to solder using SMDs, I promised to build a distortion pedal for a friend at his wedding. Well, I've got the circuit working on a breadboard (a simple diode-clipper distortion + echo/delay from here:  http://www.valvewizard.co.uk/smalltime.html ), but the problem is that using through-hole components, I cannot fit it into the cast aluminum case I bought for the pedal. So I have to use some SMDs to get it to fit (but don't have all the parts yet, especially since the echo/delay requires a lot of capacitors).

I'll do a video of testing the pedal circuit... some day.

 

 

Edited by esaj
  • Upvote 2
Link to comment
Share on other sites

1 hour ago, esaj said:

Didn't have much time/energy to do stuff I want to this week... nevertheless, here's the highlights (no Hunka, no nudity... yet):

<Slightly disappointed once again but waits patiently>  :(

Couldn't you at least make an electronics bra?

electronicsbra.jpg

Or maybe convert the CNC to a CNC and T (attoo)!

d94b5d36a0f27fe073b0b98800bc76d2.jpg

Edited by HunkaHunkaBurningLove
  • Upvote 3
Link to comment
Share on other sites

On 10/22/2016 at 5:51 PM, esaj said:

Actually, there's a reason I want to learn to solder using SMDs, I promised to build a distortion pedal for a friend at his wedding

Awesome. Would love to see the finished product and video! Is your pedal the same as the Wah Wah pedal? Peter Frampton was the father behind developing that pedal. 

 

  • Upvote 1
Link to comment
Share on other sites

4 hours ago, Rehab1 said:

Awesome. Would love to see the finished product and video! Is your pedal the same as the Wah Wah pedal? Peter Frampton was the father behind developing that pedal. 

Nothing as complicated as a wah-wah or a talk box, just a pretty "basic" diode-clipper (op-amp driving the signal to high enough for the diodes to start clipping off the tops of the sine-wave halves) and a echo/delay circuit that was someone else's design ( http://www.valvewizard.co.uk/smalltime.html ). 

The diode-clipper itself is a pretty simple circuit, I've added some annotations here:

xiC63Vm.png

The guitar outputs a low amplitude sine-wave (I've used +-0.3V for the simulation, it actually depends on the kind of pickups, length of cables etc). First there's a large ohm "click killer" -resistor, it should stop "clicks" from sounding when connecting/disconnecting the guitar cable. Next part is a decoupling coupling capacitor (on the "guitar-side", there's an AC-signal, but on the other side, there's a DC-biased signal for the op-amp). The signal is passed through a low pass-filter, and DC-biased to around half the VCC (typically 4.5V, as most pedals are used with 9V batteries). The DC-biased signal is then passed onto a simple op-amp amplifier and the amplified output is again turned to AC-signal via a decoupling coupling capacitor. If the AC-signal amplitude is high enough, the two diodes (red leds in the above schematic, I found those sound pretty nice) will start clipping the tops of the sine wave peaks. The more the signal is clipped, the more distortion. After that's, there's an adjustable filter (for tone-control) and finally a potentiometer acting as a voltage divider to control the volume. The values of that schematic probably differ somewhat from what I've used in the actual circuit on a breadboard, as I tried different values, different diodes etc. Also, the final pedal will of course have a stomp-switch, but I haven't even decided whether to use true bypass or if I should amplify the non-distorted signal also (to keep the volume levels the same with or without distortion).

Here's a non-distorted signal (the amplitude isn't high enough for the diodes to start to conduct:

X2C560m.png

Once the amplitude reaches the forward voltage drop-values of the diodes, the tops will start to clip off:

JmEclFo.png

This looks actually pretty extreme, as the signal looks more like a square- than sine-wave :D  The "amount" of distortion is simply controlled by controlling the amount of gain (amplification) of the op-amp amplifier.

I actually just today picked up an old toaster oven so I can build a reflow-oven from it for the SMD-boards, but I still need to wait for a K-type thermocouple (up to 700C) so I can build the temperature controls...

 

EDIT: changed "decoupling" to "coupling", I always mix up the terms and end up getting them the wrong way around... :D

 

Edited by esaj
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 2 weeks later...

I missed the anniversary of this thread (started 20th December 2015) yesterday... I've learned a bunch of stuff over the year about electronics and circuit design in general, but still there are long ways to go. Complex circuits and especially "frequency-related" -stuff still goes over my head, but I'm getting the grasp of things little by little.

I don't think I ever mentioned it, but I abandoned the analog function generator in the end. The problem was that either the optocouplers I used to select the timing capacitors leak, or it simply picks up interference (or maybe it's capacitive / inductive coupling or some such somewhere), and ends up distorting the sine waves at certain frequencies. Since the board was a real pain to make (using a stripboard), I didn't try to rebuild it again (then again, I didn't have a CNC machine at that point).

I still did have the AD9851-module, which is a DDS-signal generator, capable of producing sine wave up to around 70MHz. I've now started to design a new function generator around that, but the high maximum frequencies and wide bandwidth (0-70MHz) do produce their own problems with the board design, as high frequencies can cause all sorts of black magic, and need more special board design to prevent distortion, noise and interference. After bugging an IC-designer (you know, a guy who actually designs the innards of those tiny chips, and knows a ton about really small scale RF-design) about the board design and possible caveats, I came up with this (although he did say that I could still easily run into problems with noise, and suggested that the board should be factory-produced to very small tolerances to prevent problems :P):

Ov1iXbh.png

Nothing really fancy here, basically there's the ready-made AD9851-module and hardwired serial-mode enabling for it, 5V regulation from the input voltage (which will be something like 9V...20V, depending what I'm using as power source, batteries or the PSU) for powering the AD9851 and the comparator and "straight" output -connectors for single square and one sinewave-outputs from the module. Only "more special" -stuff here is the amplitude & offset control for the other sineout and a fast comparator for the other square wave output, which also produces two opposite-phased outputs from the single input. Most of the components will be SMDs to keep trace lengths short and to minimize stray capacitance and inductance.

The board layout:

epnRkBz.png

Technically, this isn't even a "Radio Frequency" (RF) -board, since radio frequencies are more like 100MHz...several gigahertz. Nevertheless, wide isolation is used to minimize any interference between adjacent traces and most of the "empty" space is covered with vias to tie the SMD-side ground plane to the ground plane on the THT-side (ie. I've placed SMD-components on one side and THTs on the other side). Since I can't electroplate the vias, I have to use a lot of small pieces of 0.5mm copper wire, run them through the holes and solder them on both sides to connect the ground planes. Then most of the high-frequency traces should be more like this:

5100Fig01.gif

That's called a microstrip, the idea is to run a solid ground plane beneath the signal-carrying trace. I haven't even tried to guess the impedances and just go with it, I guess I won't see what will happen until everything's finished

Couple of renderings of the final board (there are no 3d-models for the potentiometers though):

dOz0dcc.png

O4fD0RI.png

Over the last couple of days, I've managed to mill the board, first time doing 2-sided board (although the THT-side is very simple):

Jlajwth.jpg

SMD-side with about 1mm isolation width, the pads for the SO-8 op-amps did come out a bit too small though, hopefully I can still solder those. Rest should be relatively easy, unless I still run into space issues. I've left out all the thermal reliefs to maximize ground contact, but that comes at the expense of having to use more heat, which could actually damage the components.

Since the board was cut out after the SMD-side milling, and I still needed to remove some copper from the THT-side, I had to come up with a way to attach the board for more milling without using the actual holders:

sepNfL5.jpg

Nevermind all the mess... ;)  Just checking that the board still fits on the sacrificial wood block without the danger of running the milling tip into the holders.

s0g5AfF.jpg

Preparing to drill preliminary holes for the screws that attach the board to the block. The position doesn't need to be that accurate here, as I built the toolpath from the gerber that I used for the original mounting holes on the board (ie. they come out at precisely the same locations).

TdYZ1Gk.jpg

Holes drilled with 2.1mm drill, I'm using 3mm wood screws to hold the board in place.

LiFKFJ8.jpg

Board screwed onto the sacrificial block.

lTRI2Uz.jpg

Milling in progress with 30-degree / 1.0mm V-tip. It turned out that the board didn't go 100% straight (there's a little play with the 3.2mm mounting holes vs. the 3mm screws), and I did have to stop and realign the position a bit (+-0.2mm usually) here and there. Luckily it doesn't need to be that precise, since this is only removing copper around the through holes that aren't supposed to tie into the ground plane to prevent any short circuits.

PEal9Pr.jpg

THT-side done.

And this is where I am currently, next step is to start soldering things on the board (starting from the most difficult task, ie. the SOP-8 op-amps). The actual control of the module will be made using Arduino Nano, which will also draw the display (either a 16x2 -character LCD or small OLED, haven't decided yet) and read the keypad that I've made separately. Originally, I was planning on using a rotary encoder + a bunch of buttons for control, but fell in love with the keypad-control on the new (used) PSU. It will be so much easier to punch in, say, 123.456kHz than entering the numbers one-by-one with a rotary encoder or such. I've also got some more grandiose plans (like separate ESP8266-based DDS built around 12-bit DAC for producing more arbitrary waveforms & digital logic signals, controlled from the Arduino, output AC-coupling for the sine-wave with different capacitances that can be selected via the control etc.) that I won't go into right now, but since I'm doing this as separate "module-boards", I have the freedom to add pieces as needed.

 

Edited by esaj
  • Upvote 3
Link to comment
Share on other sites

Unsurprisingly, didn't get that much done over the christmas and the week, the function generator works as intended (although I still might change a few parts), but still needs keypad + software + casing. Last night, I took a break off the larger projects and spent a couple of hours to create this:

KkfaeTN.jpg

Long story short, it's a small "joule thief" (a self-oscillating boost-converter) that can light two white LEDs in series (requiring around 6.4V) from a single alkaline (or NiMH or whatever) battery (1.0-1.5V depending on charge left).

gMNnZbo.jpg

8OygzZD.jpg

bIZP9Yc.jpg?1

Useless? Well, pretty much yes, maybe it could be used as a very small flashlight... but it's nice to actually do something from start to finish in one go on occasion :D

 

Happy new year!

 

 

  • Upvote 3
Link to comment
Share on other sites

Another wall-of-pictures, I've missed a bunch of some recent failur... projects for the last couple of months:

k2RmYbW.jpg

Couple of boards for a friend's synth-project.

 

KAabCHb.jpg

Dqgz8zf.jpg

A simple extension board for adding a serial static SRAM-chip (Microchip 23K256 / 23LVC512  or similar) with needed 3.3V/5V -logic level conversions to an Arduino I already made a couple of months back, never really used it yet though. :D I do have a project in the pipeline (still in circuit design phase) that will absolutely require extra memory, but it's going to need to be parallel, not serial SRAM.

 

KKB77AN.png

rM5UsDP.png

Autoranging volt/resistance-metering project from a while back, I didn't find a picture of the actual milled & soldered board... Anyway, this one failed on the resistance side to a design fault and I since abandoned it (since I have proper autoranging meters now anyway ;))

hteN6J4.jpg

The distortion/delay -effect board, seen in the video on an earlier post. I've worked on and off on this within the past weeks, but still have problem with the tone-setting (I tried to work around a design fault on the board, but unsuccessfully so far), as well as some problems with the repeat-setting of the delay/echo -side. Probably just need to bite the bullet & redesign it at some point :P 

 

xiKH0cN.jpg

Some test engravings on a flat aluminum bar. Maybe one day I'll engrave front panels for my devices ;)

 

At one point I decided I need a light table to better check the boards for short-circuits and such:

IOAVe2G.jpg

QlEtQBI.jpg

Basically just a bunch of leds in parallel/series and a typical 555-based PWM duty cycle controller (I seem to use that circuit a lot :D) for brightness control. The through-hole resistor's there because I (once again) made a bit of a booboo with the circuit design (nevermind the fact that I must have built at least 5 of those in the last year :P). I have a "frosted" see-through plastic cover for it, but haven't done the (wooden) casing yet, as I need access to a miter saw & other stuff in the garage, and it's winter time... Maybe by next summer? ;)

Around the time when I bought the bench multimeter, I ordered some precision voltage references (0.04%, 0.05%) for testing. This was the first time I worked with as small components as these... to be exact, I did work with SOT23-3's in the earlier projects too, but these were SOT-23-6's, ie. more legs in as tight space and these babies cost about 2-5€ a piece, so naturally I didn't have any spares (*cough*cheapskate*cough*). I didn't use solder paste at that time yet, and those were pretty difficult to solder with normal soldering wire... Luckily I didn't burn them though :D

U78i9zW.jpg

dZjoUuY.jpg

The soldering iron tip there is 0.8mm (about 0.031") chisel to give some scale.

d4HHd1F.jpg

Ln5pe7w.jpg?1

Encased for future use. Btw, the meter was off by less than those tolerances the chips have, so it's pretty much in check.

 

As for the current projects, here's a simple keypad with hardware debouncing using capacitors and pull-up resistors (for the function generator):

2Wrfcby.jpg?1

8K6R9W2.jpg

 

tf7KKnD.jpg

 

Snap-in parallel-to-serial -interface board, I went a bit overboard playing around with the cut out contour: :D 

xjVao0L.jpg

This was actually designed & done on 1st and 2nd of this month, but I was still living in 2016 ;)

gqghYbJ.jpg

MxRyozP.jpg

jAZRln0.jpg

08h6JT2.jpg

 

Lately I've had some trouble getting the RPMs of the CNC spindle "just right" to get proper cuts, so tonight I again branched off to another side project (that was just a one night thing, luckily ;)). Other than the encasing, this was really easy and straightforward, as it's basically just 3 connectors, two pots, some wiring and a button:

wR9vCma.jpg

uJEVdK6.jpg

I used two potentiometers, one is the "coarse" and the other one is the "fine" tune for the RPM. The other two connectors are just to ease with wiring the on/off button to the controller.

DwGvKpR.jpg

Encased and ready to rock. Getting the casing holes right took longer than everything else... the plastic of that casing is the kind that "doesn't play nice" with the milling bits (ie. it tends to melt instead of being cut), so I drilled/cut the holes by hand. The gray boxes seem to be relatively easy to cut in comparison, although with proper "large chip"-bit, feedrate and RPMs, it should be able to work with more "meltier" plastics too.

That's probably pretty much everything more interesting that I haven't posted about in the last couple of months... Up to speed, shall we say? A friend gave me an idea regarding the CNC control tonight, but I must resist, as I already have the function controller, the effects pedal and one mystery project that I haven't peeped about yet on the pipe :P 

 

Edited by esaj
  • Upvote 3
Link to comment
Share on other sites

:popcorn: 2017 and I'm still not quite sure what you're doing. <passes a couple of aspirin to @esaj>  It looks pretty good though.  Have you ever considered going to university to take a degree in electrical engineering?   I do hear though that the gaming industry is a mega-billion dollar industry so maybe it's better to stick with where you're at?

http://fortune.com/2016/02/16/video-game-industry-revenues-2015/

  • Upvote 3
Link to comment
Share on other sites

On 4.1.2017 at 5:48 AM, Hunka Hunka Burning Love said:

:popcorn: 2017 and I'm still not quite sure what you're doing.

Don't worry, neither am I ;)

 

Quote

Have you ever considered going to university to take a degree in electrical engineering?  

I did play with the idea at one point, but dropping everything to go to another 4-5 years of engineering school isn't that realistic option, plus Finland already has a fair share of unemployed (or employed in non-related fields) electronics engineers, after Nokia moved their design & manufacturing etc. Back when I studied to get my software engineering degree, there still was an electronics-line in the local polytechnic, nowadays they've quit it, and if memory serves, there's exactly one school (university) left in the other side of the country that still teaches electronics.

 

Quote

I do hear though that the gaming industry is a mega-billion dollar industry so maybe it's better to stick with where you're at?

For the time being at least, although if a suitable opportunity rises, I'll switch to a slightly different niche in the field...

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

@esaj Just thought I would pop over to your solitary room of confinement and poke my head in. @Hunka Hunka Burning Love is like me...we are amazed at your skill level. Way beyond my purview! Will there be some future unveiling of your completed projects we can all :cheers: toast to?

  • Upvote 2
Link to comment
Share on other sites

On 12/20/2015 at 3:44 PM, esaj said:

BerSvgx.jpg

Just spent a couple of hours on and off trying to find what's wrong with my half-bridges... <_< My head hurts, but I finally found 2 missing wires and one misplaced resistor in total, that caused the 2nd bridge high-side not to open. Oscilloscope and signal generator would be nice, had to go with nothing but cheap multimeter and 555-timer circuit to produce 25kHz square(ish) PWM. :P  Yeah, nobody probably cares, but I just had to vent a bit ;)  Now, I still need to build a 3rd similar half-bridge before I can try to drive a motor...

Ouch ... it hurts just to look at this, let alone thinking about having to make it work.  Good luck!

  • Upvote 1
Link to comment
Share on other sites

  • 3 weeks later...
On 6.1.2017 at 0:43 AM, Rehab1 said:

@esaj Just thought I would pop over to your solitary room of confinement and poke my head in. @Hunka Hunka Burning Love is like me...we are amazed at your skill level. Way beyond my purview! Will there be some future unveiling of your completed projects we can all :cheers: toast to?

Well, I still consider myself to be very far from expert, but I do have learned a thing or two over the past year or so. As for finished projects, well, I think the thread in its entirety speaks for itself (meaning: there aren't much that I consider really finished ;)). But at least there's one that can be added to the list though, from a couple of weeks back:

hVltdLU.jpg

7PNukLd.jpg

BR6beOq.jpg

Nothing fancy again, just a flashlight powered by two 18650 Li-Ion cells, got tired of the weak-powered and flickering (mechanical problems) cheapo-flashlights I have while taking the dog out at night (during the week, the streetlights go out at midnight and turn back on around 5AM). The circuit itself is nothing spectacular, just a bunch of 5050-leds and adjustable constant current sinks controlled by a quad op-amp, to keep the brightness-level the same throughout the cell discharge (it won't start dimming until the cells are almost extinguished). 

 

On 6.1.2017 at 5:53 PM, Chris Westland said:

Ouch ... it hurts just to look at this, let alone thinking about having to make it work.  Good luck!

Well, that's what started this thread. I did figure out the wirings in the end and got it to work with a small 3-phase motor (after building one more half-bridge and programming an Arduino to control them), but it never got much further than that. Maybe one day I'll get back to the world of motor control, but for now I've taken the long route learning electronics in general and doing all sorts of other stuff :P 

 

As for current projects, I did build that keypad earlier, now I've added display + software for the AD9851 signal generator, and ran some tests, not bad at all:

eCMFmAn.jpg

Pretty clean sine-wave if you ask me, running at 15.0123MHz.

qYeAzvW.png

123.456kHz signal with larger amplitude set up. The 2nd channel (blue graph) is the "normal" (non-amplified) output of the second channel of the chip (reversed phase).

jy12Lxk.png

 

83HXAIr.png

The adjustments work, the signal stays clean, but starts to drop in amplitude above 25MHz or so, the op-amp can't keep up with the slew rate at high frequencies (the GBW for the op-amp is around 200MHz, that is, the point where it can't amplify signal anymore, just follow it). The above pictures show that the signal starts to distort and has dropped it's amplitude at 25MHz and 41MHz.

Not sure where I'd need tens or hundred MHz of frequency anyway, but at least I now have a tool that can do it.

At lower frequencies, going below some tens of hertzes (40Hz?) or so, the amplitude also drops and the signal distorts somewhat, probably because of the electrolytic caps against the ground, I just today got some higher voltage tantalums to replace them, but haven't gotten around to that yet.

At really low frequencies (a few hertz and below) the result is pretty much unusable (the 2nd channel still shows fairly crisp sine though):

AAalQfZ.png

Also, I need to get a suitable-sized encasing, I've ran out of the "correct"-size (the same encasing the PSUs and the first failed analog signal generator used).

bp8DjTp.jpg

 

6QkWvqO.jpg

I liked the keypad on the programmable HP-PSU so much, that I made a similar input-system for the generator. It's easier to type in "15.1" and select the MHz-range than write "15100000". Or just "15" if you want exactly 15 megahertz, no need to type in the dot or zeroes... you get the idea, just a usability thing. But yeah, it's not encased yet.

I haven't gotten off my lazy ass yet to go get the encasing... :D And probably should replace the caps first anyway.

What else? I tried my hand at using even smaller components, namely 0603's and TSSOP-8 encased chip:

ozWPm6t.png

The block on the lower left hand corner there is a capacitor of 1206-size (3.2mm x 1.6mm) to give some scale, so double the size of what the actual resistors and leds on the board are:

s7Hcy4N.jpg

7TQL1iL.jpg

Nothing really useful, the leds are there just to easily see that it works. And it doesn't do anything else, except light up the leds when voltage is applied to the second connector (the chip's a dual N-channel mosfet with combined drains and sources, but separate gates) This is the smallest circuit to date that I've made by hand, it measures about 11.5 x 12.5mm (0.45 x 0.5 inches). The verdict? I'm not going to start using that small components unless I really, really need to due to board layout/size -issues :P Getting those soldered by hand without it becoming a huge mess is a real pain. I can solder 1206's with naked eye, with these, you really need a magnifying glass. I also "cheated" a bit by milling off any excess copper, otherwise it would have probably short circuited everywhere.

While soldering can be "fun" (sort of), or at least satisfying task, sometimes you just want to get the board done without spending several hours hunched over the board and soldering components one-by-one. I've mentioned before that I also bought a mini ("toaster") oven before, for making a reflow-oven. The parts have been lying around for some time, but I finally got around to start building the actual thing last weekend.

The first controller I did wasn't exactly success. It should have worked fine, but after I got everything together, the goddamn chinese Arduino Nano -clone I used fried its USB-chip. So I was stuck with a controller that can't be programmed (the program already in it kept running just fine though), and that I couldn't desolder from the board (due to the structure where the display would be sitting above the board, I couldn't use just pinheaders). Shame, since I used around 20 hours of work to design, mill and solder the board, and otherwise it came out alright:

oxW4MoV.jpg

rps9ILx.jpg

There's flux all over the board because I was trying to desolder the Nano to replace it, but gave up after a couple of hours... probably should have cleaned it up, but since I'm going to toss it anyway, I just left it. They'll dry and stick there over time.  I could have just milled another similar board and tried again, but decided that I don't want to run to the same problem again. So instead, I redesigned the board to work as an Arduino Uno-shield:

BKTJnmk.jpg?1

7wt0ZLe.jpg

The only fixed component (not counting the basic resistors, capacitors, regulator and such) is the level shifter module, which translates the 5V/3.3V voltage-level signals between the Uno and the display. There's an ugly piece of wire acting as jumper on the level-shifter, as I forgot a trace from the "final" design... whoops :D. The oven temperature is measured through a MAX6675-module and a K-type thermocouple attached to the back of the oven (which isn't exactly optimal, attaching it to the board being reflowed would be better). There's also a few pins for adding buttons, output for the SSR and a couple of unused extra-pins attached to the A4 & A5 pins (which also happen to be the hardware-I2C pins of the ATMega328P) of the Arduino, in case I find some use for them later on.

I did a bunch of iterations of the UI over the week, but I'll just show you where I'm now:

o2fo62t.png

This is an actual run from the oven, except the controller isn't yet really driving it (I have an SSR, that is a solid state relay, for that, but haven't encased it yet, and I don't want naked wires/connectors with 230V mains voltage laying around the floor ;)). The oven isn't as fast as I'd want (the profiles of most solder pastes suggest much faster ramps and shorter times), but after lots of trial and measuring, with the above "profile" it seems usable.

I gave up with the idea of trying to use PID-loop to control the temperature, as it will basically just run between 100% and 0% because the oven is so slow to "react" (it will take a good 30-60 seconds before turning on or off the heating has any effect, and even then the heat up/cool down is sluggish). So I made a simple state machine, where there are pre-defined rules for state-transitions (pre-heat, soak, ramp-up, reflow, cooldown). The red lines show state transitions, at this point I've just switched it on and off by hand when those occur, but minus the wiring, have everything set up to run the oven through the SSR. PID could maybe, possibly do a bit better, but tuning it would be a real pain for very little or no gain (running a single "loop" and letting the oven cooldown to room temperature takes a good half an hour, and tuning the PID would probably needs dozens of runs). So in fact, today I did the first run with a real board (still switching the oven on and off by hand).

I hastily designed a simple board with a single push-pull mosfet-gate driver using BJTs and milled it out, then applied the solder paste:

cST5GJD.png

The board is about 25 x 30mm (about 1 x 1.2 inches).

k4uM4RO.png

Placing the SMD-components on the paste pads with paste blobs.

HK7XnyR.png

All SMDs in place. There's one extra SOT-23 on the side, as I accidentally took too many out of the tape...

nBDElFb.jpg

The oven was about 10 degrees Celsius cooler than when I did the earlier test runs, so it actually took even longer than before. The solder paste profiles say that the peak temperature should be reached by 5.5 minutes at the latest, here it occurs around 8.5 minutes :P  The cooldown is done by opening the oven door, btw, seems pretty common practice with DIY reflow-ovens, as they don't cooldown fast by themselves.

2R8ID0Y.jpg

s5CTgbz.jpg

The board taken out of the oven, before any clean up. There's clear traces of non-evaporated flux there, but that isn't a cause for concern. Actually, I think if all of the flux would evaporate before the liquidus (melting point) of the solder, it wouldn't wet the surfaces properly. The joints do look a bit suspicious, as if all of the solder hasn't melted (seems like the surface is made of solder balls). But at least giving them a good scrub with isopropyl alcohol and a toothbrush didn't loose anything, so they have stuck:

FJmP2cp.jpg

Well, at least it looks cleaner. Still not that certain of the solder quality though. Measuring through the board, I find that the trace going to the gate of the mosfet is short-circuited to ground. No visible short-circuit is found with the light-table, the suspects are the pulldown-resistor and protection zener-diode near the right center:

PrDZyHI.jpg

Melting the solder and lifting up the components, the culprit is found: a tiny sliver of tin running between the trace and ground plane, probably splashed the paste as I pressed down the component?

BahHYMX.jpg

Here's a close-up with the light table:

llDGJPX.jpg

After fixing that, I measured no more short-circuits on the board. After adding the through-hole components by hand (a couple of connectors and the power mosfet itself), and testing it, it worked fine.

I'm still not 100% convinced that the oven will be good for actual projects, although not a total failure either. A typical "real" project board is much larger, meaning there's more thermal mass to heat up. If the insides of a component that has PN-junctions (like most ICs, transistors and such do) heat up too much, the component is destroyed. If the solder doesn't get hot enough, it wont make proper joints. There are some options I'm looking into (adding more insulation to the oven, adding more and/or more powerful heating elements, "boosting" elements by shortening the heating wire inside them etc), but I probably need to do some more tests before doing anything more "drastic". If it seems to work "good enough" for my own projects, then I'll just go with it, but I don't want to throw in a 100-component board just to find out that the extra time it needs to heat up causes the components to fry... :P

Aaand... That pretty much sums up most of my free time since last post :D

 

Edited by esaj
  • Upvote 2
Link to comment
Share on other sites

  • 4 weeks later...

I'm trying to catch up on the forums after being more or less idle for a few months, seems pretty hopeless... Anyway, I saw someone (@Smoother ?) mention spot-welding, and it just so happens that one of my numerous current projects is a spot-welder.

There are (at least) three common ways to make one: Rip out a transformer core from a microwave and rewire it a bit to get very low voltage, but lots of amperes on the secondary side, then you can use it from the mains power. Another way is battery powered, typically using a car battery, or maybe a car starter battery. In spikes, those things can provide pretty hefty currents (several hundreds to over a kiloamp, 1kA = 1000A), if there's low enough resistance in the path.

What I'm going to use is the third way: a capacitor bank (made from 10 or 12 x 47000uF/16V caps in parallel). Currently it's on hold, since the caps I ordered, that were supposed to be in stock a couple weeks back, won't be available until sometime late April or March <_<  Also, I of course picked the cheaper ones, it's always possible that the internal resistance on those will be too prohibitive to produce enough current, but even my prototype made with much smaller caps could do at least some small welds. And the better options would have been about 10 x more expensive (>200€ to caps for a "not-so-serious" hobby project? No thanks :P).

Capacitor bank isn't as good as mains or battery powered welder, as it can't hold the high current for very long, but it's also safer: even if your electrodes weld themselves onto the pieces and the mosfets break and keep on conducting when they should have already cut the current, all that happens is that the bank empties itself (which over a low resistance happens VERY fast, in a matter of milliseconds) and that's it. Assuming of course that whatever you were welding doesn't catch fire or explode, like could happen with overheated battery cells ;)

Anyway, with "low enough" internal resistance of the caps and lots of them in parallel (not to mention high capacitance) you can get "enough" amps for spot welding. The basic idea is pretty simple:

You have a charging circuitry for the capacitor bank to charge them to wanted voltage, which usually is relatively low, from a few volts maybe up to around 10+. Personally I've made a (prototype) controller that can charge the bank up to 12V max in about 1.5 seconds. Not much else than a constant current source, and inputs/outputs for a microcontroller to read the voltage and turn the charger on and off. Plus a way to (safely) empty the capacitor bank after stopping the use.

8xzKwDP.png

Simulation version of the entire thing, I think it's missing some components from further testing/design...

Then, the capacitor bank itself of course, due to the high transient discharge current, you need pretty hefty conductors like, copper pipe/bar (solid would be good) or thick copper cables (I've bought some 16mm2 -silicone copper cabling myself, it's about 5 AWG, capable of withstanding 27000A for about 30ms, negligible resistance, probably overkill ;)).

3G8JHas.jpg

The copper-side of a simple board I made for the prototype, it only has about 38000uF of capacitance though. For the final version, I'll use a bit different setup with 2 x 105µm copper thickness, that I won't go into here, as it requires a lot of handwaving and/or hand-drawn pictures to explain... :D

Welding electrodes, for prototyping I've used a couple of cheap soldering iron tips, soldered directly into ends of 4mm2 cables, for final version, probably broken/dulled tungsten carbide V-bits from the CNC. Or soldering iron tips, well see. Apparently I've never taken a picture of the electrodes or the welds I made...

The final piece of the puzzle is the circuitry that short-circuits the caps over the pieces to be welded. I've went with a mosfet-bank, the prototype has 5 cheapo-75NF75s in parallel bolted to a piece of aluminum flat for cooling, and a "keep it simple, stupid" push-pull -bank to drive the gates FAST to full conduction (rise times were something like 150 nanoseconds, fall time around 200ns or thereabouts, I have the actual figures / scope shots somewhere). I've used through-hole BJTs, as those can dissipate more power.

Or6ZUCE.jpg

TI0ZCV9.png

It's important to have adequate cooling for the mosfets, as well as fast rise- and fall-times, otherwise all that happens is the mosfets get destroyed by the current pulse if they "linger" in the partially conductive state for too long, as with high currents, for a very brief moment during turn-on and turn-off, they'll be dissipating several hundreds of watts (simulation says 700W with 1kA pulse), and for the entire pulse length, up to 100W, EACH, when in parallel. A single mosfet would probably say "bye bye" pretty fast.

The end result should be capable of:

- Charging or discharging (in a "safe manner" ;)) the bank to set voltage (up to 12V)

- Setting the length, as well as amount of pulses (ie. for example 2 x 1ms pulse with 1ms in-between), might be just a set of presets to choose from

-Optionally: detecting when the electrodes form a connection over something to be welded, detecting if the mosfets have short-circuited (ie. destroyed themselves ;))

I haven't got pictures of the whole prototype, plus it didn't weld that well yet... The "final" version will have 10-15 times higher capacitance, more hefty mosfets with 2 milliohm Rds(on) capable of withstanding 280A continuous current theoretically ("infinite heatsink", up to 1080A in very short pulses) each, 5 in parallel and a more intelligent charging circuitry. I've simulated it up to two 1 millisecond long pulses, producing 900A-1.1kA spikes (which I probably won't get in real life, as the resistances will likely be higher), at which point the pieces to be welded get about 9-11kW momentary power in spikes, or about 16 joules of energy in two one millisecond pulses, and it would seem that the components can take it, of course I won't see the reality until I can build the whole damn thing... And due to the capacitor stock-issue, that'll be a while.

 

Oh yeah, I've also (finally) got some cases, started encasing the signal generator:

zJkRqyv.jpg

I'll get back to that when I get it done...

 

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

  • 1 month later...
13 hours ago, Hunka Hunka Burning Love said:

:popcorn: Still waiting for the new spring season to begin.  Ever consider making your own hexacopter?

EDIT: Oh, about the hexacopter, the thought has crossed my mind sometime, but for now I'll still stay in simpler things ;)  Learning curve for the copters' isn't easy, as well as mechanical design and many people seem to blow up a lot of boards, components and motors before they get anything that actually can fly :P

I did make some progress with a (partially) new design for the pedal last weekend, but haven't had much time or energy to move on with it since...

9DSOD1B.png

The left-side is similar to before, click killer, coupling, some low-pass & bias for the op-amp input. I upped the values of the biasing resistors, as the earlier design used lower values, and was basically just wasting battery power (very small currents are needed for the biasing). Also added a small capacitor to keep the bias-voltage steady.

I moved the potentiometer (and added a resistor to get more logarithmic response) controlling the amplification of the op-amp feedback to another position, so I could get a steady frequency response on the feedback over R15 & C3. I'm not sure if it needs to go all the way to around the 20kHz range, as typical notes from guitar are somewhere between 80-1300Hz, but the guitar sound contains a lot of of harmonic overtones, so figured I play it safe and let it go all the way up.

The "attenuation/softness control" -part is something I stumbled into basically by accident. Different guitar pickups can produce a signal of very varying voltage, from around 100mV RMS up to around 1V (1000mV), although I think the latter value needs active pickups. Anyway, that part of the circuit was originally meant to attenuate the signal from the op-amp -amplification, in case the original signal from the pickups was already higher voltage (the clipping diodes start to conduct somewhere around 500-700mV, depending on current). What I then saw in the simulation was interesting, with the potentiometer "bypassed", ie. driven all the way to the other end, so that there's no resistance, the diodes clip in the "usual" harsh manner:

EF9cJe2.png

The different colored waves are for different amplification-levels from the op-amp circuit. This produces a "hard" clipping distortion, typical to what is used in metal and heavy music. But when the potentiometer starts limiting the current going through the diodes, the clipping becomes much more softer, and when taken all the way to other end:

LpPYKZh.png

The signal keeps more of the original sinusoidal waveform and the tops roll off more smoothly, producing a "softer" clipping more rich in tone, like "fuzz" or "overdrive", rather than "distortion". 

Although I discovered this by myself (and on accident :D), I don't think it's anything new, probably it's generally known and widely used method. Either way, I plan on keeping it there, although I might ditch the R16 (the lower part of the voltage divider), or at least change it to a much larger value (with the attenuation it causes, it can actually stop the distortion altogether with pickups giving lower amplitudes). 

The original version I did had a badly working tone-control, so I replaced it with something that's more or less ripped straight off from the "usual" tone-control circuits floating around the net. Basically it's a low- and a high-pass filter in parallel, and a single potentiometer acting as a voltage divider, to "mix" the output of the two filters. I liked the simplicity, only needing a single potentiometer (basically adjusting between "more bass" or "more treble") and the fact that it's easy to understand :P  On the treble-side, it does go too high for my use (pushing it all the way, the guitar sound is pretty much completely gone, as it cuts off the low frequencies entirely), so I probably need to cut it down.

The last part is an "active" volume control, typically there's just a single potentiometer acting as a voltage divider to set the volume, but as the tone-control circuit can attenuate the signal a lot, I was trying if I should instead give the possibility to also amplify, not only attenuate the signal, in case it gets too low. Testing with a breadboard and real guitar, the amplifying doesn't seem necessary, as the "normal" output of a guitar plugged straight into a guitar amp is already very low, so probably will just replace that with a single potentiometer divider.

I still need to try it out and play around with the values before making an actual board.

 

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...