Jump to content

Headache


esaj

Recommended Posts

3 minutes ago, lizardmech said:

The GE one appears to be missing a mosfet. Annoying.

That's some pretty bad luck, how has that passed QA? :o  What about the others, it would seem really improbable that all of the converters you received to be faulty?

Link to comment
Share on other sites

Can't get the 15v one working either for now I'll try tomorrow. Not much point since I needed the GE one to power it. What's the best way to get a common ground between a 40v battery and small power adapters? I have 15v 12v and 5v power supplies but they need a common ground because the MCU must monitor voltage on the power side via voltage divider circuits. I don't know how to get all the power supplies and battery grounded.

Link to comment
Share on other sites

8 minutes ago, lizardmech said:

Can't get the 15v one working either for now I'll try tomorrow. Not much point since I needed the GE one to power it. What's the best way to get a common ground between a 40v battery and small power adapters? I have 15v 12v and 5v power supplies but they need a common ground because the MCU must monitor voltage on the power side via voltage divider circuits. I don't know how to get all the power supplies and battery grounded.

Sounds like you specifically need NON-ISOLATED converters, they usually have the grounds connected, I've used for example these (note that your battery voltage will probably be too much for them, they only go up to 35V):

http://www.aliexpress.com/item/5PCS-DC-DC-Buck-Converter-Step-Down-Module-LM2596-Power-Supply-Output-1-23V-30V/2013251353.html

Measured with a multimeter in continuity-mode, the ground just goes straight through (same ground on both input- and output-side), the voltage conversion happens in the positive rail. There are probably similar converters available that can take higher input-voltages.

Another one I got (that's also non-isolated, ie. same ground on input & output) is this one, but it's not adjustable, 36...72V in -> 12V out:

http://www.aliexpress.com/item/Step-down-Transformer-Electric-Bike-DC-Converter-Adapter-36V-48V-72V-TO-12V-10A/32358226204.html

Look around, I'm fairly confident you'll find a suitable converter somewhere. Although I don't know how much trust you can put in the quality with the cheap stuff on Aliexpress, should you decide to order from there ;) 

Edited by esaj
Link to comment
Share on other sites

Is there a way to tie multiple isolated supplies to a common ground though? Like adding a wire with a resistor between the battery ground and the isolated dc supplies? All the small power supplies I have are isolated since they plug into mains power and have small transformers.

  • Upvote 1
Link to comment
Share on other sites

7 minutes ago, lizardmech said:

Is there a way to tie multiple isolated supplies to a common ground though? Like adding a wire with a resistor between the battery ground and the isolated dc supplies? All the small power supplies I have are isolated since they plug into mains power and have small transformers.

A common ground for isolated supplies is no problem - by the insulation there is no electric connection between the input and the output. So you are free to  to put all the output grounds together.

Of course you have to pay attention with the "main use" of the different output voltages, that there are no connections established which in combination with a common ground could cause a short circuit.

  • Upvote 1
Link to comment
Share on other sites

18 minutes ago, lizardmech said:

Is there a way to tie multiple isolated supplies to a common ground though? Like adding a wire with a resistor between the battery ground and the isolated dc supplies? All the small power supplies I have are isolated since they plug into mains power and have small transformers.

 

1 minute ago, Chriull said:

A common ground for isolated supplies is no problem - by the insulation there is no electric connection between the input and the output. So you are free to  to put all the output grounds together.

Of course you have to pay attention with the "main use" of the different output voltages, that there are no connections established which in combination with a common ground could cause a short circuit.

On a related note, if you plan on doing measurements with oscilloscope & (possibly) mains earth/ground -referenced circuits:

 

Link to comment
Share on other sites

15 minutes ago, Chriull said:

A common ground for isolated supplies is no problem - by the insulation there is no electric connection between the input and the output. So you are free to  to put all the output grounds together.

Of course you have to pay attention with the "main use" of the different output voltages, that there are no connections established which in combination with a common ground could cause a short circuit.

What about the battery though? I had an issue and wrecked a xt60 connector the other day, I think the large capacitor connected to the H-bridge had a very different ground to the battery, the  - pin on the xt60 battery connector was hit by an electrical pulse and melted when trying to connect everything else seemed to survive. Is it just a matter of connecting the battery first and grounding the isolated supplies to that?

Link to comment
Share on other sites

5 minutes ago, lizardmech said:

What about the battery though? I had an issue and wrecked a xt60 connector the other day, I think the large capacitor connected to the H-bridge had a very different ground to the battery, the  - pin on the xt60 battery connector was hit by an electrical pulse and melted when trying to connect everything else seemed to survive. Is it just a matter of connecting the battery first and grounding the isolated supplies to that?

??? Pfff... I have no idea what happened - maybe a schematics would help to get an idea what you are going to do.

Btw: Ground and "earth" have well separated distinct meanings in english? Or could they be used quite interchangably? 

Link to comment
Share on other sites

3 minutes ago, Chriull said:

??? Pfff... I have no idea what happened - maybe a schematics would help to get an idea what you are going to do.

Btw: Ground and "earth" have well separated distinct meanings in english? Or could they be used quite interchangably? 

Maybe it was just bad luck with the very large cap somehow. Watching the video esaj posted there should be no issue to ground them all together.

English speakers will mainly use earth to refer to something grounded to mains power. While they will sometimes use ground to reference anything connected to the negative terminal of a battery.

  • Upvote 1
Link to comment
Share on other sites

Ugh, anyone know of a fairly easy & straightforward software for designing layouts on strip-boards/veroboards etc? This took about 3-4 hours:

A58NQzT.png

Earlier, I've tried:

  • Blackboard
  • FreePCB
  • Pebble
  • Fritzing

And some others I've already deleted & forgotten... most have serious issues with usability, only support a handful of stripboard-models and no customization (notice that for example the board I'm using here is like this:

Free-Shipping-1pc-DIY-Prototype-PCB-Univ

 

) or just don't otherwise work. Fritzing would be otherwise ok, but the breadboard-view uses STUPID component icons, that strecth to the neighboring traces and cover other components (when in reality the component takes much less space on PCB) :angry:  So I'm still designing everything by hand on paper, which is otherwise ok, but when I notice I've made a mistake or otherwise need to move components, I have to erase half the drawing and start over...

