Critique my schematic

Irving

Joined Jan 30, 2016
5,124
I agree with MB2, unless there is a very good reason for SMD it'll be a lot easier to build and subsequently resolve problems on a through-hole solution rather than SMD. And this design is so simple it hardly justifies going to SMD. There's no premium for through-hole v SMD on jlcpcb or other PCB manufacturers; the limits for through-holes and vias are generous enough. Indeed the price differential between 2 and 4-layer boards is so low it means I'm going to 4-layer boards more often now, even for simple boards.
 

Thread Starter

redgear

Joined Oct 17, 2019
136
I was going to add that through-hole parts are add after reflow as many of those can't go through the oven. Which is why you also need a hot-air rework station, or a micro-soldering iron, for changes and repairs later. A good microscope is useful too if your eyesight is like mine!
Thanks
Yep. I figured it.
I am already planning to buy a Rework Station. I will look for a cheap a microscope too.

My experience with surface mount devices is that the solder past application and part placement effort, are far more work than building a circuit board with through-hole components. If it will be an automated production process that would be different, but it seems like the TS is only planning on producing a few of these systems.
If the assembly will be manual then it is far easier to get a good production yield with the through hole parts, since the spacing is a bit greater.
I agree with MB2, unless there is a very good reason for SMD it'll be a lot easier to build and subsequently resolve problems on a through-hole solution rather than SMD. And this design is so simple it hardly justifies going to SMD. There's no premium for through-hole v SMD on jlcpcb or other PCB manufacturers; the limits for through-holes and vias are generous enough. Indeed the price differential between 2 and 4-layer boards is so low it means I'm going to 4-layer boards more often now, even for simple boards.
Yes, I'm planning to take it to production. But my first adventure will be building 5 units for my friends. SMD components are cheaper than THT so, I decide to use them. I guess soldering them should not be very difficult using a stencil and reflow oven and soldering will also be consistent unlike manual soldering THT. I will check if the components are available in THT package.
Is it good to use chinese manufacturers like JLCPCB for production? Do I need ENIG-ROHS boards or will be lead free boards be fine?

Thanks
 
Last edited:

Irving

Joined Jan 30, 2016
5,124
Is it good to use chinese manufacturers like JLCPCB for production? Do I need ENIG-ROHS boards or will be lead free boards be fine?
I use jlcpcb a lot (other pcb manufacturers are available). My advice is go with their default settings for your prototypes, you don't need fancy. When you come to production that's a whole new ball game because you'll be looking not just at pcb but component supply and assembly & test capabilities. Don't worry about that for now.

Using jlcpcb for assembly is more difficult because you have to use components they stock in their sister company LCSC.. This means getting creative sometimes. Other assemblers require you to supply stock in very specific ways.

Your pcb is simple enough to assemble by hand so focus on a good layout for now, don't use the tiniest parts, use the 'hand-soldering' foot-prints and make sure you order a stencil with the PCB. Your board can be well spaced out, maybe Eurocard sized 100 x 160mm, to give yourself a chance to assemble by hand. your next version, when you've ironed all the mistakes out (and there will be), can be smaller and more refined.
 

MisterBill2

Joined Jan 23, 2018
27,524
Thanks
Yep. I figured it.
I am already planning to buy a Rework Station. I will look for a cheap a microscope too.




Yes, I'm planning to take it to production. But my first adventure will be building 5 units for my friends. SMD components are cheaper than THT so, I decide to use them. I guess soldering them should not be very difficult using a stencil and reflow oven and soldering will also be consistent unlike manual soldering THT. I will check if the components are available in THT package.
Is it good to use chinese manufacturers like JLCPCB for production? Do I need ENIG-ROHS boards or will be lead free boards be fine?

Thanks
My thru-hole soldering is very consistent, all it takes is practice and focused attention. And good luck with the stencil application of that solder paste. Then positioning every part correctly prior to reflow soldering, and the rework if it is not perfect the first time. I doubt that the added cost of thru-hole parts over SMT parts will be as much as the cost of the solder-paste application mask.
 

Irving

Joined Jan 30, 2016
5,124
Personally I'd build version 0.1 on perfboard with a socket for the atmel cpu. get everything working, tweak the code, etc. The nice thing about perfboard is you can mimic the pcb physical layout yet its easy to change when you realise something's not right. When that's all working then use that to layout a THT pcb for the '5 friends'. This will prove design is repeatable.

Then 'productionising' can take place with a move to smd based on a proper cost/benefit analysis - wave soldering of THT parts can be very cost effective on small runs. Making the board ultra-small is pointless if you've got a case and display and buttons and connectors to the board; the component density here probably doesn't justify smd.

I doubt that the added cost of thru-hole parts over SMT parts will be as much as the cost of the solder-paste application mask.
I agree, the stencil is $6 but the shipping is $14 because of weight. That $20 is probable more than the component cost.... and one minor rework means it a throwaway. Get it working, prove its repeatable then go to smd based on definite need.
 

MisterBill2

