| Electronics > Projects, Designs, and Technical Stuff |
| My Very first fully custom PCB looking for Schematic Input and maybe any errors. |
| << < (3/7) > >> |
| jaycee:
--- Quote from: SirAlucard on May 12, 2020, 04:45:11 pm ---I'm driving a single solenoid with a single MMBT3904, On my breadboard I am using 2n3904, and the solenoids only draw about 100mAh, they're very small --- End quote --- What happens if they get stalled ? You'll probably find the current goes a lot higher, and your MMBT3904's will evaporate. Look for something in a SOT-89 or SOT-223 package. |
| jaycee:
--- Quote from: SirAlucard on May 14, 2020, 03:36:49 am ---ok, so a little bit more detailed information.The power draw on the 5v rail is max 234mAh, with my source voltage set to 13.7 max draw with everything connected is 380mAh. Without any solenoids connected it only draws 45mAh to power the ATMEGA and an led on the 5v rail. My main focus right now is to try to get rid of as much heat as I can, cause this is meant to be a controller you can hold, so it can't be running hot. Which I realize now, I should have gone with a switching regulator. Does anyone have a suggestion as to which to use? Or have experience with one they like. Would the best course of action be to get a single 5v switching regulator? or a regulator that has dual output of 12v and 5v? I'm really quite lost in the vast quantities of options. --- End quote --- Does the 12V rail really need regulating if you are using 13.8V input ? Your 12V regulator is also having to deal with the current drawn by the 5V rail, due to how you have put the two regulators in series. The 5V regulator doesnt need to be LDO as you have quite a head of voltage. As for what regulator to use, LM2575 - about as simple as you get, available in fixed 5v versions. |
| T3sl4co1l:
Remove the inductors and schottky diodes, those aren't switching regs. C5 and C7 probably don't need to be so big, but they aren't hurting anything at that size, I don't think. FYI, current is units of A, charge is units of Ah (ampere-hours). So, say, batteries are rated in charge, and can deliver any amount of current up to their physical limit, for some time corresponding to that current and charge rating. A discharge rate of 100mA, for 1 hour, delivers a charge of 100mA * 1h = 100mAh. Or maybe it's 1A for 6 minutes, or 1mA for 100h, etc. The pot and resonator symbols aren't very well drawn, but as long as they connect to the correct pins (double check the datasheet and footprint) that doesn't matter in the long run. MMBT3904 is only rated for 200mA. 100mA loads will work, but it's tight enough that a MMBT4401 or 2N7002 would be better. Something that's not an issue, but I always find amusing: the MBR1020s are rated five times higher than the transistors. The flyback current from an inductive load is precisely less than the steady state current at turn-off -- you never need bigger diodes here. Yet you so often see e.g. 1N4001s employed in this position, for absolutely no reason. :) A BAS70 would just about do, but I'd traditionally put in a 1N4148W. Consider running the motor and solenoids from raw VIN, not the reg. The motor driver has a LOT more capacity than the poor reg does, and tons of voltage range. You can always PWM to reduce the voltage seen by the solenoids. And you may already be planning on this (or some other timing application) since PB1/2 are also OC1A/B..? Alternately, if faster turn-off is desirable, consider a TVS from GND to Q1/2 collector, rated about twice the maximum supply voltage (and obviously Q1/2 need to be rated for even more voltage; not a problem). (This isn't a good combination with PWM solenoid control: the excess power saved by PWM-ing is burned in the TVS instead.) Also if those solenoids might change often, frequent rewiring or whatever -- consider using a protected switch like BSP75NTA. Also includes voltage protection so you may not need a TVS. Finally, what's U2 for? -- IC1-- wait, why is it IC1 but U everything else? Ach, anyway-- IC1 has internal current sense and regulation circuitry, and it does this by returning the currents from OUT1/2 through R13. Just sense the voltage there, like, with a comparator or ADC or whatever you're doing. (Note that the current will be pulsating, so an ADC reading needs to be averaged over some time frame (milliseconds?) to get a meaningful DC value -- consider an RC filter to save on software complexity.) Finally, regarding schematic clarity -- SCL/SDA are, I think, the only net name connections, why? They're no pain to draw in properly. These should be used judiciously, with an emphasis on clarity -- show the reader where they connect, perhaps organize the signals in a logical order, and reproduce that order elsewhere, or even add notes to which sheets they connect on (but don't let the comments get out of sync with the code\\\\schematic, either!). Now, the two in this schematic is hardly a burden to figure out, but my first instinct on seeing the elbow wires between U1 and R14/15: "oh, he's just labeled them for future use I guess, they probably don't connect anywh--" and then I saw the labels off U2. Making a tee shape with a loose wire segment helps suggest connectivity, or preferably using a connector symbol of some sort to call out "hey this is a connection to other stuff". That, and just generally clean up routes, space wires evenly, avoid unnecessary bends and crossings. Space components evenly, leave room for labels, don't overlap anything. Place components in logical order, so that DC currents flow top to bottom, and signals flow left to right. The power section is good in this respect, but the pots are jarring; they could be made into two-part symbols so the switches can be placed separately. Alternately, net connectors could be used to call out connectivity to the switch while placing the whole component elsewhere. Again, not huge priorities on a small schematic like this, but I've seen full stacks of sheets drawn this way, and let me tell you, they aren't any easier to follow than just tracing the bare PCB by eye... Good habits start early, and all that. With that out of the way -- higher level concerns might be EMC. All those switching signals on H1 are a worry. Keep this cable short. Preferably, add a ground and use a shielded cable. The input is fused which is nice, and the regulator is good up to 40V or so. That covers a lot of ground, but there's always worse, and it might be worth putting a TVS diode in there, from GND to VIN (in parallel with C6). SMAJ12A being a typical example. Choose the voltage rating for the nominal maximum input voltage -- for a 12V power supply (SMPS) or battery, 12 or 15V is fine; for a wider range supply (iron-core wall wart) or automotive use, 18 to 24V may be wiser. If this is automotive, appreciate that the voltage can be quite dirty -- spikes up to 300V (though not with a whole lot of current) are normal and expected. The nasty one for automotive is load dump; it's rare enough that you might not care, or your device is noncritical enough that it's okay if it blows up anyway. (And really, the 40V rating goes pretty far even with that; load dump peaks out in the 40-60V range (and lots of amperes available, for relatively long -- 10s or 100s of ms), so even if it happens, you might get away with it already. Mind, not that the TVS -- if used -- would survive it. A toasted TVS is a lot less to replace, at least.) Good luck! Tim |
| Buriedcode:
--- Quote from: SirAlucard on May 14, 2020, 03:36:49 am ---ok, so a little bit more detailed information.The power draw on the 5v rail is max 234mAh, with my source voltage set to 13.7 max draw with everything connected is 380mAh. Without any solenoids connected it only draws 45mAh to power the ATMEGA and an led on the 5v rail. My main focus right now is to try to get rid of as much heat as I can, cause this is meant to be a controller you can hold, so it can't be running hot. Which I realize now, I should have gone with a switching regulator. Does anyone have a suggestion as to which to use? Or have experience with one they like. Would the best course of action be to get a single 5v switching regulator? or a regulator that has dual output of 12v and 5v? I'm really quite lost in the vast quantities of options. --- End quote --- With 45mA load on a 5V reg with 13.7V in.. you can calculate the dissipation. I'm unsure if you know the formulas, my previous post assumed you did: P(in Watts) = I(in Amps) * V (in Volts). the voltage drop across the regulator (V) is Vin - Vout = 13.7 - 5 = 8.7V. Current flowing through the reg is 45mA, or 0.045A. P= IV = 0.045*8.7 = 0.3915W. Or 0.4W, 400mW. That will be enough to heat up a DPAK (which is what I think the regulators you have) quite a bit, if they don't have lots of copper around them (preferably on both sides, stitched with vias). Using a 12V regulator for a motor probably isn't necessary, especially if you're powering this with 13.8V anyway. But, what is the motor? Part no. or current/voltage rating would be helpful. I think we should see the board - that way we know what parts were used, or at least see the packages, because voltage regulators come in many many packages. For the most part the MCU part looks fine, the solenoid driver transistors, should probably be larger (both physically, and in terms of ratings), and your power supply needs redoing - at the very least, if they are indeed linear regulators (not switchers) them remove the inductors and bridge them with wire for testing. Edit: just saw teslacoil's reply, which says waay more than I have. There's a lot of good info there, that might seem a bit much, or intimidating, but take it one paragraph at a time. I stand by my request for a photo of the board! |
| poorchava:
I don't recommend the LM2575. Yes, they are jellybean and are made by countless Chinese companies. I would recommend something more modern. The likes of TI, Diodes, Microchip, ST, NXP, ONsemi each offer loads of integrated synchronous switch mode regulators. Most of them require only input and output caps, feedback resistors (or not if u use a fixed version) an inductor and sometimes a bootstrap capacitor. |
| Navigation |
| Message Index |
| Next page |
| Previous page |