Btw, I consider Kicad too complex for this, before someone suggests it ;)

Edited by esaj
Link to comment
Share on other sites

I actually found something semi-useable (finally): ExpressPCB.

c698pPR.png

 

It took me about 1.5hrs to do that. While far from perfect, at least the end result is somewhat decent (enough to see where the components go/count where the legs should be, is the resistor/diode supposed to be laid flat or body facing upwards etc. when laying the components on board).

Pros:

  • Creating the trace layout is easy & fast. I built that board tracing in less than 5 minutes
  • Components can be rotated (although in 90 degree angles only, but for me that's ok, I've actually tried some programs where you can't even rotate the components at all), and the component name/text can be moved around at will

Cons:

  • It seems to have only 1-level undo (undo/redo the very last action). Plus it can't undo some actions
  • All the pre-made components have set widths (ie. resistor legs are a certain amount of 2.54mm/0.1" traces apart). In the above picture, everything except Qx's (TO-92 transistors) and mosfets (TO-220) are "custom" made. Custom components are created by laying out pads, numbering them, then drawing the component "icon" on silkscreen & grouping the pads & drawing together. At least you can then copy-paste it for multiple components
  • If you "merge" the component pads to traces when placing it (it will ask if you want to), trying to move around the component after that will also move the traces it was merged to. Didn't find where to "unmerge", so to get rid of that, the component needs to be deleted
  • Absolutely anal about clicking the exact right spot ie. if you want to move the "end" of a trace vs. moving the entire trace or entire component vs. just name-text

Maybe some of these problems are just due to inexperience (hell, I found the software about two hours ago), and it's the best I've tried so far. Sadly, "the best" in this case means more that the others have been utter crap, rather than that this was the best thing ever...

Now I still need to check this against the schematic to see I haven't made any mistakes before building the board ;)

EDIT: Now that I think about this, this was more like drawing a "cleaner" version based on what I've designed on paper. Had I done it from completely scratch (without any prior design), I would have probably given up before halfway... So let's say decent for drawing a "final" layout from paper-design. ;)

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

  • 2 weeks later...

I did finish one of the mosfet-H-bridges (and it works, although I need to add TVS-diodes on the motors, as the testing motor was kicking back nice 100-130V inductive spikes when running with 9V battery ;)), but still need to make another before I can try them with the robot. This time I should have enough space to add larger heat-sinks if need be, although I picked 75NF75's for the mosfets (way overkill in regards to amperage/voltage ratings...), which have very low internal resistance, so might not even need to. I'll try to get the second one finished this coming week, but have been rather busy with other stuff (other projects and those pesky things called "work" and so-called "real-life" that keep interfering with my hobbies ;)).