Joined Jan 23, 2018
27,524
Personally I'd build version 0.1 on perfboard with a socket for the atmel cpu. get everything working, tweak the code, etc. The nice thing about perfboard is you can mimic the pcb physical layout yet its easy to change when you realise something's not right. When that's all working then use that to layout a THT pcb for the '5 friends'. This will prove design is repeatable.

Then 'productionising' can take place with a move to smd based on a proper cost/benefit analysis - wave soldering of THT parts can be very cost effective on small runs. Making the board ultra-small is pointless if you've got a case and display and buttons and connectors to the board; the component density here probably doesn't justify smd.


I agree, the stencil is $6 but the shipping is $14 because of weight. That $20 is probable more than the component cost.... and one minor rework means it a throwaway. Get it working, prove its repeatable then go to smd based on definite need.
$6 for an etched stainless steel solder mask?? The one used for the application of solder paste? $6 sounds more like the price for the printed on green solder mask used for wave soldering.
 

Irving

Joined Jan 30, 2016
5,124
$6 for an etched stainless steel solder mask?? The one used for the application of solder paste? $6 sounds more like the price for the printed on green solder mask used for wave soldering.
Nope, see below. airmail 10-15days
LH side, just 5off 100mm x 50mm pcb, standard defaults = £5.50
RH side, adds stencil = £18.83, a £13 increase, stencil itself only £5.52

if you go for Europacket, 7-10days its £10.33 without, £26.97 with stencil, a £16 increase.

and DHLExpress 5days the difference is just under £20.

Its because stencil is 28 x 38cm, thats the smallest size they do, even for a 50mm x 50mm pcb and it weighs 900gm. They are good stencils, just big! I tried laser-cutting one on 1mm mylar sheet. It worked but wasn't as effective as the SS one.


1595529142232.png1595529185400.png
 

MisterBill2

Joined Jan 23, 2018
27,524
OK, that is a different ball game than when my employer at the time got a price quote. Quite a bit less.
The big problem that we saw was alignment of the solder paste with the traces. Then placing all of those tiny parts just right, and then getting our reflow soldering machine set just right. Of course with the parts being the 01005 size it did take fine tweezers and a good magnifier. The real pain was the CPU IC with all those leads on 0.05mm centers.
I like thru-hole spacings much better.
 

Irving

Joined Jan 30, 2016
5,124
If your PCB has registration holes as does the stencil its easy to line them up with some pins through both (you remove the pins to wipe the paste over the stencil). The trick is to surround the pcb with offcuts of the same thickness to keep the stencil level and in close contact with pcb. I made a jig to hold everything together. Then good quality paste which has been kept in fridge and taken out a couple of hours beforehand. squeeze onto stencil and spread in one direction with a good straight edge (i used one used by silkscreen printers as its got a very clean chamfered straight edge). A Credit card works well for small boards. The important thing is swipe once and once only. otherwise the paste squeezes out under the stencil. If you've done it right the placement of parts isnt too critical as surface tension pulls them into position when the solder melts, as long as there's enough paste there. I've done 48pin (2 x 24) 0.05" TSSOP and 64 pin .05" 4 x 16 packages at home that way in a modified toaster oven. If need be you use a small soldering iron to add more solder and a hot air gun to carefully rework it.

Below is an 8S LiFePO4 battery monitor and columb counter with an ESP32 to communicate with phone via bluetooth The current sensor can handle 150A (with the correct cables attached, this in testing)

IMAG0609.jpg
 
Last edited:

Thread Starter

redgear

Joined Oct 17, 2019
136
I use jlcpcb a lot (other pcb manufacturers are available). My advice is go with their default settings for your prototypes, you don't need fancy. When you come to production that's a whole new ball game because you'll be looking not just at pcb but component supply and assembly & test capabilities. Don't worry about that for now.

Using jlcpcb for assembly is more difficult because you have to use components they stock in their sister company LCSC.. This means getting creative sometimes. Other assemblers require you to supply stock in very specific ways.

Your pcb is simple enough to assemble by hand so focus on a good layout for now, don't use the tiniest parts, use the 'hand-soldering' foot-prints and make sure you order a stencil with the PCB. Your board can be well spaced out, maybe Eurocard sized 100 x 160mm, to give yourself a chance to assemble by hand. your next version, when you've ironed all the mistakes out (and there will be), can be smaller and more refined.
My thru-hole soldering is very consistent, all it takes is practice and focused attention. And good luck with the stencil application of that solder paste. Then positioning every part correctly prior to reflow soldering, and the rework if it is not perfect the first time. I doubt that the added cost of thru-hole parts over SMT parts will be as much as the cost of the solder-paste application mask.
Personally I'd build version 0.1 on perfboard with a socket for the atmel cpu. get everything working, tweak the code, etc. The nice thing about perfboard is you can mimic the pcb physical layout yet its easy to change when you realise something's not right. When that's all working then use that to layout a THT pcb for the '5 friends'. This will prove design is repeatable.

Then 'productionising' can take place with a move to smd based on a proper cost/benefit analysis - wave soldering of THT parts can be very cost effective on small runs. Making the board ultra-small is pointless if you've got a case and display and buttons and connectors to the board; the component density here probably doesn't justify smd.


