Now Reading
Constructing the Pocket CO2 Venture

Constructing the Pocket CO2 Venture

2023-04-26 14:55:58


Most of my earlier posts have been targeted on software program subjects. I will stray somewhat into {hardware} for this text. On the finish of 2022 I made a promise to myself to discover ways to use KiCad in order that I might design my very own printed circuit boards. I’ve some expertise with electronics and I assumed that I might design some comparatively easy PCBs for my very own use. I discovered this 100 minute YouTube tutorial and it offered sufficient sensible information to get me began. This weblog put up isn’t about studying KiCad; as an alternative I will stroll via the entire steps and gear obligatory to construct my Pocket CO2 sensor undertaking. The KiCad information and firmware might be discovered here.

Floor Mount Soldering is Simple?

After seeing movies {of professional} makers resembling Seon “Surprising Maker” Rozenblum use pick-n-place machines to construct complicated PCB boards utilizing impossibly small elements, I wrongly assumed that SMD soldering required costly gear and many experience. To get to Seon’s degree, you do want costly gear and many experience, however there are a lot easier SMD PCB tasks that may be accomplished with cheap instruments and little or no expertise. Through the years, I had tried at varied instances to work with some SMD elements on tinned proto-boards utilizing a fantastic tip soldering iron. I used to be in a position to clumsily solder just a few 0603 elements and destroy/take away others, nevertheless it ceaselessly resulted in irritating failures. What made it a lot simpler was my first new piece of kit – the recent air rework station. It sounds extra spectacular than it’s; extra akin to a excessive temperature hair dryer.  I bought one in all these 858D clones (see beneath) for about $35. There are a lot of variants of this available in the market, however they’re all very related. It has a knob to regulate the fan pace, buttons to lift or decrease the temperature and a warmth ‘wand’ on a brief cable. For security, there is a magnetic change which turns off the heater when it is sitting within the holster.

With solely the recent air gun and a great pair of tweezers, it is doable to solder or rework (easy) SMD PCBs with minimal frustration. That is simply the “getting began” instrument and definitely not one of the best or just one for  SMD interest work. If you do not have loads of further area or finances for the extra superior instruments, then at the very least you will get a really feel for it with out investing too closely. There’s a lengthy listing of instruments individuals use for working with floor mount elements resembling reflow ovens, sizzling plates, pick-n-place machines, microscopic cameras, suction pick-up pens, and on and on. I haven’t got the area or finances for them, so I make do with the recent air gun and I just lately added a reasonable ($40) sizzling plate:

The rationale I say that it is simple (in comparison with via gap soldering), is that half placement or elimination goes a lot faster. As soon as solder paste is utilized and elements are in place, just a few seconds beneath the recent air circulation and you may solder the entire board directly. Eradicating components is simply as easy – blast them with sizzling air they usually slide proper off the board.

Element Selections

It is helpful to clarify why I selected every particular part and dimension. I have been on a form of mission for the final a number of years to have some helpful information about the whole electronics market – price, capabilities, availability. I just lately grew to become conscious of low price RISC-V MCUs from and determined to strive utilizing them in some tasks as a studying expertise. With that as a place to begin, the targets of the Pocket CO2 undertaking had been to maintain BOM prices as little as doable and have a tool that matches simply in tight denims pockets. I typically regarded for the smallest and least costly components for this undertaking. This is a rundown of every part I selected and why:

MCU – CH32V003
The TSSOP20 model of this chip is comparatively simple to solder (in comparison with the QFP/QFN), has loads of uncovered I/O and value me about 17 cents every for Qty. 50. It has loads of pace and sufficient inner RAM/FLASH to do fairly just a few duties, so it appeared like a sensible choice. After writing the firmware, I am hitting the 16K FLASH restrict and want to have extra space, however 16K is the one alternative for this chip. The following model of this system will transfer as much as the 48 cent CH32V203.

Sensor – SCD40
I’ve examined Sensiron’s SCD40, SCD41 and a MH-Z19B. The SCD40 is the smallest and lowest price true CO2 sensor I might discover. There are loads of tiny/low-cost VOC (risky natural compound) sensors that declare to report “eCO2” values. I wrote about these in another blog post. The SCD4x delivers dependable outcomes, does not use an excessive amount of energy and as a bonus, features a temperature and humidity sensor. The one down aspect is the SMD footprint is unnecessarily difficult.

Show – SSD1306 128×64 OLED
That is my go-to show for a number of causes: day/evening readability, low price, low energy utilization, quick show replace, a number of suppliers, a number of shade selections, and easy I2C communication. For this undertaking, the breakout board model saved me some soldering complications and was about the identical value because the uncooked show panel. It additionally allowed me to cut back the 2D dimension of this undertaking by having the show board sit on high of many of the different elements.