Other than that, I today finished building one tool (I didn't encase it yet, though) that goes "beeeeep" and "boing":

pio45yz.png

Oh, R7 should be 10k, haven't updated the schematic... I won't go much into that, and just leave it up to the reader to guess what that is. Here's a hint that will probably make it fairly easy (at least for many people): Most if not all DMMs have this, although many complain that it's too slow reacting in them...

Those who read about my diode-tests (for adding a reverse protection diode to charging wires in wheels where the BMS doesn't have one) might remember that I had some problems with the banana-alligator-clip -wires I had ordered from Aliexpress. I knew the banana-jacks in those wires were pretty bad, as I had ordered 5 pairs of them before, and they are just shit. The threads strip, the plastic feels really cheap, the connections aren't very good and the "quality" in general is very lacking. Even though they're cheap, I suggest you don't get these types of banana jacks:

2pcs-New-4mm-Banana-Plug-Connector-Jack-

(Btw, I don't think I ordered from that exact store, but they're the same nevertheless, many stores sell the same jacks)

These are much, much better (but probably still not the best in the world either, if you want to use them for something like high-quality audio or whatever), although a tad more expensive:

Nickel-Plated-4mm-speaker-cable-terminal

For example, here's a 25-pair set I ordered that cost around 12€ with free shipping: http://www.aliexpress.com/item/4mm-Nickel-Plated-Banana-Plug-for-Probes-Binding-Post-Red-and-Black-55mm-Long/2029703521.html  Proper screws & threads, nickel-plated, the red/black sheath/shell/whatever is rubber, not plastic. No actual strain relief though. Holds firmly, seems to make good contact. I've used these to charge NiMH-battery at about 3-4A, and no heating or other problems. 

Oh, and I've been told not to get the (cheaper!) gold-plated ones. While gold-plating tends to make the corrosion resistance better and maybe even slightly better connections due to gold being softer (it actually isn't as good as electric conductor as copper), the gold plating on the cheaper connectors can actually be much worse than nickel-plating when it comes to making good contact.

So while making some patch cables, I decided I should replace the crappy connectors on those banana-alligator -wires I had. Unscrewing the first connector, this is what I found:

kUZCJgl.jpg

Wtf is this shit... No wonder the connections are bad, not only is the connector itself of dubious quality, they've stripped the end of the wire and then twisted it to side, the screw hasn't even gone through the wire sheathing. Guess they thought it should help with the cables not getting yanked out as easily. The threads make SOME contact with the side of the hole where the wire goes, but the screw is isn't even pressing it in the right spot. I prefer to either strip the end and put the screw pressing at the bare threads (although then the cable could potentially be yanked out from the connector easier on accident, as there's no strain relief of any kind) or just solder the connections...

On a hunch, I also checked the alligator clips:

SlMflei.jpg

Yup, similar setup... stripped wire, turned to the side, crimped. I just soldered those over the get more proper contact there. So, lesson learned (although I sort of knew it already, but I just get skimpy sometimes :rolleyes:): don't get the cheapest shit just because it's cheap. ;)

Oh, I also got some 3mm wide copper tape & some adhesive foil, and tried if it's possible to make circuits with them:

XXZWzu4.jpg