I agree, the stencil is $6 but the shipping is $14 because of weight. That $20 is probable more than the component cost.... and one minor rework means it a throwaway. Get it working, prove its repeatable then go to smd based on definite need.
Ok, I will first make the version 1 with a THT design. And make it better from there. But how do I solder the uC? Should I go with a DIP package?

Thanks
 

Irving

Joined Jan 30, 2016
5,124
Ok, I will first make the version 1 with a THT design. And make it better from there. But how do I solder the uC? Should I go with a DIP package?

Thanks
Using the DIP version is easiest. You can socket it if you want... or TQFP on a 32-pin carrier (don't use a generic 32-100pin one, its a lot of hassle and much bigger). Either way you need to make sure you have brought out everything you need for programming to a header to connect to a ftdi usb/serial adapter. The bootloader is pre-programmed into the chip.
 

Thread Starter

redgear

Joined Oct 17, 2019
136
Using the DIP version is easiest. You can socket it if you want... or TQFP on a 32-pin carrier (don't use a generic 32-100pin one, its a lot of hassle and much bigger). Either way you need to make sure you have brought out everything you need for programming to a header to connect to a ftdi usb/serial adapter. The bootloader is pre-programmed into the chip.
Yea, I just watched some youtube videos to program the uC using Arduino as an ISP. Once the code is ready I am planning to remove the arduino bootloader.
 

Thread Starter

redgear

Joined Oct 17, 2019
136
Why? I wouldn't.
I read that the MCU takes about 2s to boot when using a bootloader and people also have an option to dump the code and modify it. So, once the code is written and validated I thought to remove the bootloader and just flash the hex file.
 

Irving

Joined Jan 30, 2016
5,124
I read that the MCU takes about 2s to boot when using a bootloader and people also have an option to dump the code and modify it. So, once the code is written and validated I thought to remove the bootloader and just flash the hex file.
I think you're overthinking things and worrying about stuff unnecessarily. Programming through the bootloader UART directly from the IDE is far far simpler than ISP through the SPI interface. And a 2sec reboot time is of absolutely no consequence in this application. And no one is going to dump and modify your few `10s of lines of code; this hardly a security product!

Focus on the important stuff, like making this work properly? For instance, you have several user switches and an LCD. We've not discussed the User Interface or what's going to be displayed, but I'm sure you have some ideas (which may, or may not, make sense). Given all this does is turn some lights on and off, I'm guessing you're planning to set up a time for them to be 'ON', or maybe some schedule (though no RTC so unlikely).
 
Last edited:

Thread Starter

redgear

Joined Oct 17, 2019
136
I think you're overthinking things and worrying about stuff unnecessarily. Programming through the bootloader UART directly from the IDE is far far simpler than ISP through the SPI interface. And a 2sec reboot time is of absolutely no consequence in this application. And no one is going to dump and modify your few `10s of lines of code; this hardly a security product!

Focus on the important stuff, like making this work properly? For instance, you have several user switches and an LCD. We've not discussed the User Interface or what's going to be displayed, but I'm sure you have some ideas (which may, or may not, make sense). Given all this does is turn some lights on and off, I'm guessing you're planning to set up a time for them to be 'ON', or maybe some schedule (though no RTC so unlikely).
Well yes, I might be overthinking stuff. I am just excited by all the new learnings and try to apply it in one product. I will stop that :)

Yea, I have some ideas for the UI. Like I said, I am working on including capacitive touch buttons with a glass overlay. I am planning to use a external resonator for accurate timing, since the internal oscillators on the ATmega chips are not really accurate. And apart from that, the UI is going to be mostly display flashing and buzzer sounds.
 

Irving

Joined Jan 30, 2016
5,124
Well yes, I might be overthinking stuff. I am just excited by all the new learnings and try to apply it in one product. I will stop that :)

Yea, I have some ideas for the UI. Like I said, I am working on including capacitive touch buttons with a glass overlay. I am planning to use a external resonator for accurate timing, since the internal oscillators on the ATmega chips are not really accurate. And apart from that, the UI is going to be mostly display flashing and buzzer sounds.
Capacitive touch buttons are icing on the cake, but atmega328 processor doesn't support them natively. Suggest Ti's LDC2114 if you must...

What timing do you need to be accurate? You can calibrate the atmega328 internal clock and store that in NVR.
 

Thread Starter

redgear

Joined Oct 17, 2019
136
Capacitive touch buttons are icing on the cake, but atmega328 processor doesn't support them natively. Suggest Ti's LDC2114 if you must...

What timing do you need to be accurate? You can calibrate the atmega328 internal clock and store that in NVR.
I will check out Ti's LDC2114, I was looking at the Microchip CAP1206. The timing for switching the bulbs off after is has been started. What's a NVR?
 

Irving

Joined Jan 30, 2016
5,124
The atmega328 has 1kbyte of non-volatile EEPROM for remembering stuff across resets. So using the internal oscillator you measure the time for, say, a nominal 10sec and work out a correction factor, then store that for future use with a calibration program.

The CAP1206 will work too.
 
Top