Zach of All Trades
Zach of All Trades
  • 5
  • 73 031
Which 10 Cent Microcontroller is Right for You? Comparing the CH32V003 to the PY32F002A.
The WCH CH32V003 and the Puya PY32F002A are both ultra-cheap 32-bit microcontrollers. Coming in at around 10 cents each, these are perhaps the cheapest flash-based microcontrollers a consumer can buy. But are they worth it? In a previous video I explored the Puya PY32 series in detail, with their Cortex M0+ core. The hype got to me though: is the RISC-V based CH32V003 better?
In this video I explore the CH32V003 in detail, comparing it to the PY32F002A. I’ll first discuss the differences between RISC-V and ARM Cortex devices in general, giving my thoughts on where both stand. I’ll then walk through use cases where these 10 cent parts make sense to use before discussing the actual cost and availability of the chips. Following this, I highlight the features of each chip to see if there is a clear winner on paper. Next I get out a CH32V003 development board and check it out in the real world by replicating the two examples I previously did for the PY32. To conclude, I give the final verdict: is the CH32V003 the better choice for your 10 cent microcontroller needs, or are you better off sticking with the tried and true Cortex M0+ core in the PY32?
Here is the previous video where I talk about the PY32:
czcams.com/video/qWRowOsYSLY/video.html
Check out these previous videos where I’m putting the PY32 to use!
Programming the PY32 for the tile backsplash project: czcams.com/video/wtv82TfahRA/video.html
Introduction to the smart LED tile backsplash project: czcams.com/video/3QHFTsDGk6E/video.html
Chapters:
00:00 Introduction
01:19 RISC-V vs. ARM Cortex M
06:55 When should you use these
10:07 Cost and availability
12:43 Feature comparison
15:11 Getting started with the CH32
18:32 LED blink example
22:13 Sending ADC value over serial example
24:05 So which is better?
Link to the GitHub repository for the CH32V003:
github.com/openwch/ch32v003/tree/main
Links to some of the items I’ve used in this video:
CH32V003, CH32V203, LinkE Package (the one I purchased): amzn.to/45e1rRN
CH32V003, CH32V203, LinkE Package (slower delivery): amzn.to/4ehvcVK
Quality Breadboards: amzn.to/45gL9HE
Jumper Wires: amzn.to/3VuKcbv
As an Amazon Associate I earn from qualifying purchases.
Links to the chips on LCSC:
CH32: www.lcsc.com/search?q=ch32v003
PY32: www.lcsc.com/search?q=py32f002
zhlédnutí: 17 824

Video

Designing and Building a Precision 3D Printed Solder Paste Printer!
zhlédnutí 2,1KPřed měsícem
In this video I cover the design, construction, and use of a 3D printed precision solder paste stencil printer. Applying solder paste to circuit boards for modern miniaturized electronic components is a daunting task. The stencil must be precisely aligned and flat to the board. I found cheaply available stencil printers subpar, so I decided to make my own. This stencil printer is based upon an ...
The Cheapest Microcontroller? Getting started with the 10 cent Puya PY32.
zhlédnutí 55KPřed 2 měsíci
The Puya PY32 is an amazingly cheap 32-bit microcontroller with an ARM Cortex M0 core. These parts can be had for under 10 cents each in modest quantities, making projects requiring large numbers of microcontrollers affordable for us DIYers. This video gives a brief introduction to the Puya PY32F0 series of microcontrollers, starting first with the benefits and drawbacks. I’ll then discuss the ...
Programming the Smart Backsplash - Writing Code for the Puya PY32 Microcontroller
zhlédnutí 1KPřed 3 měsíci
In this video I cover programming the Puya PY32 microcontrollers for the RGB lit glass tile backsplash project. Each group of two tiles in the backsplash will have a circuit board with a ten cent Puya PY32 microcontroller. The microcontroller will monitor two microphones, one on each tile, to determine if a tile has been tapped. It will then relay the amplitude of that tap to the processor that...
LEDs, Microcontrollers, and Microphones - The World’s Most Complicated Backsplash?
zhlédnutí 676Před 4 měsíci
Join me as I discuss my latest project - building a glass tile backsplash with individual LEDs on each tile. I'll also be adding touch sensors to each tile to implement touch feedback, using a distributed processing technique, and leveraging the existing LED communication protocol. We'll cover electronics design, LED protocols, PCB fabrication, soldering, and... home improvement? To do this, I'...