Energy Supply – 3.7V LiPo Battery
I hoped to run this board from a coin cell battery for improved security. It is not doable to run the SCD40 from a coin cell as a result of it has temporary energy spikes as much as 250mA. The inner resistance of disposable coin cells prevents them from sourcing that a lot present. LiPo batteries can deal with enormous present spikes with out the voltage sagging. The typical energy use of the sensor might be beneath 1mA in low energy mode (samples as soon as each 30 seconds). I help this mode with a menu possibility known as “low energy mode”. On this mode, the show is off till you press a button after which it is going to present the info for five seconds and switch off once more. I additionally lowered the default MCU clock from 48Mhz to 8Mhz; this enables it to eat just one.8mA whereas working; RISC-V 32-bit @8Mhz continues to be loads of pace to do the job. The OLED show makes use of solely 2-4mA when lit as a result of lower than half of the pixels are on. In steady mode (samples each 5 seconds), and the show lit always, it averages about 8mA of complete present draw. A 200-400mAh battery can be a great dimension for this undertaking.

3.3V LDO Regulator – WL9005S5-33R
LCSC had this half on sale for 3 cents once I purchased them. It makes use of a typical SOT23-5 footprint and has quiescent present that is not too horrible. I do not really feel too dangerous about utilizing a mediocre LDO for this undertaking as a result of the facility change utterly disconnects the battery.

LiPo Cost Controller – TP4057
This chip is small, low-cost and does the job of managing/defending the charging of the battery from the USB 5V energy. It solely wants 1 resistor to set the utmost cost present and offers 2 LED outputs to point charging/charged.

The Relaxation
I feel 0603 SMD components are a great steadiness between “take up a small quantity of board actual property” and “too small to see”. They’re additionally very inexpensive from sources like LCSC.

The elements wanted apart from the 0603 LEDs, resistors and capacitors

Making use of Solder Paste

That is the place private alternative will most likely information the way you do issues. I take advantage of 60/40 tin/lead solder paste as a result of it melts at a decrease temperature and customarily reacts properly to the HASL (sizzling air solder leveling) end I select for my PCBs. Most of the SMD elements have restricted temperature tolerance, so lowering the solder soften temperature protects them from getting broken. The SCD40 soldering directions inform you to make use of a comparatively low temperature and keep away from hitting the permeable membrane on high.

The following alternative is whether or not or to not use a stencil to use the paste. I’ve efficiently used stencils on a few of my boards, however I have been going for minimal price on my newest PCBs by skipping the stencil. I’ve gotten good outcomes doing it by hand as a result of I can management how a lot solder paste is utilized. An excessive amount of paste could cause tiny pads to brief collectively. I combine the paste with further flux (it already has flux, however extra is best). This makes it much less viscous and simpler to unfold. I take advantage of solderless breadboard wire as a solder “paintbrush” to use it to the PCB (see picture beneath).

As soon as the paste is utilized, The elements might be positioned on the board with a tweezer. The harder ones are LEDs or diodes. They solely work in a single path, so I check them with a 3V energy supply earlier than putting them. It is exhausting to see the polarity marker with the bare eye. I haven’t got a microscope, so I take advantage of my cellphone digital camera at 3-10x zoom to see if the entire pins are lined up with the pads. 0603 resistors and capacitors might be skewed or off-center somewhat, however the micro-b USB socket and TSSOP20 footprint of the MCU have to be positioned with excessive precision to not brief or miss the tiny pins.

Baking / Reflow

As soon as the elements have been positioned on the board, they largely keep in place due to the viscosity of the solder paste. There isn’t any hurry to bake the board as a result of the paste does not dry in air. For this construct, I additionally use a sizzling plate and set it to 150C. It will get the solder near its melting level, then I can blow sizzling air on every set of pins to soften the paste. You may see the solder paste go from uninteresting to shiny when the solder melts. With the recent plate as a pre-heater, the melting happens rapidly. With out the recent plate, you must preserve the recent air blowing on the spot a bit longer to warmth up the PCB first. Ensure you have a silicone rubber mat or different warmth resistant floor as your work space. When all the pieces has been melted, I let the recent plate settle down (it does this relatively slowly), earlier than eradicating the board. You most likely seen that I did not solder the SCD40 in place but. If there is a defect on the PCB or I messed one thing up badly, I do not wish to threat soldering an costly half. It is easy sufficient to solder only one further half after all the pieces checks out. If I’ve to take away the SCD40 to make use of on one other board, it might get broken within the technique of soldering/de-soldering it a number of instances.

Inspection / Pre-Energy Testing

