ir_fuel Posted February 25, 2019 Share Posted February 25, 2019 Just saw your office/desk posts. I have similar issues here, albeit of a smaller scale. The problem I have is you collect so many completely different things that it is hard to get everything correctly shelved/sorted/stored. Screws, wires, tape, kapton tape, double sided tape, tie wraps, filament (lots of filament!), power tools, screwdrivers, all kinds of sockets and wrenches, knifes, scissors, raspberry pi's, arduinos, small electronic components, bigger electronics components, proto boards, bread boards, soldering tips, and then there is all my drone stuff such as receivers, antennas, built drones, drone parts, spare motors, frames, etc etc etc. And then there are the bigger components I need such as GPS modules, DC stepdown converters, accelerometers (all the adafruit and other stuff). I'm pretty sure I still forgot half of it. It just becomes impossible to categorise. I end up just buying storage with small boxes inside and dump stuff that is the same in the same small box. 2 Quote Link to comment Share on other sites More sharing options...
esaj Posted February 25, 2019 Author Share Posted February 25, 2019 (edited) 49 minutes ago, ir_fuel said: Just saw your office/desk posts. I have similar issues here, albeit of a smaller scale. The problem I have is you collect so many completely different things that it is hard to get everything correctly shelved/sorted/stored. Screws, wires, tape, kapton tape, double sided tape, tie wraps, filament (lots of filament!), power tools, screwdrivers, all kinds of sockets and wrenches, knifes, scissors, raspberry pi's, arduinos, small electronic components, bigger electronics components, proto boards, bread boards, soldering tips, and then there is all my drone stuff such as receivers, antennas, built drones, drone parts, spare motors, frames, etc etc etc. And then there are the bigger components I need such as GPS modules, DC stepdown converters, accelerometers (all the adafruit and other stuff). I'm pretty sure I still forgot half of it. It just becomes impossible to categorise. I end up just buying storage with small boxes inside and dump stuff that is the same in the same small box. Most of the components sit in large TME-bags with their original smaller antistatic bags, and the big bags just have a piece of painters tape with a marking like "Op amps and comparators", "Voltage regulators", "SMD inductors" or "Zener diodes". The bags are then put in a large box that sits under one of the tables: Of course I then have to sort everything to the bags when a new order arrives, and also update an inventory I keep in a spreadsheet, so I don't have to dig through the bags to know what I have. When I need something more specific ("I need an MCP6001 and and an MCP6L91 op amp"), I first dig for and locate the bag ("Op amps and comparators"), then still have to dig through tens of smaller bags to locate the correct ones. "High volume" stuff like basic passives (resistors, caps) I keep in their original small bags, sorted by value in another box, and fill in the sample books next to the soldering station as needed. A friend of mine swears his way of just using a box with the passives in original bags sorted in order is faster than sample books, but I still prefer the books. This "system" mostly works for small stuff like electronics components, but not for much else. There are also big parts bins with mostly stuff ordered from China, but also lots of cardboard boxes on the shelves for bigger stuff, wire reels and such, plus some smaller plastic boxes with compartments and printed labels for some bigger stuff/more often needed connectors and such, but yeah, organizing and labeling everything is sometimes a nightmare I don't dare to think what a mess it would be should I somehow manage to lose the entire inventory file and would have to go through everything again, as I've also collected most of the key values from datasheets and datasheet links on the inventory sheets for the parts... Edited February 25, 2019 by esaj 1 Quote Link to comment Share on other sites More sharing options...
esaj Posted May 10, 2019 Author Share Posted May 10, 2019 Moved to a better fitting topic Quote Link to comment Share on other sites More sharing options...
Popular Post esaj Posted June 8, 2019 Author Popular Post Share Posted June 8, 2019 (edited) Long time again, no post... for the last about three months, on the side of working full time, I also got the opportunity to work on electronics design, and I mean actually work, as in, I get paid for it First off, this is a project for an old colleagues' own company, and secondly, I work for cheap (probably way too cheap ). But since it's a hobby anyway and I don't really need to make a living from this, so be it... I've put a huge amount of hours into this (closing on 200), but that was to be expected. There were some new things for me, like strict size restraints, new SMPS topologies, smaller than I've used to package sizes (0402) and packages I've never used before (LGA-14 for example), which provided some, ahem, "challenge" when it comes to building the boards by hand. At beginning, the other one of two switching mode power supplies was supposed to be a SEPIC-topology ("single-ended primary inductor converter", a type of switching power supply that can both raise and lower the voltage), but after problems with getting everything to fit on the relatively small size the board can use and budget reasons, the requirement was eased so that a buck-converter is enough. I can't really go into much detail what the board does and such, but hopefully won't breach my contract just by showing a render of the (current revision of the) board itself, the first of which is assembled and running the entire system on my test bench. I doubt too much can be figured out from this alone, especially since the silk screen is not visible: There's a couple of switching mode DC-DC converters, one at the top left corner and another at top center, an MCU, some sensors and related tidbits... there's still some minor changes to do here, like moving some stuff around and changing some footprints from "hand-soldering friendly" to smaller ones, but most of the work is complete and things seem (so far) to work as intended. It's probably the most complex board I've ever designed, with over 100 individual components and over 400 soldering pads. Not "big" in commercial scale, but personally, a sort of a record. I actually have to solder a number of these by hand, so there's that too In my usual projects, I mostly just use what I already have laying around (I've accumulated quite an extensive component catalog over the years, buying way too many components just based on "it doesn't cost much and I might have some use for that at some point" ), and if really need be, order specific components from a supplier. Usually I just need a single board, so I just mill it out on the CNC, build it, test it and after it works satisfactorily, be done with it. This project has been very different from those. First off, there are requirements and outside parameters I can't affect, like the size and shape of the board, locations of mounting screws, some of the pinouts to external devices, needed power output from the switching mode supplies (one of those needs to go up to 40W at maximum, on a board the size of about a credit card and only a small area of that board can be used for the SMPS)... secondly, this project is to be used by a lot of people in the future, not just by myself, and work in a somewhat wide range of temperatures and circumstances. This is just a small part in a more complex whole, but it's still a fairly critical part, since it powers the other stuff and has an MCU handling communication and some sensors and such that produce data that are needed elsewhere. Doesn't really matter that much what it does, the main point of this post is the lessons learned from working on an actual (semi-)commercial project. To start off, I already suspected I'd be pushing a lot of hours for this from the start. But I was wrong on where the most amount of hours would go. I suspected I would be spending most of the time reading application notes on some stuff I wasn't familiar with (and a lot of time was used for that too) and building and measuring test boards, but from all the little tidbits making up the entire work hours, what has actually taken the highest amount of hours (not that far above everything else, but still the most) has actually been picking the components. A couple of examples. I need switching mode power supply -controllers for the power lines, to produce certain voltages, some needed both on this board and elsewhere, and some just needed elsewhere. There's a certain range of voltage coming in (it changes depending on outside factors), and a certain maximum amount of output current (or power) needed, both on-board and off-board. That gives me the basic values to start looking for suitable components. One of the SMPS was originally supposed to be SEPIC, so that also limits the options (but it was later changed just to a buck-converter due to size and budget restraints, it was decided that in certain situations it's ok for the higher voltage line to shut down). Going to a supplier web-page, you navigate to the section for the parts you need (like "Power Management ICs -> Switching controllers" in Mouser), select the desired values from filters, it starts filtering the options you have. You still easily end up with a huge number of potential options, like hundreds or thousands. Using more filters, you get it down, but still usually end up with at least tens of options. At this point, you start things like sorting them by the price (this thing has a budget, you know), and start reading datasheets. Skimming the datasheets of, say, 10 controllers, you dismiss half or more of them based on more specific restraints, like switching frequencies, common efficiencies and lots of things that are application-specific, and end up with a few options, where you read the datasheets through more carefully (they can still be tens of pages long each, with various actually important details buried in the tables, graphs and text). From these, you end up with a 2-4 options, of course in the end, you only select just one or two, but if you can't decide or (likely) need to do testing, then you must order a one or two (in case of troubles soldering / mistake on board / some other accident) of each and build testing boards for them (I think I ended up building about 4-5 SMPS test boards over this thing, some of which were used multiple times with varied external components). And since the switching controllers only control the switching, you still need to pick inductors, calculate values for various resistors and pick capacitors etc.. Another example are the capacitors. Multilayer ceramic capacitors (MLCC's for short) are commonly used for the SMPS to filter out switching noise and provide energy storage for the output, as they're (relatively) cheap, come in small SMD packages (well, the size depends on your needs, high capacitance and high voltage usually require larger packages) and have generally favorable specs for this use. But there's more to MLCCs than the filters on the supplier page give out. If you want a 10uF MLCC that has a maximum voltage rating of 25V or above, and X7R or better dielectric (I won't go into the details of dielectrics here), you get quite a lot of choices, even from a single manufacturer. Many of which on the surface seem identical, except some cost 1€/piece and some cost 10 cents/piece (in singles), or similar. Why the price difference, if it's basically the same thing? MLCCs and capacitors in general are more complex than what a basic electronics book will tell you. Most of the books I've read never mention for example DC bias, which is actually a pretty important factor when it comes to switching mode supplies, not to mention other things. MLCC DC bias is one of the "derating" factors you have to take into account when choosing capacitors, basically it means how much the actual capacitance will drop when a DC voltage is applied to the capacitor. A 10uF / 25V capacitor can suddenly become a 2uF cap when you apply 15V on it. If you have an output of 15V for at some maximum current, and the calculations show that need you need at least 40uF on the output for the desired ripple voltage, you have to take into account that when putting 4 x 10uF cheap capacitors there, the ripple voltage is "riding" on top of the output 15V DC, and if that DC bias drops the actual capacitance, you need a heck of a lot more than 4 x 10uF to reach (at least) 40uF. MLCC's usually handle high ripple currents well, but in case of aluminum electrolytics or polymer capacitors, you also need to take into account how much ripple current it can handle without overheating. Typically the output stage will have a bunch of MLCCs and one or more "bulk" polymer or aluminum electrolytes to get high enough capacitance with low enough ESR to keep the ripple voltages in check. Simulating the circuit beforehand is recommended to see at least ball park figures, so you don't end up wasting time building a board just to find out that it's nowhere near what you need. The supplier pages will not have filters for these kinds of characteristics (ripple current is usually there, as well as ESR, but no inductances, DC bias, impedance, ie. things that change with voltage or frequencies...), so after you've wound down the options to a few dozen, you have to start using the manufacturer pages to check the curves of specific capacitors for DC bias, impedance at different frequencies, ripple current and temperature characteristics, whatever you need... Usually, the cheap ones will have poorer DC bias (or no curves at all, which is a warning sign that it's "just" a general purpose cap, probably with poor specs), and the more expensive ones will have better. The price difference can be 10-fold, and you could get by and cheaper just with adding more lower spec caps instead of one better, but size restraints (like here) can cause this not to become an option. Writing notes and comparison spread sheets on components at late nights has been happening all the time throughout this project, and not just on the caps. Like said before, there's over 100 components on the board, of course many of them are just the same component used over and over for same or varying purpose, in total there's about 40 different components. Apart from something like basic resistors and general purpose capacitors, they need to be hand-picked from a large variety of options, sometimes leading to having to read a lot of app notes and such to get a grasp how to pick the "correct" one. While the component selection has been the single largest part of this project, there's of course still the designing the circuitry, simulations, schematics, layout, milling out test boards and building them, measuring, planning things so that this can be built by automated systems on the cheap etc. I won't get into other parts for now, but might in the future. While I kind of knew what to expect, it certainly is a different matter just to design something for your own use and fun, and designing a "commercial" application within more strict ruleset, like budget and board size (it has to fit into a specific casing, although there's been changes there too ). One thing I don't have to get into within the project specs is EMI/EMC -design, as this won't need to be certified, but I have been keeping my eye out and reading on the stuff on the side. Now that's hairy, probably worth a post in the future, although I can't really explain that much about it due to not really understanding it. The bottom line seems to be, EMI/EMC -design is hard, there's a lot of "rules of thumb" that many places tout that won't actually work in many cases and might make things worse rather than better, and shouldn't really be followed, despite being repeated over and over... also, if you read many enough articles on this, you'll notice they contradict each other often (one says that you should always connect the chassis to ground plane on one point only, other says this is a red flag of bad EMI-design, one says you should split your ground planes to separate return currents, another says this is the worst thing you can do, as the current loops become bigger... ) I kind of wish this project would have come a bit sooner, had we started talking about it month or two before, I wouldn't have signed my job contract yet, and could have worked on this full time. Then again, I actually like my current job (so far... ), so it's not that big of a regret, but things might still change... Edited June 8, 2019 by esaj 4 Quote Link to comment Share on other sites More sharing options...
Rehab1 Posted June 11, 2019 Share Posted June 11, 2019 On 6/8/2019 at 6:44 PM, esaj said: It's probably the most complex board I've ever designed, with over 100 individual components and over 400 soldering pads. Not "big" in commercial scale, but personally, a sort of a record. I actually have to solder a number of these by hand, so there's that too So impressive! On 6/8/2019 at 6:44 PM, esaj said: I kind of wish this project would have come a bit sooner, had we started talking about it month or two before, I wouldn't have signed my job contract yet, and could have worked on this full time. Your knowledge is simply amazing! Curious- how do you bid on such a lengthy, laborious project? 1 Quote Link to comment Share on other sites More sharing options...
esaj Posted June 11, 2019 Author Share Posted June 11, 2019 5 hours ago, Rehab1 said: So impressive! Thanks, although I doubt it's anywhere near as good as a seasoned professional would have made, and likely my design wouldn't pass the certification tests for EMI/EMC: Electromagnetic compatibility (EMC) is the branch of electrical engineering concerned with the unintentional generation, propagation and reception of electromagnetic energy which may cause unwanted effects such as electromagnetic interference (EMI) or even physical damage in operational equipment. Also, it is the ability of an equipment or system to function satisfactorily in its electromagnetic environment without introducing intolerable electromagnetic disturbances to anything in that environment. The goal of EMC is the correct operation of different equipment in a common electromagnetic environment. EMC pursues three main classes of issue. Emission is the generation of electromagnetic energy, whether deliberate or accidental, by some source and its release into the environment. EMC studies the unwanted emissions and the countermeasures which may be taken in order to reduce unwanted emissions. The second class, susceptibility, is the tendency of electrical equipment, referred to as the victim, to malfunction or break down in the presence of unwanted emissions, which are known as Radio frequency interference (RFI). Immunity is the opposite of susceptibility, being the ability of equipment to function correctly in the presence of RFI, with the discipline of "hardening" equipment being known equally as susceptibility or immunity. A third class studied is coupling, which is the mechanism by which emitted interference reaches the victim. Interference mitigation and hence electromagnetic compatibility may be achieved by addressing any or all of these issues, i.e., quieting the sources of interference, inhibiting coupling paths and/or hardening the potential victims. In practice, many of the engineering techniques used, such as grounding and shielding, apply to all three issues. ( https://en.wikipedia.org/wiki/Electromagnetic_compatibility ) Never even given much thought to such things before All I can say is WIFI, cellphones and Bluetooth still work in the vicinity of the board, so at least it's not radiating that much in those bands as to drown out the high frequency signals But the allowed levels for certification are far below what would actually be needed to "jam" normal wireless communications, so it could still be radiating at levels multiple times above the limit across different frequency bands. Conducted noise is relatively easy to get rid of, but radiated noise is a much more difficult problem. At least for the prototyping stage it's enough that it works, even if it radiates/conducts interference more than the standards allow. If a standard-compliant version is needed at some point (I'm not that familiar with the regulations, this application might be exempt), then I'll probably have to pass, as I don't have the equipment to measure such things myself (they cost some serious $$$ compared to my hobbyist stuff), and it takes time and becomes very expensive also to retry the compliance testing over and over until everything's working as it should... from what I've gathered, for example FCC certification tests for simple "unintentional radiators" start at cheapest from somewhere like a couple of thousands, if there's wireless communication going on ("intentional radiator" at certain bandwidth), the prices start from over 10k for each try, and that's just for North America (I think USA + Canada), Europe has its own standards and compliance tests, same probably for Australia, (individual?) Asian countries etc. Getting something certified all across the world can become pretty expensive, even if everything passes on the first go. Private labs that can do the tests and have "anechoic" chambers needed for more accurate measurements take about $1000 per hour, and even pros might need a couple of tries before they pass there, but I guess they usually test it through those before going to the actual agencies giving the certifications, as it's still cheaper when you can be sure that it'll pass on the actual certification tests. 5 hours ago, Rehab1 said: Your knowledge is simply amazing! Curious- how do you bid on such a lengthy, laborious project? In this case, I just gave a fixed number, that's probably 10 times lower than a professional company would have billed (for the same amount of hours, then again, professionals could have probably done it in much less hours). I didn't really know how much time it would take, but I suspected that I'd be looking at least way over 100 hours, and like said, I don't need to make a living out of this (at least for now), the project itself was/is interesting and the "customer" is an old acquaintance. If it was something that resembles more like "working" , the price would have been wholly different... 1 Quote Link to comment Share on other sites More sharing options...
Rehab1 Posted June 11, 2019 Share Posted June 11, 2019 29 minutes ago, esaj said: for example FCC certification tests for simple "unintentional radiators" start at cheapest from somewhere like a couple of thousands, if there's wireless communication going on ("intentional radiator" at certain bandwidth), the prices start from over 10k for each try, So expensive! I can see the rationale behind the tests where large Fortune 500 corporations would easily be able to absorb the costs. Unfortunately a small firm (or hobbyist) would be unable to justify that large of expenditure. I suppose if your device (still not sure what your working on) meets all of your customer’s standards then the next step would be for the client to take the equipment to an EMI/EMC testing facility for the proper certification at his/her expense. 1 Quote Link to comment Share on other sites More sharing options...
esaj Posted June 30, 2019 Author Share Posted June 30, 2019 (edited) Last week, I made a poll in the mods & repairs -section about the interest in a Charge Doctor -like device: I've thought of it before in passing, but seeing that Hobby16 was already producing the Charge Doctor, which is a fine product for a low price, and I had no need for another myself, I haven't given it that much thought. However, if hobby's indeed gone missing or isn't interested in producing the CD's anymore, there's an "opening in the market", but getting to as low price as CD isn't easy. Currently what people are most interested in seems to be a CD-like device at the same price or cheaper, or a more expensive version that comes with a mobile app. I started sketching a simplified "block diagram" for the system and looking up some (potential and preferably cheap) components, nothing here is "final", as much more calculations, simulations and time is needed to figure out things, but it does give a rough idea of how much the basic components would cost. If Bluetooth and the mobile-app support would be added, people don't seem to mind that much about the price, but the amount of time producing the app adds a lot to the entire thing. What I currently had in mind was the "cheap" version with open source design and no app -support, although it could be added, since the design of the measurement and protections isn't tied to whether data is sent over BT or not (but if people are willing to spend more, be it buying a ready-made device or building one themselves, higher budget wouldn't need as many short-cuts and higher accuracy components and such could be used). The diagram's a bit messy, Violet's not the best tool for this, but gives the general idea of "building blocks" required. Arrows with a triangle in the end represent power inputs (charge current, low-voltage power for display/MCU/Bluetooth-module/amplifier), "V"-ended solid lines are more "general inputs ", dotted lines with V-end are for MCU controlling something (charge cutoff, display, BT). The parameters I thought of were Input voltage (from charger) between 40V and 105V to account for empty / full batteries between 15S (about 45V empty, 63V full) and 24S (about 72V empty, 100.8V full). Granted, the charger voltage won't drop to the lowest voltage of empty battery, but leaving some "play" both ways is not a bad idea 5A max charging current (capable of withstanding somewhat higher current, but cutting the charging in case of overcurrent) Overvoltage handling capability above 105V (say 120V), crowbar to kill the power entirely by burning a fuse in case of gross overvoltage, warning if the charger voltage is above "expected" For overvoltage warning (faulty charger) the charger needs to know the battery voltages (ie. is it a 15/16/20/24S pack), but unfortunately for this, most wheels have reverse polarity protection, so the device cannot measure the battery voltage, meaning the user has to select the wheel model or at least battery setup from some type of settings-menu Error budget of <=1% in measurement, hopefully better can be achieved with low cost Looking into more details of these, trying to keep prices on the cheap-side (do note that I've only used Mouser-prices with 24% VAT for these, there are cheaper distributors around, so the prices are rough estimates, probably slightly on the high side vs. what could be found elsewhere): Charger input and OVP: Input (and output) are simple connectors, a crowbar-circuit could be added to protect the wheel and device from gross overvoltage. The simple idea above is just a fuse (which needs to be at least 5A) and a TVS-diode with breakdown voltage above the maximum charging voltage (around 101V for 24S). In case of a "high enough" voltage, the TVS starts to conduct, and should be such that a high enough current will flow through it to burn the fuse (meaning a lower than 105V TVS may be needed). Also the diode needs to withstand the short but very high power dissipation before the fuse blows, if just the diode itself burns, the power won't be cut. The crowbar circuit might be completely unnecessary, as it's not very likely that anyone would put that high voltage into the input, but you never know... I haven't checked the prices, but a fuse holder + fuse + TVS diode capable of handling >1kW spikes are likely already a couple of euros. Connectors run from about an euro to several euros a piece. Estimate 5€ for components and board-connectors, somewhat lower without crowbar. Adapter connectors are not included. Voltage measurement: This doesn't need to be much more than a resistor divider, possibly with a small capacitor to filter any line noise there might be present (I haven't measured how much ripple there is in my chargers, but likely at least a little). Not a complex thing, just need to check that the resistor power dissipations stay in check, "enough" current flows (if there's a capacitor, it has small leakage current that will otherwise affect the measument), and correct scaling for the MCU ADC (to keep as high as possible resolution taking into account the wide input voltage range). An ESD/TVS-protection diode could be added for voltage spikes / static discharges, but assuming the MCU inputs already have internal ESD protections, this might not be necessary. Mostly just low price passives, price relatively negligible (say, 10 cents). Voltage regulation Luckily, small MCUs run at low currents (<20mA), and depending on the display, it can likely work with 50mA or less (depends on the type, LCD with backlighting draws more, small around 1" OLEDs can work with about 20mA or less, depending how many pixels are lit). Bluetooth modules shouldn't draw much (BLE supposedly around 15mA peak), and the amplifiers usually draw next to no current themselves (<1mA), so a "budget" of 100mA is likely enough (even less might suffice). This might leave open the possibility of using high voltage linear regulator, although likely it'll need to be stacked with another regulator or an SMPS to lower/share the power dissipation. I haven't actually decided the regulation yet. I was considering a high voltage SMPS, but the price becomes high(er) fast. At a quick glance, on the cheap end and in singles (<10 pieces), the controller (up to 450V input, needlessly high, but for some reason it was also very cheap), inductor and a diode could be around 4-5€ + a few high voltage caps, likely around 6-7€ total. There are "inductorless" capacitor charge pump -style switching controllers for small currents and poor regulation (definitely needs a linear regulator after it), but they're more expensive (then again, it saves board space and requires less expensive other components, so it might do too) and some of them work only with AC inputs. SMPS also cause noise (ripple voltage, switching ground currents) in the system, which might require filtering on the analog (measurement) -side. The downside of linear regulation is the extra power dissipation on the regulator vs. SMPS, but pros are much cheaper price, less noise and less PCB space needed. Regulating from around 101V to 3.3V requires a voltage drop of 97.7V, round that directly to 100V to play it safe. Drawing a maximum of 100mA (0.1A) through a single regulator would mean the regulator's dissipating 10W! Cutting that to half by dividing the dissipation between two separate regulators still leaves 5W to be dissipated per regulator, which is still very high and will heat up the inside of the device. It might be that the solution needs a combination of an SMPS (for high efficiency and less waste heat) followed by a linear regulator (for steady output voltage with less noise). This part can become pretty costly, unless cutting corners (ie. running hot ). Another option is to lower the expectations, and only support up to 20S wheels, meaning less wasted heat with linears. Charge cut-off The two options I've considered both rely on mosfets, either on the high-side or the low-side of the circuit. The high-side -option has the added benefit of relatively simple control and it actually cuts the voltage entirely from the output (ie. there's no 100+V dangling there in the connector). Control doesn't need much but pretty cheap basic passives, a zener-diode (to keep the gate voltage from differing too much from the sources) and an NPN -transistor. Do note that when the transistor is "off" (not conducting), the full charger voltage appears at the collector, so it needs to be a >100V. The current's small when it's conducting, so something like a cheapo 2N5401 (whoops, that was the PNP equivalent, meant 2N5551) is probably just ok. The expensive parts are the two P-channel mosfets, P-channels are much more expensive (for high voltage and low Rds_on) vs. N-channel. Using an N-channel mosfet on the high-side would require a more complex charge pump to keep the gate voltage higher than the source to keep it conducting. On a quick glance, the P-channel mosfets could be 2-3€ per piece, cheaper if using higher Rds_on -models, but then they will heat up more. A more careful assessment of the power dissipation would be needed to see how high Rds_on could still be used without causing excessive heating (either destroying the mosfets, or at least raising the device temperature, which affects measurements). Low-side control can be made more cheaply, as N-channel mosfets aren't as expensive, and using a simple BJT setup directly from the charger output to control the gates here, no other expensive components or a separate 7...12V DC-line are needed (the component values aren't marked here, but I've already simulated with resistor values so that this could work with 40...100V input, keeping the gate voltages high enough for full conduction and zener preventing them from getting damaged). The down-side is that only the "ground" -connection is cut, leaving full charger voltage on the output positive side. Still, the Charge Doctor uses low-side cut-off (with a single mosfet), and I don't think anyone managed to electrocute themselves with them either. Another point where costs can be cut is to use only single mosfet (be it high- or low-side). The secondary mosfet is used as reverse protection, basically, these are the "ideal diode" -circuits, ie. work like a diode, allowing current only to flow one way, but with much less voltage drop vs. a real diode. A very low forward voltage diode could be used on the high side instead, but the drop needs to be low at low currents, otherwise the final charge voltage won't get high enough. Some of the new super barrier diodes can go into around 0.1-0.2V at low currents and are cheaper than the mosfets, so it might be better to use an actual diode for reverse protection. Also, it could be argued that the reverse protection is unnecessary on the device, assuming that all the chargers using same connector have the same polarity (which I think is a reasonable assumption) and the connectors are next to impossible to place the wrong way around, at least on accident. Current measurement and amplification: The above shows a very simple and basic amplification, but it could work (and probably is what the cheap Chinese meters usually do). The power line actually should have a 100nF bypass cap there, but I just threw the examples together really quickly. Basically just a low-milliohm (10mOhm or such) current sense resistor (for example, 10mOhm, 0.5%, 0.75W, 50PPM/C resistor costs about 1.20€ in singles, 10mOhm, 0.5%, 1W, 35PPM/C resistor is around 2€, both as 4-terminal "Kelvin"-type to prevent errors from "external" resistances in the path) and a current sense amplifier (there are such, specifically built for this use case), such as INA190 (the above picture shows INA193, because I didn't have 190 in Kicad libraries) is about 2.9€. Originally I was considering either a differential or an instrumentation amplifier, but if there are pretty cheap purpose-built and relatively low error amps available, why not use them. INA190 has different versions with internally set gains (25, 50, 100, 200, 500 V/V), maximum gain error as low as +-0.2% (for 25V/V), typically less than +-0.1%., drift of 5 PPM/C, maximum offset of 15µV and drift of 0.13µV. Of course, further research into these is needed, I need to revisit the Art of Electronics chapters regarding amplifier design and error calculations, but I have a feeling that this would be already well below 1% (with proper calibration). Low-side current sensing has some issues vs. high-side (like ground potential differences between the measured resistor and the amplifier), but due to high line-voltages here (up to 100V), the high-side measurement would require much more expensive amplifier with high common-mode voltages. The resistor between the positive input and the diode there are for protecting the sensitive inputs from possible voltage spikes / ESD (the resistor limits the current to the diode, but has next to no effect on the measurement, as the input impedance of the amplifier is already very high). Probably not 100% essential, but not very expensive either, so better put them there. The actual sensing-resistor value might be different than 10mOhm, as it depends on the maximum current, resistor power dissipation, ADC voltage range and amplifier gain. As high as possible range of the ADC voltage should be used to keep measurements accurate, it's of little use to have 12-bit ADC, if only half or less of the range is used, for example. The above image shows the amplifier powered from a 3.3V line, but this is just an assumption, and depends what voltage the MCU and display (and possible BT-module) run. Furthermore, care must be taken in layout to prevent the digital noise of the MCU from affecting the measurements (or at least minimize those), possibly some filtering might be needed. The selection of the MCU plays an important role here, as some MCUs allow usage of external VRef for the ADC, in which case less amplification would be needed and the VRef and amplifier power could be taken from a precision reference (but of course that would also again push the price up... ). What does make the job a lot easier here is that the current changes very, very slowly, so high-speed ADC is not needed. ADC accuracy can be somewhat improved through oversampling and averaging. MCU The MCU's I've been considering so far have been the low-end 32-bit ARM Cortex-M0's (like the STM32F0 -series), which have 12-bit ADCs, but cost only as little as 1.60€ (plus about an euro for the crystal and capacitors) in TSSOP-20's, LQFP's are little more (a few tens of cents), but have more I/Os (but there's not much need for extra I/Os here anyway). On the other hand, if this is to be open source, including the firmware, many hobbyists prefer Arduinos (that is, Atmel ATMega328P, usually), which isn't really much cheaper (about 1.50€ at cheapest). The downsides of the ATMega are that it has "only" 10-bit ADC, cutting the "steps" (and thus resolution) in the ADC to 1/4th of the ARM, and is 8-bit, meaning it takes more cycles to handle higher precision values than 8 bits, and runs at lower speed (up to 16MHz, the M0's can go up to 48MHz), but the speed isn't that much of a concern other than with display update. Then again, it's not like the display needs to update very fast, as there aren't anything like real-time graphics involved. The upside is that ATMega has external VRef for ADC (technically, the ARMs do have separate VDDA-voltage input, but it must be same or higher than the "normal" voltage), which would make it possible to use lower voltage and less amplification (the lower amplification version of INA190 for example has lower errors), and also has special power down modes to prevent interference with the ADC measurement to improve accuracy (although ARM might have that too, I haven't checked). There might be other good candidates out there, but these two are the ones I'm more familiar with. Separate real-time clock crystal might be needed for accurately measuring the energy (watthours), in case the main crystal wanders around. Don't know how much of an effect it would really have, might be totally unnecessary. Display For display, only thing I've more or less seriously considered so far are the small 1" (actually more like 0.98" or thereabouts) single-color OLEDs you can get off Aliexpress for a couple of €. Price is one thing, another is that they run with low current vs. an LCD (well, technically "plain" segmented LCD requires even less, but if it has backlighting, it becomes a different issue). A simple LED-segment display like with the Charge Doctor could also work. Bluetooth module Haven't really given this much thought at all so far, likely it would be one of the cheap modules they sell off Aliexpress / eBay. Haven't checked the prices, a couple of euros likely. The display, possible BT-module and the enclosure are the only things I've considered buying off from eBay or Aliexpress, maybe some connectors, if they're good enough and the price difference is great enough. The rest would come from a more "reliable" distributor, such as Mouser or TME. To sum up the above components price-wise, but these are very preliminary numbers: Crowbar (might be left off): 2€ Voltage regulation: 5-10€ Charge cut-off: maybe less than 5€ to more than 10€, depends on the type of mosfets, and if reverse protection is included (or a super barrier diode is used instead) Current measurement (resistor + amplifier + possibly some other passives): Around 5€ MCU + crystals + caps: 3-5€ 0.96" OLED of Aliexpress: ~1.5-2€ Bluetooth module (optional): less than 2€ at cheapest, no idea of quality This still leaves out: A bunch of passives (mostly relatively cheap capacitors) that likely are needed, a few buttons, say 1€ Enclosure (no idea of the price, cheap small plastic boxes are likely <1€, but need to be cut by hand to fit the display and connectors/wiring) All the connectors (if there's adapter both on the input and output-side, that's six connectors in total, if each costs about 1€, that's 6€ already) Wires (doesn't cost much anything). PCB (about 2.5€ per piece, ordered from Chinese fab-house with shipping and import taxes, basic non-ROHS) It's still possible I've overlooked something here. Not including the connectors (I'd have to dig closer to the prices) this already gives a price range of (cheapest options, no crowbar, no Bluetooth) 23.50€ to (all the bells and whistles, most expensive options above) about 40€, + how much ever the connectors cost for either option. That's just the parts, no assembly included Now, the prices do drop when components for more than one device are bought at a time, but the reductions vary between components (looking at the earlier commercial project, the difference per piece if buying for 1 vs. 10 devices at a time was about 20%). To make it much more significant, probably would need to buy the components for at least a hundred or 1000 devices, an amount for which there likely isn't even a market out there. Edited July 1, 2019 by esaj Quote Link to comment Share on other sites More sharing options...
Hunka Hunka Burning Love Posted July 17, 2019 Share Posted July 17, 2019 (edited) Hey @esaj I ran across this interesting MESR-100 ESR capacitor tester, and I thought maybe you might find it handy. Component tester Kinda neat mini-oscilloscope (probably not that useful) Edited July 17, 2019 by Hunka Hunka Burning Love 1 Quote Link to comment Share on other sites More sharing options...
esaj Posted July 19, 2019 Author Share Posted July 19, 2019 (edited) On 7/17/2019 at 3:49 AM, Hunka Hunka Burning Love said: Hey @esaj I ran across this interesting MESR-100 ESR capacitor tester, and I thought maybe you might find it handy. Component tester Kinda neat mini-oscilloscope (probably not that useful) I must admit that I didn't watch the videos, but I did get one of those DSO-scopes (a DIY-version, with no enclosure) back before I bought the Rigol, and already have one cheapo LC-meter (Ie. "just" capacitors and inductors, no resistors/ESR like the LCR-meter, cost about 20€, a good quality basic LCR-meter is maybe 100-200€, professional-level high precision meters of course go up into thousands as usual ) and a simple semiconductor/component tester (which also can measure capacitor ESRs, although probably not very precisely). These kinds of devices aren't really bad for their price in general, and good enough for general hobbyist usage, but I have no real use for the cheap stuff anymore really, what I'd likely need next is a more "serious" high-power lab PSU (Still looking at that 150V / 1.5kW TDK-Lambda Genesys) and another scope with much lower noise-floor, the Rigol's otherwise nice, but the noise generated by the scope itself is around 800µV, which is pretty bad considering the (possible) CD-project. What I was going to do this summer was to get my electrics rebuilt in the house... Not only would a 1.5kW power supply (if used at full power) put more stress the cabling, my current setup already likely does run pretty close to the limits This room + the one next to it comes through a single feed behind a 16A fuse, and I could be using several kilowatts already here, plus the next room has a freezer and wheel charging... All the wiring and mains cabinet is original from over 30 years ago. The house across us burned down due to electric fault in the mains cabinet a couple of years ago I sent an email to 10 companies asking for an offer, 2 responded (it's been a month or more), and at least one of them fell out directly due to the price they were offering, the other came by to look at things, and promised to send an offer later, but I haven't heard back. Looks like it'll be sometime in the future then... Edited July 19, 2019 by esaj Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.