Yeah, seems to work. The connections can be a bit intermittent (because I've just taped over the component legs & battery wires), don't know if it could take the heat of soldering (well, if using paper as board, that could potentially catch fire with higher temperatures :D), and I doubt it can carry much current (the tape's really thin). Maybe I'll try to build some circuits to a see-through acrylic board later...

 

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

Trying here if anyone's following/reading this thread and knows the answer: do you know a good and inexpensive chip (flip-flop/counter/divider/logic gate/whatever) that could go up to or above 70MHz? I'd need one for a frequency counter and need to get the input to the MCU below 8MHz (or even smaller)... The "usual" 7400/4000-stuff seems to not cut it (at least according to datasheets, haven't actually tested it ;)). Or maybe I just haven't looked at the right components. Discrete BJTs are fast, so could also be an option, if I could figure out a simple(ish) circuit to handle this.

EDIT: Propagation delay is probably not a problem, as long as the output stays in "sync" (ie. the delays don't cause the frequency division to change).

Edited by esaj
Link to comment
Share on other sites

To answer my own question:  74HC93  (4-bit binary ripple counter), should be able to go up to 100MHz...

EDIT: Another stupid question: Is it possible to use too many filtering capacitors, ie. can it adversely affect the circuits? Just thinking...

MD06a5D.png

Some people say that I sometimes have a tendency to "overdo" things, I wonder why... ;)

That's supposed to be a "modular" filtering stage for the PSU (attached between PSU and load as necessary), of course the wires after it will bring more inductance/noise etc. into the circuit, but I think that should be "enough" ( :D ) to filter out any ripple from the PSU itself.

Edited by esaj
Link to comment
Share on other sites

  • 2 weeks later...
6 minutes ago, HunkaHunkaBurningLove said:

I wonder if you might get some responses if you were to post your project log into an electronics forum like:

http://www.electronicspoint.com

There's likely more people there who could provide some input into what you're doing.  Whatever that may be.  :D

I know, I'm just lazy and don't feel like starting to post in yet another forum, keeping up with this forum keeps me busy enough already as it is :P  Usually I also find the answers I'm looking for after some googling or searching electrical-engineering stackexchange or similar anyway, typically right after I ask something here... ;)  I don't actually even expect people to read this topic anyway, but I guess at least some do :D

  • Upvote 1
Link to comment
Share on other sites

  • 3 weeks later...

Long time (less than three weeks, actually), no post. But I haven't been completely idle.

Mostly I've been tinkering on some small stuff and bothering hobby16 with stupid questions. But since last saturday (a little over a week back, that is), I decided that I want to get the PSU project going. Now that I have some casings, I picked one of the biggest ones (there was one that's even bigger, with see-through -lid, but I thought that wouldn't really fit this), and started figuring out how I could turn it into a "main module", ie. the piece that actually turns the ATX power on and has the basic outputs for different voltages, plus at least one adjustable voltage output (with a separate buck/boost converter).

I had ordered an ATX-main power cable extender, but what I didn't notice when making the order was that it was 20-pin, not 24-pin. No biggie, I don't need the four extra wires (+12V/+5V/+3.3V/GND), and the connector on the Corsair is modular, so I can take off the extra 4-pins.

The very first piece I made was a simple board that grouped all the different rails (+12V/+5V/+3.3V/-12V and GND) together, and had the standby- and power good-signals:

bN7ij1R.jpg

Note that the extension cable hasn't got any "real" color coding, so the wires are right, even though the colors don't match the ATX standard coloring ;) After that picture I also added some large capacitors there, but replaced them with smaller ones later on due to space issues later on (they weren't really useful anyway :P).

I drilled holes for the power-button, standby- and power-good leds and made a hole for a voltage display in the front panel. Also made a hole for the ATX power connector on the side of the box. The "power distributor"-board would later on be attached with nylon spacers & screws. I got a bit greedy and made holes for 6 output channels (12 banana terminals) in total :D 

FgyDU48.jpg

 

Testing what the front panel would look like, the leds above the channels were originally meant to light up when load (ie. current) is detected on the output, but later on I changed them to show which channels are on:

V77vGl6.jpg

The buck/boost converters have a small 10k trimmer attached to them for adjusting the voltage. As I wanted to adjust it from the front panel, I desoldered the original trimmer and attached wires that will go to the potentiometer instead, added a connector for the voltage display and put some self-gluing small heatsinks on it for good measure:

VvbF4gT.jpg

Somewhere around here, I also started to change my plans. Originally I thought I would just wire the outputs directly from the power distributor, and the leds would show which ones are drawing current. Simple and straightforward. Then I decided that I would need fuses (although the ATX PSU supposedly does have short circuit protection, I didn't want to leave everything up to that).

Then I started running more ideas. It would be useful to be able to control (ie. turn on/off) the outputs separately. At this point, I looked at the empty areas on the front panel, and decided I want a display there! So, time to dig up those Arduino Nanos I ordered a while back. And design the control for the channels. First attempt was with N-channel mosfets (I was actually planning on using 75NF75's, but LTSpice doesn't have model for them, so I used IRFP054V in the simulation instead). I also played around with idea of using PWM from the Arduino with the outputs:

tLg4ctY.png

Yeah, that could work. Arduino output would turn on the low-side mosfet and allow current to run through the load. Fuse would protect from short-circuits or other stupid mistakes, and freewheeling ("flyback") -diode would protect the PSU from inductive spikes or such. 

I ran the idea through hobby16, who (rightly) pointed out that controlling the low (ground) -side of the output is not probably a good idea. After pondering it for a while myself, I could see easily why: the voltage output wouldn't turn off, only the path to ground. Plus, if I had wired the load to another ground-terminal, then I might turn off the wrong ground, and actually leave the load powered.

Hobby16 suggested bootstrapping (ie. charge pumping) a high-side N-channel, so the PWM-drive would also work well. But, I already was suspecting space was going to be issue, so instead i decided to go with P-channel mosfets, I had a bunch of IRF4905's laying around:

With P-channel, the gate must be pulled below source for the mosfet to conduct. Typically power mosfets have the threshold Vgs (voltage difference between gate and source) somewhere around -4V. But that's just where the mosfet starts to conduct (ie. it's still in the linear region and limiting the current, heating itself up in the process), to get it to fully conductive-state (minimum Rds), the voltage needs to be higher, somewhere in the -7...-10V -area. At the same time, the difference should still not be greater than +-20V, or the mosfet can possibly fail. Not a problem with 12V voltage, as I could just pull the gate to ground, and there'd be -12V between the source and the gate. But what about 5V and 3.3V rails? Or the buck/boost-converter that can go down to somewhere below 2V at smallest or up to above 30V at highest? Well, the PSU has a separate -12V rail...

After a few "not so successful" attempts, I came up with this (almost by accident :D), actually, the below schematic is a more refined, final version, but the idea is still the same:

cmtJ2e8.png

When I drew that schematic on LTSpice, the idea was that R5 and R1 would form a voltage divider that would drop the gate voltage to certain fraction of the source voltage (so it would go "low enough" towards -12V rail, but still stay within the +-20V -spec). To my surprise, what it actually did was keep the gate voltage exactly a certain amount below source, when Q1 was triggered (the amount depends on the resistors R1 and R5 and the zener voltage, as the base voltage is always either -12V or around -7V when the Arduino output goes high). Holy shit, that's perfect! I could use it with all the voltages, no fear of going out of the Vgs +-20V -spec and it would always hit the full conduction. :)

Later on, I figured out what's happening: the Vce of the 2N2222 -BJT transistor changes according to the input voltage, basically dropping more voltage the higher the rail-voltage is. It acts like a constant current sink, and as the current through R5 is always the same regardless of rail-voltage, it drops the same amount of volts over R5 every time (U = R*I, and as R or I don't change, U is always the same).

The circuit is simple (3 resistors, a 12V zener diode, the mosfet and a BJT-transistor), so I could fit it into small space. I planned a layout for 6 separate pieces of the part marked as "Output control board" in the above schematic:

zHbWRbM.png

Mostly that was just to check that I could have enough space on a 5x7cm dot matrix board. When actually doing the board, I did have to move things around a bit, as the heatsinks on the mosfets need space around them. But still, I could fit them all on a single board. Here the board is already inside the casing (but not attached):

Nw9q5Ie.jpg

Yeah, the space is going to be an issue, with all the wiring running inside there...

Around the same time, I made a simple board for the Nano, and as I was running low on pins (at that point I didn't yet know that you could use the analog-inputs as normal digital outputs :D), added a 74HC595 serial-in/parallel-out shift-register for multiplexing. The board is fairly simple (no, I didn't draw a schematic, or even plan the layout much more than "on-the-go"): there's a 12V input from the power distributor -board, a few capacitors for filtering & steadying the voltage, an LM7805 -linear regulator (5V), that feeds the Arduino, the shift-register and the leds, and finally, the Arduino (on row-connectors) and the 595 themselves + 5V-output from the regulator for the leds:

abjbNOL.jpg

I later on also added a 0.5A PTC-fuse after the regulator (just in case). The regulator's pretty heavily heatsinked (as it mostly draws something like couple of hundred of milliamps ;)). Also I noted that while I had drilled the channel holes by "free hand" and didn't pay too much attention on the sideways spacing between them, they actually lined up with the holes on the PCBs :P. Well, four of them, I'd have to still use wires for the two last ones.

Also made the hole for a "Nokia 5110" -style LCD and added a rotary encoder for selecting & controlling the outputs, and drilled more holes for attaching the boards:

G7VBD3b.jpg

 

Testing the display and the outputs from the Arduino, at this point I had also written some simple software (heavily based on generally available libraries) for reading the rotary encoder and controlling the display:

OIiaZOG.jpg

I also tried to take pictures of the display, but the camera just hates it :DdUYGkAY.jpg

Not to mention that the LCD is pretty intolerant of bending (it doesn't break, but changes it's contrast strongly) as well as temperature (which also affects the contrast). I actually destroyed one of those display, it never showed anything (at first I thought the problem was in my code, but testing with another similar display, it worked just fine). Probably it didn't like being dropped on concrete flooring several times when I was making the hole :D

At this point, it was already Friday-evening, and I had worked on this every day since that Saturday, most of Sunday, all night after work, except on Thursday, when I had some sudden nausea and temperature and needed to just sleep (overexhaustion or small flu? :P). Of course I did my day job during daytime, took the dog out, ate, sometimes browsed the forums a bit (I've fallen behind a lot on the posts, I'll try to catch up next week ;)) etc., but other than those, pretty much every moment was put on this.

I don't know how many hours I had already put into this at that point (30 or more?), but then on Friday-evening I decided I'm going to finish this before Monday (that's tomorrow ;)). Enter the gonzo-mode: as I type this, I've been awake about 23 hours straight. Before that, I was awake from late night hours (woke up around 2-3AM) of Friday until late morning hours of Saturday (yesterday, went to sleep around 10AM), something like 30 hours. I woke up around 4PM yesterday, after maybe 7 hours of sleep, and being waken up by the doorbell somewhere in-between (didn't go to check who it was, just put my head back on the pillow) ... So excuse me if I don't make totally sense at all times :P

So, on that Friday-evening, I decided I will finish this before Monday. I made a simple mental list of steps that I needed to take (of course, more steps and sidesteps came along the way ;)).

I probably could have driven the leds straight from the 595, as the lights are just indicators, and don't need a lot of current, but to "play it safe", I decided I will use the basic NPN-driver like in the schematic. But the leds were placed on the small PCB so that I had hard time trying to squeeze in all the needed parts. So, home-made multilayer board:

Uy1HkKA.jpg

That was a lot harder to make than I imagined :D  Board in place behind the front panel:

tLKYujw.jpg

And working nicely:

zmAWa15.jpg

Adding the terminals:

Sw799ka.jpg

Next, I made a bunch of connectors (3 x XT60 + 3 x Deans + 12 x "ring"-connector for the terminals), that took me until the morning hours of Saturday. Took the dog out and catched some Z's.

After I woke up, it was time to add the wires with connectors and the flyback-diodes:

vzRF8m2.jpg

Again, I went a bit overkill and used 3A diodes... well, at least they should be able to take it :D At this point I also noticed that I was running low on 18AWG and 20AWG wiring, and had made some of the wiring with 16AWG (now that's overkill, since the amperages for this thing will be something like 4-6A max :D). So actually there's different gauges on different parts at pretty much every channel... oh well.

There was no more room behind the front panel:

aLD9ePK.jpg

So I had to stick the boost converter in a pretty awkward place (at the same time, drilled holes for ventilation & the exhaust fan):

i7nPBJU.jpg

At some point (not even sure when that was anymore ;)), I had also drilled holes on top for the fuse-holders. I'm not totally sure on the order of things anymore, plus didn't take pictures of many steps along the way, and needed to add little this and that which was still missing, but this is already today (Sunday) morning, wiring the damn thing together:

BAWgvvc.jpg

Yeah, that's going to be tight...

ByqmLuR.jpg

Compartment done.

And the whole shebang, before closing it (for the first time):

lshtcOn.jpg

All that was pretty hard to squeeze inside, but I did manage.

ihhFMGY.jpg

Does it work?

hXZXdAe.jpg

Promising, the standby-light turns on when the PSU is switched on. Trying to turn the whole thing on... Yes, it works, success! Did a quick check up on voltages off all the channels and the adjustable voltage:

7vvSdfz.jpg

Yep, working fine, just a few minor things: the potentiometer adjusts the voltage up when turned counterclockwise, and I wanted it the other way around. Also I noticed that even when a channel was turned off, the voltage would raise a little (volt or two) when squeezing the box. Uh oh, something's touching something that they shouldn't...

20C3xuU.jpg

Just quickly labeled stuff and opened it up.

nYcCdRk.jpg

Didn't find any direct cause, but just on a hunch, I added a piece of rubber mat on top of the control-board driving the outputs. Also hotglued the leds that weren't on the board and fixed the potentiometer to work the other way around (voltage goes up clockwise). Cable tied the wires a bit to prevent them from moving and to keep them further away from the boards.

I then closed up, and noticed that the fan isn't running anymore. Probably accidentally yanked one of its wires off... Oh well, it shouldn't really run hot, those mosfets have around 20 milliohm Rds(on), so even at 6A, the voltage drop over one should be:

0.02ohm * 6A = 0.12V

Power dissipation is then

0.12V * 6A = 0.72W

Even if the Rds(on) goes slightly up with temperature, that shouldn't be a problem with the heatsinks. The voltages wouldn't start to rise when squeezing the box anymore. I then proceeded to do a bunch of load tests.

During load-testing, I noticed that very hot air is coming out from the fan ventilation holes. Measuring with the infrared-meter, the temperature was around 70 degrees! Fiddling around with it, I found out that it goes to around 70 degrees even without any load! That's weird, there must be something short-circuited for that much heat... 

After I opened up the case again, I tried the mosfets. Totally cold. So were the Arduino board, the wires and everything... except the fan. The fan was burning hot. It didn't stop turning because I wire had came off, the rubber mat was stopping it :D After fixing that, and once again load-testing, the temperatures stood around room-temperature. I fiddled around a bit with the "firmware" (some pretty minor changes). Last tests: channel ripples and full load test.

As expected, there's some ripple (around 100-200mV, depends a bit on channel voltage and load). Nothing major, I can live with it... The only one that really stands out is the adjustable voltage, especially when driving the voltage high with low resistance load:

FGf1Rlr.png

(That's AC-coupled measuring, that's why it's centered around 0V)

The very last thing I did was more of a "full load" -test (although not all channels are in use, didn't have enough alligator-clip / banana -wires and power resistors :D):

RmKMxHv.jpg

It doesn't heat up. The ripple of the buck/boost converter feeds back to 12V rail though:

mtATFIX.png

With others still on, but the adjustable channel off:

CKPEU5o.png

Just have to keep that in mind when using this.

So, now I don't (most of the time) have to play around with batteries anymore, yay! I could have of course bought a real, at least semi-decent linear lab-power supply for a couple of hundred, but I think this will suffice for the time being very well. It's not the best thing ever, and took quite a lot of work todo (I've lost count... 50 hours? 60 hours? :D). Would I do it again? Maybe not, or maybe with more planning... but I'm not disappointed. More like tired, but happy ;)

There are some more pictures here in the imgur-album, in case someone wants to look:  http://imgur.com/a/jbTre

I think now I'm gonna make some food, watch something mind-numbing on Netflix and then crash before work tomorrow... catch you later :)

 

 

 

 

 

 

 

 

  • Upvote 1
Link to comment
Share on other sites

I need some help with my motor controller I made the mistake of making the high side gate traces much too long. The mosfets do not seem able to turn off reliably. I was testing it with some LEDs and low voltages. With 20V applied to Vin on the board it seemed to be partially turning on and allowing 7V to exit the source and power a LED with the gate disconnected. I tried connecting a 39k resistor between the gate pin and ground which looked like it was preventing it staying on and it still turned on when 15V from the driver was applied. Should  that be a good enough work around to get it running before I make a new PCB? I'm still not certain what is the best way to drive mosfets at high speeds, besides short traces is there anything else I should consider adding to improve switching? I was looking at the firewheel board as it similar to my layout, they have diodes bypassing the gate resistor when reversed. I have seen so many different variations, some with diodes from H-bridge low side, others with resistors, some with multiple diodes and BJT boosting the driver output.

 

pcb2.png

  • Upvote 1
Link to comment
Share on other sites

1 hour ago, lizardmech said:

I need some help with my motor controller I made the mistake of making the high side gate traces much too long. The mosfets do not seem able to turn off reliably. I was testing it with some LEDs and low voltages. With 20V applied to Vin on the board it seemed to be partially turning on and allowing 7V to exit the source and power a LED with the gate disconnected. I tried connecting a 39k resistor between the gate pin and ground which looked like it was preventing it staying on and it still turned on when 15V from the driver was applied. Should  that be a good enough work around to get it running before I make a new PCB? I'm still not certain what is the best way to drive mosfets at high speeds, besides short traces is there anything else I should consider adding to improve switching? I was looking at the firewheel board as it similar to my layout, they have diodes bypassing the gate resistor when reversed. I have seen so many different variations, some with diodes from H-bridge low side, others with resistors, some with multiple diodes and BJT boosting the driver output.

 

pcb2.png

I don't how if you have the space or ability to do this, and as usual, I'm not an expert, but this is a part of a circuit I designed several months back:

iRTxxwV.png

The idea is that once the voltage from V1 (some PWM-source) starts to drop, the "Gate_fast_Discharger1" - PNP-transistor will start to conduct and short the gate to ground (or in your case, as it's a high-side mosfet, probably to the motor phase). The voltage won't drop all the way to 0V because there's the PN-junction between the emitter and the base, but it will drop fast to "low enough" (0.6-0.7V), way below the gate threshold voltage (Vth). The R1 & R2 resistors are there to limit the current and create a voltage divider (but the gate voltage gets still high enough, that pulse source is not meant to be 5V, by the way ;)), and the R2 ties the gate to ground. You might have to fiddle around with the resistor values in your specific case, but this COULD work, if you can fit the components there.

 

Edited by esaj
Typos, clarifications
Link to comment
Share on other sites

I found what was causing all the issues, my gate driver needs a BJT buffer to use it's isolated power supply properly, the driver by itself is too weak to switch power mosfets. I can't work out if I should keep this gate driver and add BJT or use a separate isolated power supply. The gate driver with isolated power supply outputs around 10 mA, so with 3 of them combined I have 30mA to drive the fets while a 1W isolated power supply would provide around 65mA but is bulky and adds to the BoM cost.

I need to calculate how many mosfets I can switch with 30mA at motor control switching speeds 20khz-100khz to see if it's worth using those gate drivers, but I'm not sure how to calculate it.

 

adumbjt.png

  • Upvote 1
Link to comment
Share on other sites

I found an easy solution, TI make a 150v linear voltage regulator that provides 700mA may as well take it from the high voltage side.

The last thing I have to do is work out how to use these current sensors http://www.silabs.com/products/power/currentsensors/Pages/si892x.aspx They have a differential output, I can't work out how to convert it to a single 0-3.3v signal for the MCU. 

Link to comment
Share on other sites

7 hours ago, lizardmech said:

I found what was causing all the issues, my gate driver needs a BJT buffer to use it's isolated power supply properly, the driver by itself is too weak to switch power mosfets. I can't work out if I should keep this gate driver and add BJT or use a separate isolated power supply. The gate driver with isolated power supply outputs around 10 mA, so with 3 of them combined I have 30mA to drive the fets while a 1W isolated power supply would provide around 65mA but is bulky and adds to the BoM cost.

I need to calculate how many mosfets I can switch with 30mA at motor control switching speeds 20khz-100khz to see if it's worth using those gate drivers, but I'm not sure how to calculate it.

 

adumbjt.png

One (obviously simplified) formula I've seen was

IG = QG/t(transition)
 

Where IG is the current to gate, QG is the gate charge (Coulombs = ampereseconds, As) and t(transition) is the transition time.

Since we want to know the transition time and know already the current, the equation needs to be reordered a bit

Ig = Qg/t   <=>  Ig*t = Qg  <=>  t = Qg / Ig

So, assuming a gate charge of 120nC (check the datasheets for your mosfets), a single mosfet gate with 30mA will charge in

t = 120nC / 30mA =  0.00000012As / 0.03A  = 0.000004s = 4 microseconds or 4000 nanoseconds
Assuming I got the amount of zeroes right. ;)

At 100 kilohertz, you have a period of 0.01 milliseconds (10 microseconds), but as it probably needs to go up & down during a single period, it might be cutting a bit close? Your PWM might start to look more like a triangular/trapezoid wave than square wave at the gate...

Also, that equation probably doesn't give exactly the correct answer, as there's some capacitance etc. to take into account? That might make it  require even more time to go up & down.

Some mosfet-drivers I've peeked at seem to source / sink several amperes (like up to 9A :ph34r:) in pulses to drive the gates fast at high frequencies.

 

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

I redesigned it with new drivers. These ones are isolated, 4A, they don't have legs so they will be difficult to solder however they're only 5mmx5mm in size which let me put them right next to the fets and cram 12 mosfets. The only thing I'm worried about is the PWM signal even with 4 layers there's not enough space for a solid ground plane. The PWM traces are the red ones on the left, ground is yellow. Looking at other EUC boards they do appear to make gate driver to mosfet trace length a priority over MCU to gate driver.

If it works the mosfets I built it around come in 80V, 120V and 150V, the 80V one is about 1.6mohm and can in theory carry over 100A if cooled, the 150V ones are about 6mohm but with 12 of them it should still be lower than many 67V EUC.

pcbv3.jpg

pcbv32.png

  • 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...