After the board cools, I take advantage of isopropyl alcohol to scrub off extra flux. The soldered pins might not look very shiny despite the fact that the joint is soldered properly. Contact every part to ensure it is soldered down. Utilizing much less flux will get shinier outcomes, nevertheless it will not enable the solder to circulation as simply in the direction of the pads/pins. Subsequent I visually examine the board for any apparent shorts or issues. If there’s extra solder, I can add somewhat flux to the spot and soften it with my fantastic tip soldering iron. I can often eliminate little solder bridges this fashion. As soon as issues all look good to the attention, then I take advantage of a continuity tester to guarantee that GND/3V/5V will not be shorted. I then proceed to check varied connections on the board (e.g. GPIO pins to buttons). If all the pieces seems to be good, then I solder on the 3-pin programming header and attempt to load firmware onto the CH32V003. This is what I discovered for this particular construct:

– Program loaded efficiently utilizing the WCH-LinkE SWDIO programmer

– Operating the code for the primary time revealed that one of many indicator LEDs wasn’t working. The resistor subsequent to it had one aspect not soldered properly.

– Subsequent, related USB 5V to verify the battery charging circuit. Neither cost nor prepared LEDs lit. Once more, the resistor subsequent to them was not soldered properly.

– After fixing the resistor with the soldering iron, cost+prepared LEDs each gentle.

– Soldered PH2.0 connector, related battery and checked present draw with low battery related. I chosen a max present of 300mA with a 3K resistor on the TP4057. The present meter confirmed 298mA; all is properly.

– Positioned the OLED breakout (unsoldered) into the pin sockets, powered up the board and the show confirmed the menu accurately. Good 🙂

Conclusions up to now: I ought to have used extra solder paste on the resistors. A tiny dot of diluted paste wasn’t adequate to make stable connections. Fortunately the board is not that dense and I used to be in a position to attain the issues with my soldering iron with out disturbing close by components.

Ultimate Steps

Now that the primary components are examined, it is time to connect the SCD40 and show. I am utilizing components I recovered from an early model of the board; I broken them a bit when eradicating them, in order that they have a slight burnt tinge. Some early makes an attempt with the SCD40 (with stencil) didn’t solder accurately. I imagine the issue was an excessive amount of solder and shorts forming beneath. The previous couple of instances I soldered it with a lot much less solder and it succeeded. This is a photograph of my solder paste utility for the SCD40. Only a dot on every pad and a glob for the bottom aircraft. You possibly can see why I am not happy with Sensiron’s footprint – there are solely 5 distinctive pins, the remaining are no-connect / not used. A a lot easier footprint might have been accomplished with the identical 5 connections and the identical bodily and thermal properties.

See Also

I take advantage of loads of kapton tape when transforming a single half. This serves to dam a few of the warmth from the components I do not wish to re-flow. Within the picture beneath, I’ve positioned the SCD40 very rigorously with a tweezer and surrounded the close by elements with tape. Now it is able to warmth.

I set my warmth gun for 280C. I did not wish to use the hotplate due to the plastic components on the underside aspect. I overdid it a bit with the recent air. The soldering job was profitable, however I toasted the highest membrane a bit. I added masking tape to the again of the OLED PCB to guarantee that the elements do not make electrical contact with something on my PCB:

It really works!

The differing pixel brightness is because of the OLED show framerate sync being totally different from my digital camera’s. It is not simple to get good pictures of OLED shows. Nevertheless, the higher left nook of the show acquired barely broken once I desoldered it from the older board. The massive metallic piece protruding of the USB socket is the magnetic coupling I like to make use of on all of my gadgets. Consider it like “magsafe” for all the pieces. I discovered these magnetic USB cables over 3 years in the past and have been more than happy with them. They’re reversible, have energy+knowledge and maintain properly.

Closing Ideas

This undertaking was and continues to be is a private/household one; I did not conceive of it within the hopes of promoting it. I prefer to share my private tasks as open supply as soon as they get to a secure/working state and if it is helpful, a weblog put up to go together with it. I feel this deserved some phrases written about it from the teachings I realized when constructing it and once I overlook a few of these particulars I can return right here to be reminded. It was definitely satisfying to go from idea to design to working undertaking with each {hardware} and firmware (making HW is kind of new to me). I am inspired to strive making extra elaborate/complicated tasks sooner or later.

Issues I like:

– The scale is cute+sensible
– It capabilities as I envisioned

– The vibration motor was a great addition that permits sight-free utilization + a timer alert

– The battery life is sweet for its use case

– The BOM price is low

– It is not tough to assemble

Thanks for studying to the top…

Source Link

What's Your Reaction?
In Love
Not Sure
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top