Komentáře

  • @hugoboyce9648
    @hugoboyce9648 Před dnem

    Great video! Some additional info I would have liked to learn for these parts: How is the interrupt controller? A full NVIC or a single interrupt with the firmware having to manage everything? Or something in between? Also, the hardware multiplier situation, 1 or 32 cycles for the Arm? How about the RISC-V ? These things, depending on the application, can have a lot more impact on the performance than just the number of MHz.

  • @TheNamelessOne12357

    These chips might not just suddenly disapear from market, but can be suddenly changed. No notice from manufacturer, no errata, just sudden different behaviour. Might be OK for such simple MCU, but requres extensive testing for mass production, which costs.

  • @elsayedayman7003
    @elsayedayman7003 Před dnem

    simple and easy thanks

  • @Clark-Mills
    @Clark-Mills Před dnem

    Jumping onto RISC-V early will be a PITA for now but the sooner we transition the sooner adoption / mass-production ramps up. Same thing with Linux in the early days...

  • @anon_y_mousse
    @anon_y_mousse Před dnem

    The day when an enthusiast can just print a chip is fast approaching and I love it. You're right about using a high level language making the underlying hardware matter less, but if I ever have to implement my own compiler for that piece of hardware I'd rather have a CISC chip than either of these options and as I said, such a day is not far off.

  • @user-cl6qz1nx8m
    @user-cl6qz1nx8m Před dnem

    It would be good to add some examples of how you connected controllers, flashed, laid out boards. Could you tell us anything about IDE peculiarities? You said there are no simple examples, can you share what you have done? Maybe some starting guide on CH32V003? Do you have a Git?

  • @charlesmanning2266

    10 cents is the onesy,twosy price. If you were designing 10k units it would be closer to 5 cents.

  • @charlesmanning2266

    I've used a some WCH parts for some experiments. Nice and cheap and fast, yes... Not much SW reference material though. Documentation is poor relative to STM32 etc.

  • @BastetFurry
    @BastetFurry Před dnem

    Just my two cents, but if i don't have special needs and build a one-off, nowdays i will always choose a RP2040. I can get a knock-off board for ~2€ on AE, RPi Foundations documentation and SDK are sublime and there is no special hardware needed to program one. Even debugging, just use a second RP2040 board and upload the official debug tool to it. This is a ecosystem every other vendor should grab a page off.

  • @christopherguy1217

    I'd much rather have complex examples than just simple ones. It's in the complex examples you can get a better understanding.

  • @luiscarlosguerrerovelazque9847

    i bought the same bundle and i think the ch32v203 is the real deal if the prices keep low, just different applications

  • @CNLohr
    @CNLohr Před 2 dny

    Please try ch32v003fun. All the programmer stuff (reconfig from all interfaces) and semihosting with printf back through the SWD port is builtin to the dev env, along with a huge pile of examples.

  • @zadintuvas1
    @zadintuvas1 Před 2 dny

    I think Cortex M0 is free with no licensing fees as ARM decided to compete with RISC-V at the low end.

  • @YoutubeBorkedMyOldHandle_why

    Thank you ... great video. So ... actually, this is the first time I've even heard about the PY32F002As. I guess I never watched your previous video ... sorry about that! They look interesting though. I was super impressed with the WCH chips when I first heard about them: First, because I've used the CH340 chips a lot, which are really useful, so WCH seems like a reputable company. Second, yes, I really do care about Risc-V. I don't necessarily see it as better than ARM, but it is an open source alternative, which I do think will become a lot more common in the near future. Possibly unintended, but the US trade war with China is driving the Chinese to find alternatives, and Risc-V is clearly on the list. So it's a curiosity, and one of my curiosities was programming in Risc-V assembly, which I'm happy to say works just fine on these boards. Third, they are cheap. And by cheap, I mean not just the chips, but also the dev boards, and the hardware debugger which only costs a few bucks. Compare this to the Atmel debuggers for example, which cost hundreds of dollars. Fourth, the ecosystem. Microcontrollers, regardless of cost, are useless unless you have a properly configured toolchain and easy access to documentation and examples. And I have to say, that for a Chinese company, WCH has gone out of its way to make this pretty darned easy for us English speaking hobbyists. There is better, but right out of the box, I was easily able to get things up and running. This is important and naturally leads to lots of 'word of mouth' community support (Arduino for example.) I suspect that your major criticism (poor availability), is precisely because everyone is buying these chips. So, I actually see this as a positive. I bought a bunch of CH32V003 and also CH32V203 boards and chips. My first project was to design my own development boards for both chips. Basically, my boards are the same as theirs, except I added a PMOD to the end of each board, so the debugger plugs directly into it (no messy wires etc.) I had no issues doing this and the boards work fine. WCH also has a line of 8 bit microcontrollers (CH551/552 etc,) based on the E8051 architecture, which are quite interesting. These are quite cheap, are supported in Keil, and also with open source software. I understand that they support HID, so you could use them to emulate a keyboard etc. I bought some of these too, though I've yet to do anything with them. Based on your assessment, perhaps I'll pick up some of the PY32F002A chips next time I place an order with LCSC, but I'm not in a big rush.

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      I agree with many of your points. The documentation in English is very nice. I've looked at some of the other WCH chips as well but haven't had the chance to play with them. If you do check out the PY32F002A look up how to run it as a PY32F030. Solves most of its limitations. I've been meaning to make some development boards that do this for my personal use, super small like 1cm square. Perhaps the topic of another video.

  • @lucasmontec
    @lucasmontec Před 2 dny

    you're less confortable ordering from ali? Why? I have ordered there for many years and always received absolutely perfect products. Never had any issues with components.

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      A lot of it is the buying experience, varied shipping times (sometimes I forget I've even ordered something when it arrives), the multitudes of different vendors with questionable reviews, the risk of counterfeit parts (probably not an issue here), poor searching, not being a one stop shop (still need an lcsc or digikey order), etc. If they have what I need and I'm pretty sure I know what I'll get I'll order from AliExpress, but it's not my preference

    • @lucasmontec
      @lucasmontec Před 2 dny

      @@AllTradesZach do you have an alternative international source for parts? Or do you go for a local retailer? I go for AliExpress because Brazil had absolutely zero good retailers, it's all just drop shipping and mostly from Alibaba, so I just go directly to the source and spend the time to find the stuff myself.

    • @ChrisSmith-tc4df
      @ChrisSmith-tc4df Před 2 dny

      @@AllTradesZachI’ve had mixed experiences on AliExpress. Some vendors are on point, while another shipped me FeRAM’s half of which ended up being well-used pulls with some being EOL with stuck/sticky bits. They fought me tooth and nail, and I ended up with half of the chips that I ordered at twice the price.

    • @imlassuom
      @imlassuom Před dnem

      And I live in the moon!

  • @thomasesr
    @thomasesr Před 2 dny

    What about the 3 cent Padauk microcontroller?

    • @Scrogan
      @Scrogan Před 2 dny

      one time programmable

    • @No-mq5lw
      @No-mq5lw Před 2 dny

      That lives in a completely different class than these as it's a closed source 8 bit mcu

  • @toddbu-WK7L
    @toddbu-WK7L Před 2 dny

    Another HUGE reason to be excited about RISC-V is the modular nature of the ISA. If you only want pieces of it then you can just take those pieces, which means that you don't have to implement **every** instruction available in the instruction set to be in compliance. This also means far fewer transistors, heat, power, etc. To the degree that I am able, I do everything in RISC-V now. I am tired of all of the x86 / ARM licensing shenanigans.

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      Yeah, x86 in particular is a disaster. Do you think the piecemeal nature of RISC-V will have a negative impact on tool chain support though? It seems like there are already so many different combinations of instructions available

    • @ChrisSmith-tc4df
      @ChrisSmith-tc4df Před 2 dny

      @@AllTradesZach I suspect that many a project will forget the compiler flags to enable optional ISA extensions and therefore not benefit from them anyway. 🤷🏻‍♂️

  • @colly6022
    @colly6022 Před 2 dny

    wtf RISC-V is already like 10 cents per chip?? i remember when these chips were insanely expensive.

    • @Scrogan
      @Scrogan Před 2 dny

      It’s got the specs of an 8-bit AVR, the V203 is more like a proper 32-bit STM32 in specs.

  • @logskidder5655
    @logskidder5655 Před 2 dny

    From ARM website for the Cortex-M0 APIs "For silicon designs, Arm Flexible Access offers the Cortex-M0 at $0." Of course there are caveats to that "Flexible Access", but models including power, I/O, etc. are readily available.

  • @ntal5859
    @ntal5859 Před 2 dny

    I just asked Claude ai to show me ch32 timer code .. it wrote example in 2 seconds.. reading manuals is so yesterday.

  • @the_real_glabnurb
    @the_real_glabnurb Před 2 dny

    LCSC's stock is garbage. Even if they have limited or no stock of a part there could be plenty of supply of it. I recently ran into this problem when I wanted to use jlcpcb's online tool for parts supply & PCBA of a few thousand PCBs, because they are really cheap. But alas there was simply not enough stock of really common parts of chinese manufacturers (cmps, ICs, connectors) I needed. So I ordered at my usual chinese PCBA house and all parts could be immediately sourced, no problems!

  • @lohikarhu734
    @lohikarhu734 Před 2 dny

    Seems like a good 'real world' comparison, looked at from several perspectives. Hyvää

  • @PeetHobby
    @PeetHobby Před 2 dny

    5:19 RISC-V is designed to be cheap and small, not to be fast. In practice, RISC-V cores often need more clock cycles to execute the same tasks as ARM cores, especially the highest M series. This is because ARM cores have more powerful instructions that can accomplish tasks in fewer cycles than would be required by RISC-V. Unless a RISC-V core is clocked significantly higher(My guess would be at least 4 times or more), it will generally perform slower. When comparing clock for clock, RISC-V tends to be slower than most other 32-bit and 64-bit instruction sets. Edit: 5:35 CH32 MCUs are IMO beginner-friendly. WCH has their own IDE, Mounriver Studio, which lets you easily start new projects without knowing anything about the SDK or toolchain. Plus, the programmers cost next to nothing. For all series except the 003, you can use a cheap cloned 1.1 programmer that costs around 1-2 bucks. However, the 003 requires a 1.3 programmer, and while there aren't many 1.3 clones yet, the official one costs a whopping $5. 😋

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      Would be interesting to test this, some of this also boils down to the exact implementation, as you can implement certain instructions the fast way or the small way.

  • @lohikarhu734
    @lohikarhu734 Před 2 dny

    I was responsible for developing "common hardware" ICs in a company doing 400 million devices per year, and it was very, very important to minimize external parts needed, optimize pcb layout, and optimize solution size, and optimize software development, with device cost one part of the overall equation...it's amazing how adding a couple of resistors or capacitors to a solution blows up board size, routing complexity, and cost, while ease-of-use in software development speeds up the development process, and may reduce software 'spins'...anyway, just to put an ! to youre discussion....oh, and we had embedded cores 14 years ago, to manage multiple I/O devices into virtual devices, and offload the cpu, and drastically reduce power consumption...

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      Very true, touched on that a bit in the video as well. The nice thing about both these is that they require very little to run, just a couple capacitors and resistors. That's also why I'm using the QFN package on the Puya, to keep by boards small and cheap.

    • @charlesmanning2266
      @charlesmanning2266 Před dnem

      Certainly when you're doing large volumes then it is worth the extra effort to reduce BOM cost. However sometimes the numbers are not there to support the extra effort.

  • @PeterMMMMM
    @PeterMMMMM Před 2 dny

    Automatic subscribe just because of your channel's name

  • @FriendlyIntentions
    @FriendlyIntentions Před 2 dny

    You kinda went the wrong way about with thee WCH ch32v003. You need to do VIA Platformio with the Arduino core by CNLohr, you even get USB on the chip and a boatload of other stuff

  • @mikeselectricstuff
    @mikeselectricstuff Před 2 dny

    Re. HAL documentation - it rarely makes sense to use the HAL for the simple functions available on these MCUs as the code ends up bloated & slow. HALs only make sense for complex stuff like USB & networking. The way the WCH HAL does simple I/O is a real mess. Much better to just read the manual and set the registers to do exactly what you want

    • @nezbrun872
      @nezbrun872 Před 2 dny

      'Twas ever thus. We've all fallen into the vendor trap that pushes us to use an API or framework, and initially it seems like a Great Idea. However these APIs and frameworks tend to have the lifespan of a mayfly, and, furthermore, they don't absolve you from RTFM on the device datasheet. Unless you're looking for a USB or TCP/IP stack, write and maintain your own library of boilerplate code.

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      Sure, the HAL can overcomplicate things, especially for just toggling an LED. I was trying to aim the examples more at beginners though where a "GPIO_Set" function is less intimidating than setting a register, bit masking, etc. I haven't dug into their I/O HAL driver really, I'll take a look and see what you're talking about.

    • @Scrogan
      @Scrogan Před 2 dny

      Isn’t there an alternative lightweight HAL-like thing to use? I just want to make code that’s more portable. Maybe it’s just a matter of adding a bunch of #ifndef clauses at the top of my programs, but that does feel tedious. Are there bitmask/bit names at least?

  • @mikeselectricstuff
    @mikeselectricstuff Před 2 dny

    For production use, a benefit of the WCH is they make a really nice & very cheap standalone programmer, which can easily be integrated into a production test jig.

    • @ChrisGammell
      @ChrisGammell Před 2 dny

      I dunno, I would really need to see some kind of review of this production test jig in order to know more about it...

    • @simontillson482
      @simontillson482 Před 2 dny

      @@ChrisGammell Why? By definition, every production test jig is unique and designed for the production in question. There is no such thing as a universal test jig. Their cheap, simple and available programmer just makes it easy to add it in to any test jig a company might need.

    • @mikeselectricstuff
      @mikeselectricstuff Před 2 dny

      @@ChrisGammell czcams.com/video/Qnt_43PZcyo/video.html

  • @edwardfletcher7790
    @edwardfletcher7790 Před 2 dny

    Any Microcontroller in a BGA format is a no go for most hobbyists. It's a terrible design for non machine assembly. I'm totally ignoring anything to do with performance and SW support.

    • @laurensweyn
      @laurensweyn Před 2 dny

      If you care enough about costs in a hobby project that you need a 10 cent part, you're probably planning something at scale, in which case getting a hot plate and solder stencil setup will save you a lot of time and cost in the long run if you need to make a lot of something, or something very small

    • @backgammonbacon
      @backgammonbacon Před 2 dny

      You can get the whole board including SMD manufactured for peanuts now no idea why you would do it yourself when its so cheap to outsource small production runs. For single projects Zach told you to use the mainstream dev boards I would suggest watching the whole video before posting not just up to the first thing you disagree with.

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      Neither of these parts even offer BGA options. The Puya shown in the picture is a QFN part which isn't all that hard to solder by hand.

  • @mehmetkendi6067
    @mehmetkendi6067 Před 2 dny

    Thank you!

  • @AmauryJacquot
    @AmauryJacquot Před 2 dny

    it's bitluni's fault... he took the whole stock for his CH32 mega cluster 🤣

  • @JH-pe3ro
    @JH-pe3ro Před 2 dny

    CH32V003 has been the subject of some discussion as a retrocomputing device that happens to use RISC-V ISA. That's a hot space now for hobby projects - both the idea of "DIY RISC-V computing" which has manifested in all sorts of forms, and the fact that you can build an excellent, cheap 8-bit computer by pairing a vintage chip with a bigger modern MCU for signal generation, as is done in Agon Light or Neo6502. There's an undercurrent in the software space to try to reexamine the low-level stack and bring back user control and RISC-V understandably soaks up some of that interest. For that kind of thing, the whole point is to be able to get very hands-on with the machine and experience some pride of ownership in how it handles data, so the ISA selection does matter in a different way from building a device where the computing is instrumental to reading sensors and blinking lights - with those projects, the Puya chip is probably fine, too. For one example, the designers at Olimex recently announced a board called RVPC that is the "cheapest RISC-V computer" - CH32, keyboard, VGA text terminal output, a buzzer, and an assembly language monitor. I told them that it doesn't really have enough memory to be fun to program, but they wanted to hit a 1 Euro price point for a through-hole project kit, so the 2K/16K is all you get, and most of it will go to the firmware. They promise to do a bigger design later, probably using a different RISC-V MCU.

  • @truectl
    @truectl Před 2 dny

    The PY32F0xxA series internally are all PY32F030. This means you should be able to use the additional peripherals, 4K of RAM and 32K of Flash, as well as the PLL for faster clock (potentially anyway). Of course this isn’t datasheet spec, but all I have used in projects work fine with DMA and additional flash and RAM. YMMV.

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      I did mention this briefly in the video. I chose to stick with what the datasheet says for this video, but if you do "unlock" the PY32 then it wins pretty much across the board. It's just not guaranteed that it will always be the case, there is a chance that they're packaging lesser performing chips as the -002s and better ones as the -030s. It's just as likely that they're exactly the same though...

    • @truectl
      @truectl Před 2 dny

      @@AllTradesZach While undocumented features of the main core not guaranteed, it’s highly unlikely to change. This core is quite small, this is an embedded part, there is no lockout implemented in hardware, and there is large NRE to try to segment this. Maybe that’s what the PY32F002B is supposed to be. Look at STM32F103x8 for example. Per DS spec they have 64K flash but for over a decade they’ve been usable with 128K. Order the larger part if you need guarantees, go with the cheaper one if failure is acceptable. And even then, failure rate I have heard in the industry doing this for this specific part is very low. Fakes entering the chain is way more of a factor than using Flash that wasn’t specified for the part in the DS. For hobby or small scale noncritical (life safety, systems automation, etc) tasks using these features is fine. I’ll use undoc stuff particularly when I am not working to the margins of absolute specs but I ship mostly non-critical stuff at unit qty 1000 or less. Another small factor is pinout. The 002A has different pinouts available which may aide in trace routing. Though one probably wouldn’t specify a part this cheap based on that, lol.

  • @spehropefhany
    @spehropefhany Před 2 dny

    Thanks. It would be interesting to compare code densities between the cores, but that would require some effort to do right, probably require compiling a relatively large program without using a lot of HAL stuff.

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      That would be interesting, but a fairly in depth project. I also think that exactly what you chose to do with the code could make a difference, which is why there are so many different standards for benchmarking microcontroller cores.

    • @ChrisSmith-tc4df
      @ChrisSmith-tc4df Před 2 dny

      I suspect that the RISC-V will have a slightly lower code density due to the spartan nature of its ISA. But being both RISC, I suspect that they’d be close.

    • @spehropefhany
      @spehropefhany Před 2 dny

      @@ChrisSmith-tc4df That would have been my guess, but a web search came up with a claim that RISC-V was about 10% better <shrug>.

  • @yeroca
    @yeroca Před 3 dny

    In your comparison, you didn't mention power consumption. I would assume that the 48MHz processor consumes roughly twice what the 24MHz processor does. Also is it a fixed clock rate? i.e. can I slow it down to reduce power?

    • @greendragonmakerspace
      @greendragonmakerspace Před 2 dny

      You can clock them down to 8MHz off the internal RC oscillator and 4MHz from an external crystal and they also have low power modes from a 128kHz internal oscillator.

    • @yeroca
      @yeroca Před 2 dny

      @@greendragonmakerspace Interesting, thanks!

    • @greendragonmakerspace
      @greendragonmakerspace Před 2 dny

      @@yeroca I believe the power draw is a bit more than an attiny @AllTradesZach this might be an argument for the more expensive mcus for power critical applications

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      Yeah, sorry, I glossed over power. The video was getting too long and as @greendragonmakerspace says neither of these would be my first choice for low power applications. I believe they're both made on fairly large processes (hence being able to operate at 5V) which is a detriment for power consumption. It's also true that they both have clock dividers and low speed internal oscillators, as well as external clock options, so they can go slower to save power. I don't necessarily think that datasheets are useful when it comes to power consumption numbers (because I've seen them lie and they tend to use very specific operating conditions which may or may not match reality). I didn't get the chance to actually measure power consumption, so I didn't say anything. Both chips have sleep and stop/standby modes, the latter of which really decreases power consumption but takes time to wake from. A common approach for reducing power is to turn on, do what you need to do as fast as possible, then go to sleep for as long as possible. You can use a real-time-clock to generate the wakeup signal, which neither of these have (the PY32 actually does have it, since it is the same die as the PY32F030, but it's not a listed feature on the -002) or an external signal. The PY32 does have a low power timer which I believe is designed for this sort of thing though. The PY32 also appears to have better power consumption per the datasheets, but I'd want to test that side by side with the same code on both devices. The PY32 datasheet says on the order of 6uA in stop mode with the low power timer running. So I think the PY32 is the better option for low power battery devices, but I don't have hands on experience with this aspect of either of them.

    • @yeroca
      @yeroca Před 2 dny

      @@AllTradesZach Thanks for the detailed response! Using the exact same code for comparison isn't really possible due to the different ISA's, but the same source code makes sense. Stuff I tend to work on these days tends to be on the low power end of the spectrum, so for me it's important. Keep up the great work!

  • @perceptron-1
    @perceptron-1 Před 3 dny

    Hi! I've known the CH32 for years, and I haven't looked for anything cheaper since then. It's good to know how it is PY32, this is the first I'm hearing from you. Thanks. I plan to build a supercomputer with these chips. 40 years ago I built a supercomputer with 512 68000 CPUs, since then I have been waiting for processors to become cheaper, this seems to be happening now. Now the whole machine will be cheaper than 1 CPU then.

    • @AllTradesZach
      @AllTradesZach Před 3 dny

      No doubt, especially if you use either of these chips! You might even take a look at some of the higher end parts in these product lines as they might offer more performance for the dollar. I'd also check out the rp2040, although bear in mind that it needs a separate flash chip.

    • @perceptron-1
      @perceptron-1 Před 2 dny

      @@AllTradesZach I bought the RP2040 as soon as it came out, but it's too expensive for me for this project, even though it's very well priced and well worth it. I am building a supercomputer with 1 million processors and allocating only 1BTC to it. I'm looking for unencapsulated chips to be as cheap as possible, because I can solve the bundling, directly to the PCB. 16 x 16 chips on 2 sides, the 512 on a mini panel, and 2 x 32 x 32 of these are the cluster. I don't need a CPU that knows a lot, but a lot of parts that are cheap, that's the point. I cannot model this with software, because I want real-time hardware operation. It is needed for a neural network model, but I think this is not surprising.

    • @TheStuartstardust
      @TheStuartstardust Před 2 dny

      @perceptron-1 any details on the usage of such a setup? I'm intrigued! 🤓

    • @JimMaz
      @JimMaz Před 2 dny

      It's for world domination.

    • @perceptron-1
      @perceptron-1 Před 2 dny

      @@JimMaz Yes, in 1-2-bit LLM weight matrix calculation and energy consumption minimization and real hardware parallelism.

  • @greendragonmakerspace

    WCH is a large and reputable company started in 2004. Their chips (especially their USB chips) are in lots of mass-produced products. I've had their CH32v003 mcus in working boards for over a year now and still going strong. (not a shill, just a fanboy...)

    • @AllTradesZach
      @AllTradesZach Před 3 dny

      Fair enough, I didn't necessarily mean to imply that these were low quality or wouldn't last long. There are just some other companies that I have a long history using that I expect to be high quality, whereas I don't have enough experience with WCH or Puya to make that assessment. Plus, it speaks to the mentality of the engineer. If they used the cheapest microcontroller did they also use the cheapest capacitors, power converters, etc?

    •  Před 2 dny

      @@AllTradesZachis it it engineer mentality that dictates what the cost of production?

    • @plutonianfairy
      @plutonianfairy Před 2 dny

      To a certain degree, yes I suppose 🤔

    • @AllTradesZach
      @AllTradesZach Před 2 dny

      That is interesting question, could get very philosophical. I'd say that it is an engineer's job to make the absolute best design within the given constraints, one of which is certainly cost. I think we all want to make the best product possible all the time, but it just isn't possible within the constraints and tradeoffs, and often times the better product is the one that reduces production cost. Of course, it is often not the engineer's mentality perse, but that of accounting or management that make the directive that the engineer has to follow. If you're told you only have $1 for the total cost of the BOM you have to trim the fat somewhere, so you might end up reducing the quality everywhere. But I also think that cost and quality often come down to the engineer's decisions without the help of accounting/management. I've worked with people who try to cheap out everywhere they can to "save the company money" (and because sorting by cost is easy when shopping for a component) as well as people who will try to do the absolute best thing regardless of cost or time. And of course plenty of people who just aren't experienced enough and make less than ideal decisions that make products less reliable and more complicated. I find myself in that latter group regularly but learn something each time.

  • @abraxalito
    @abraxalito Před 11 dny

    The STM32F030 (previous generation to the STM32G030) is probably a closer match to the PY32's peripherals. This based on comparing the ADCs between the two. Curious to know - how much noise did you get on your ADC reading? I'm seeing rather a lot more than I'd like with mine and there aren't any packages which bring out the ADC supply on a separate pin (unlike the RP2040).

    • @AllTradesZach
      @AllTradesZach Před 11 dny

      I don't recall seeing much noise while reading off a potentiometer or when reading an analog mic. I'd say 2-4 LSBs max. I'm running off a pretty high end bench supply for the microphone test tho, but usb for the pot test. It would be nice to have analog supply and reference pins exposed, but when you only have 16 pins...

    • @abraxalito
      @abraxalito Před 11 dny

      @@AllTradesZach The 32pin package is the biggest and that doesn't have the ADC supply brought out. I've decided to go for the STM32G in the 48pin pack in my quest for a quieter ADC. Its about 2-3X the price though but has double the RAM.

  • @geartech3860
    @geartech3860 Před 11 dny

    You're not a microcontroller expert, you could have fooled me!

  • @taj-ulislam6902
    @taj-ulislam6902 Před 14 dny

    Very informative. Great! No nonsense video - real engineering approach. Well done!

  • @d.jensen5153
    @d.jensen5153 Před 16 dny

    One wonders about longevity. Will these same parts be available in three or five years? Will the company?

    • @AllTradesZach
      @AllTradesZach Před 11 dny

      Absolutely a concern. I wouldn't use them where there was substantial NRE involved, but us hobbyists are typically building one batch and moving on to the next project

  • @d.jensen5153
    @d.jensen5153 Před 16 dny

    Another factor is development cost. If you're already intimately familiar with a particular architecture and its tools, and can quickly crank out a bug-free design - that's worth a lot.

  • @skg901
    @skg901 Před 25 dny

    How many of those 500 will really work, its hard to predict

    • @Grunchy005
      @Grunchy005 Před 21 dnem

      Probably all of them, less the ones blown up by electrostatic discharge.

  • @JohnHansknecht
    @JohnHansknecht Před 28 dny

    Nice video, but you way overcomplicated the process. One generally only needs a flat surface, glass or plexiglass, then you put down your pcb and tape down similar thickness old pcbs around it to "lock" the board position, but it is still easily removed. Finally, you align a stencil over it and only tape one edge down to form a hinge. Lasts for thousands of boards. Your stencil is too thin. The stainless stencils from pcbway are completely flat on their own, so no need for vacuuming.

    • @AllTradesZach
      @AllTradesZach Před 28 dny

      Eh, overcomplicating things is half the fun. I wasn't originally planning on adding the vacuum but thought it might come in handy. I've used the method you mention, I even mentioned it in the video, but it has some limitations. For small pads like on QFN footprints it can be a bit difficult to keep the stencil aligned. I've also got a bunch of flex PCBs to do, which are only 8 mils thick and hard to locate. I haven't tried them with the printer I made yet but I'm hoping it makes them much easier. As far as stencils the 4 mil isn't too far off. I think a 5 or 6 mil and pulling the size of the pads in might be better, I'll probably try that for the next one, but it is easy to get too much solder under the QFNs (particularly ones with thermal pads). Thicker stencils are actually easier for me to make. The brass I used came in roll form (which was squished in shipping) and that wasn't ideal, I'm looking for it in sheet form. As I say in the video, it isn't financially beneficial for me to make my own stencils, but I like doing it and it allows me to make changes in 10 minutes.

  • @Really2950
    @Really2950 Před měsícem

    Flash size?

  • @Digithaiz
    @Digithaiz Před měsícem

    Nice work

  • @MSM5500
    @MSM5500 Před měsícem

    _"overpaying for micro controller"_ I bought a handful of "Arduino" boards just for $1.5 from China then had to chuck them in a bin altogether. No way I'll ever look at anything cheap. You get what you pay for. A greedy always pays twice but an idiot pays for the rest of their life.

  • @tuxino
    @tuxino Před měsícem

    While watching your video, I had an idea. To me this idea seems so obvious, that I'm almost certain that somebody else already thought of it and tried it, and there's some reason that it either doesn't work or isn't practical. Still, just in case, here it is: Would it be possible to make a modified toolhead for a 3D printer that could apply solder paste? So that it could be printed on to the pads directly without using a stencil. I can see one reason that this might not have been tried even if it were feasible, and that is that those people with the knowledge to actually make this are also people who make multiple copies of each PCB, so for them it would be impractical, but for a hobby-user who would often only make a single PCB, it might be a sensible solution, that they just don't have the knowledge or equipment to pull off.

    • @Strawberrymaker
      @Strawberrymaker Před měsícem

      I think i saw some Projects trying it (also with an Pick and place toolhead) but controlling the flow of the Paste to Dispense Just a small SMD Pad is hard

    • @AllTradesZach
      @AllTradesZach Před měsícem

      I've used something similar, a sort of CNC dispenser with a syringe for whatever viscous liquid you're using! We were doing adhesives, but I think they advertise it for solder paste as well. Converting a 3d printer would be an interesting project though, but it might be a little hard for some of the smaller components. I've also seen ink jet approaches companies are developing, which would be really cool.

  • @uygarbocutoglu4465
    @uygarbocutoglu4465 Před měsícem

    Downloaded it. Thanks for sharing. Appreciate recyclers and open-source devs for a better future.

  • @johnyoungquist6540
    @johnyoungquist6540 Před měsícem

    Heat stake inserts are a lot more trouble than they're worth I just mold in a hex pocket and drop a standard nut in place and print over top you can print over regular nuts or lock nuts of various kinds and they cost next to nothing compared to the fancy heat stake inserts and they are a lot stronger.. You can also print clearance in so the nut will float a bit and allow for misalignment much more versatile than a heat stake insert. Interesting design.

    • @AllTradesZach
      @AllTradesZach Před měsícem

      I'm kind of afraid of inserting someone mid print, even though as long as it's below the current layer you should be in the clear. There are also out of plane inserts to contend with. I kind of agree though, heat press inserts are a PITA to get right. I need to play around with all the other options when I get some time.