
I tried the 3 Cheapest Arduino Alternatives! (That you Suggested)
video description
Date: 2024-09-09
Related videos
Comments and reviews: 20
user-lv6io3jy3d
Id say that LGT8 is like super nano, more features than arduino nano, almost everything is upgraded (more timers, they are faster, with complimentary outputs, deadtime and 80 mA output capability for better MOSFET control, extra 2 bit ADC resolution with different and better voltage references, DAC, unique chip ID and some more. But it also has some disadvantages, like programming through SWD - idk where to get an official programmer, and arduino ide seems to rewrite lgt8 factory bootloader, so you can't program it through serial anymore (looks like it happens in video. And there is no clear information how to get bootloader back. But still, it's a great chip with many interesting features and very high atmega328p compatibility.
CH32V003, in other hands, is a very powerful, yet cheap mcu. But it's very hard to use, especially if you use only arduino ide and not familiar with embedded development. But it can perform a spectacular things - check mitxela, bitluni or CNLohr. Especially CNLohr, he takes maximum from this mcu and makes some crazy things.
For the stm8. well, it’s not very good. In fact, ST recommends avoiding 8-bit mcu and switching to their newer products - stm32g0/stm32c0. STM8 have some interesting features, but its pretty hard to program, its support only C, there are some problems with compilers (only two available, and you have to get license for Cosmic, which is free but requires an email confirmation from compiler developers, etc. As for me - STM32 is way better, even if it is a little more expensive.
reply
Id say that LGT8 is like super nano, more features than arduino nano, almost everything is upgraded (more timers, they are faster, with complimentary outputs, deadtime and 80 mA output capability for better MOSFET control, extra 2 bit ADC resolution with different and better voltage references, DAC, unique chip ID and some more. But it also has some disadvantages, like programming through SWD - idk where to get an official programmer, and arduino ide seems to rewrite lgt8 factory bootloader, so you can't program it through serial anymore (looks like it happens in video. And there is no clear information how to get bootloader back. But still, it's a great chip with many interesting features and very high atmega328p compatibility.
CH32V003, in other hands, is a very powerful, yet cheap mcu. But it's very hard to use, especially if you use only arduino ide and not familiar with embedded development. But it can perform a spectacular things - check mitxela, bitluni or CNLohr. Especially CNLohr, he takes maximum from this mcu and makes some crazy things.
For the stm8. well, it’s not very good. In fact, ST recommends avoiding 8-bit mcu and switching to their newer products - stm32g0/stm32c0. STM8 have some interesting features, but its pretty hard to program, its support only C, there are some problems with compilers (only two available, and you have to get license for Cosmic, which is free but requires an email confirmation from compiler developers, etc. As for me - STM32 is way better, even if it is a little more expensive.
reply
19mitch54
There is a TREMENDOUS (5x or 10x or more) price difference between the microcontroller chip like the ATmega328P and the microcontroller development board like the Arduino Uno Rev3. The idea being that once the application is developed and the chip is programmed, you don’t need the computer connection and the integrated development environment (IDE) software anymore so you unplug the chip from the board and plug it into your own circuit and power (battery or DC power supply. Though most don’t bother with the last step because Arduino is so cheap, they just use the whole development board in their projects.
As you showed, you can realize cost savings in selecting the microcontroller for your project. For example, you might not need an ATmega; a cheaper ATtiny or even less might be enough. For simply varying an output based on an input and logic, a 10 cent MCU might do.
Also, contrary to some comments, you found that the Arduino is obviously not the same as the STM8. STMicroelectronics and Arduino both make some fabulous hardware and software. Arduino is more geared to the beginner. Much effort is made to adapt Arduino IDE to STM8, you are crippling yourself and sacrificing MCU functions by not learning STMicroelectronics fabulous development software and resources. STMicroelectronics has a TON of documentation on their web site.
reply
There is a TREMENDOUS (5x or 10x or more) price difference between the microcontroller chip like the ATmega328P and the microcontroller development board like the Arduino Uno Rev3. The idea being that once the application is developed and the chip is programmed, you don’t need the computer connection and the integrated development environment (IDE) software anymore so you unplug the chip from the board and plug it into your own circuit and power (battery or DC power supply. Though most don’t bother with the last step because Arduino is so cheap, they just use the whole development board in their projects.
As you showed, you can realize cost savings in selecting the microcontroller for your project. For example, you might not need an ATmega; a cheaper ATtiny or even less might be enough. For simply varying an output based on an input and logic, a 10 cent MCU might do.
Also, contrary to some comments, you found that the Arduino is obviously not the same as the STM8. STMicroelectronics and Arduino both make some fabulous hardware and software. Arduino is more geared to the beginner. Much effort is made to adapt Arduino IDE to STM8, you are crippling yourself and sacrificing MCU functions by not learning STMicroelectronics fabulous development software and resources. STMicroelectronics has a TON of documentation on their web site.
reply
mikejones-vd3fg
I had a simliar situation after i figured out i needed more arduino's, checking the prices I could get another for $5, or about 4 stm32's at 5x the speed albeit about the same amount of ram (got the cheaper low ram blue pills) It was a great deal! then i tried to program one. 1 year later i finally figured out how to blink the LED without any libraries, bare metal from scratch. And I wish i just got more arudino's. JK it was a great learning experience but not easy replacement to arduino. But can be, they have stm32 boards in arduino IDE so its just as easy. But still not easy to setup the flashing, thats a little janky and probably the hardest part, was just setting up an evironment to flash it, some offered USB but you needed to install drivers, and press some key combination for it to work, then short a pin to make it work more reliatbley. a lot more involved then arduino for sure, in the end the st link was most reliable but was trying to avoid extra parts, but now we get that extra juice! And still not powerful enough to run high def UI without 100% usage, why STm32 released vector gpus in some of their MCU's. That would be cool to see, vector GPU programming graphics.
reply
I had a simliar situation after i figured out i needed more arduino's, checking the prices I could get another for $5, or about 4 stm32's at 5x the speed albeit about the same amount of ram (got the cheaper low ram blue pills) It was a great deal! then i tried to program one. 1 year later i finally figured out how to blink the LED without any libraries, bare metal from scratch. And I wish i just got more arudino's. JK it was a great learning experience but not easy replacement to arduino. But can be, they have stm32 boards in arduino IDE so its just as easy. But still not easy to setup the flashing, thats a little janky and probably the hardest part, was just setting up an evironment to flash it, some offered USB but you needed to install drivers, and press some key combination for it to work, then short a pin to make it work more reliatbley. a lot more involved then arduino for sure, in the end the st link was most reliable but was trying to avoid extra parts, but now we get that extra juice! And still not powerful enough to run high def UI without 100% usage, why STm32 released vector gpus in some of their MCU's. That would be cool to see, vector GPU programming graphics.
reply
XavierGr
Unless you want a good quality ADC or low power consumption, then ESPs are the current kings of micro-controllers for DIYers.
1. Super easy to program with just a dirt-cheap serial device, no weird proprietary programmers needed.
2. Bluetooth and WiFi is a game changer. You program once and then if you want to change your program later you do it over the air. This is a must for permanent installations in hard to reach places.
3. For the performance features they provide ESPs are amazingly cheap. Just 1. 80 euros for a ESP32-C3 little devboard and around 2 for the ESP32 module.
4. For ESP32 you don't even need a dev board. If you know what you are doing just the ESP32 bare module is enough for prototyping directly on it.
5. Native support for home automations with Home Assistant and ESPhome. These two projects really elevate the ease of use and practical use cases of ESP micro-controllers.
reply
Unless you want a good quality ADC or low power consumption, then ESPs are the current kings of micro-controllers for DIYers.
1. Super easy to program with just a dirt-cheap serial device, no weird proprietary programmers needed.
2. Bluetooth and WiFi is a game changer. You program once and then if you want to change your program later you do it over the air. This is a must for permanent installations in hard to reach places.
3. For the performance features they provide ESPs are amazingly cheap. Just 1. 80 euros for a ESP32-C3 little devboard and around 2 for the ESP32 module.
4. For ESP32 you don't even need a dev board. If you know what you are doing just the ESP32 bare module is enough for prototyping directly on it.
5. Native support for home automations with Home Assistant and ESPhome. These two projects really elevate the ease of use and practical use cases of ESP micro-controllers.
reply
WhoWatchesVideos
I'm surprised we didn't get a look at the PY32F002A. Bare chips are around 15 cents each in quantities of 5 on LCSC, it has a little more flash and SRAM than the CH32V003 (albeit at half the clockspeed at 24MHz, and it's ARM so it fits workflows that use ARM programmer/debugger equipment and toolchains. The PY32f030 series goes for about 40-50 cents in single quantities on LCSC and it has double the flash of the ATmega328P, so AFAIK you don't have to worry about flash size at all coming from an Arduino Nano. It's a bit harder to find cheap dev boards for PUYA MCUs, though, and English documentation is sometimes awkward to get ahold of. Still, if you don't need a lot more speed but do need lots of flash, I think they're a great middle option, especially if you have an ARM toolchain set up.
reply
I'm surprised we didn't get a look at the PY32F002A. Bare chips are around 15 cents each in quantities of 5 on LCSC, it has a little more flash and SRAM than the CH32V003 (albeit at half the clockspeed at 24MHz, and it's ARM so it fits workflows that use ARM programmer/debugger equipment and toolchains. The PY32f030 series goes for about 40-50 cents in single quantities on LCSC and it has double the flash of the ATmega328P, so AFAIK you don't have to worry about flash size at all coming from an Arduino Nano. It's a bit harder to find cheap dev boards for PUYA MCUs, though, and English documentation is sometimes awkward to get ahold of. Still, if you don't need a lot more speed but do need lots of flash, I think they're a great middle option, especially if you have an ARM toolchain set up.
reply
desmond-hawkins
I am still baffled that so many people still use the Arduino IDE. Yes it's convenient for a hello world, but using it for any project over 20 lines it's just so limiting, it feels like writing code using the nano editor. I mean not even basic completion, what is this 1980 There are much better alternatives like PlatformIO (to be clear: I'm not affiliated. You get the exact same Arduino code, but a real editor with tons of plugins, all the same boards and libraries, much more control over your build process, etc. I would recommend to anyone to switch to a better alternative than the native Arduino editor, even their v2 is incredibly basic and I would never want to go back to it. Invest in a few minutes to learn a better way and don't get stuck using bad tools forever!
reply
I am still baffled that so many people still use the Arduino IDE. Yes it's convenient for a hello world, but using it for any project over 20 lines it's just so limiting, it feels like writing code using the nano editor. I mean not even basic completion, what is this 1980 There are much better alternatives like PlatformIO (to be clear: I'm not affiliated. You get the exact same Arduino code, but a real editor with tons of plugins, all the same boards and libraries, much more control over your build process, etc. I would recommend to anyone to switch to a better alternative than the native Arduino editor, even their v2 is incredibly basic and I would never want to go back to it. Invest in a few minutes to learn a better way and don't get stuck using bad tools forever!
reply
Scrogan
The CH32V003 isn’t really aimed at the arduino crowd. The high cost of the dev-board compared to the MCUs suggests it’s aimed at people designing their own PCBs, and the wide range of footprints compliments that. Not only that, there is a decent selection of MCUs with varying specs that all share the same architecture and programming method. The intention is for the developer to be able to stick within one ecosystem and get intimately familiar with the register map, memory layout, and other low-level intricacies. Which is the opposite of what the arduino IDE does, shielding the user from the low-level and allowing relatively seamless exchange between different architectures.
I bought like 160 of them, but my old computer couldn’t install CH32V003fun.
reply
The CH32V003 isn’t really aimed at the arduino crowd. The high cost of the dev-board compared to the MCUs suggests it’s aimed at people designing their own PCBs, and the wide range of footprints compliments that. Not only that, there is a decent selection of MCUs with varying specs that all share the same architecture and programming method. The intention is for the developer to be able to stick within one ecosystem and get intimately familiar with the register map, memory layout, and other low-level intricacies. Which is the opposite of what the arduino IDE does, shielding the user from the low-level and allowing relatively seamless exchange between different architectures.
I bought like 160 of them, but my old computer couldn’t install CH32V003fun.
reply
DuroLabs85
In my opinion STM32F103C8T6 a. k. a the BluePill seems like a good option as it's way more powerful than mega328 and also almost very cheap here at least in India, I get it for less than 1. 2$ and is pretty compatible with the existing Arduino Ide (for some of the niche feature you can install libraries. And if we install a USB bootloader to it, it can also be programmed via USB and Serial works too. 12Bit ADCs, 16Bit PWM, enough Analog and Digital GPIOs, CAN bus, and a RTC.
And for its full potential STMCube Ide seems like a good way to extract the most out of it. It also has GUI Configuration.
Not exactly cheap if you want to save every penny but for a Nano Compatible I just buy these instead.
reply
In my opinion STM32F103C8T6 a. k. a the BluePill seems like a good option as it's way more powerful than mega328 and also almost very cheap here at least in India, I get it for less than 1. 2$ and is pretty compatible with the existing Arduino Ide (for some of the niche feature you can install libraries. And if we install a USB bootloader to it, it can also be programmed via USB and Serial works too. 12Bit ADCs, 16Bit PWM, enough Analog and Digital GPIOs, CAN bus, and a RTC.
And for its full potential STMCube Ide seems like a good way to extract the most out of it. It also has GUI Configuration.
Not exactly cheap if you want to save every penny but for a Nano Compatible I just buy these instead.
reply
msdcrafter8336
Great video Scott.
Although one thing: my guess, as to why your setup at 8: 29 didnt work, would be because you didnt account for the adc having a higher resolution. As the Arduino nano only has a 10 bit adc, it's value only goes up to 1023 (which you then remap to 0 to 255 in your code. But the new board has a 12 bit adc, which means that the value doesn't get remapped properly anymore and goes out of bounds.
So maybe if you change your map to be from 0 to 4095, it might work with the LED example.
Edit:
Ok, maybe i should've watched 5 seconds further, as the same microcontroller on a different board seems to work. Who knows what happened with the first one
reply
Great video Scott.
Although one thing: my guess, as to why your setup at 8: 29 didnt work, would be because you didnt account for the adc having a higher resolution. As the Arduino nano only has a 10 bit adc, it's value only goes up to 1023 (which you then remap to 0 to 255 in your code. But the new board has a 12 bit adc, which means that the value doesn't get remapped properly anymore and goes out of bounds.
So maybe if you change your map to be from 0 to 4095, it might work with the LED example.
Edit:
Ok, maybe i should've watched 5 seconds further, as the same microcontroller on a different board seems to work. Who knows what happened with the first one
reply
greatscott
The real problem here is supply and demand. The Arduino community continues to pump the 328p, so even though by most metrics it is an old inferior chip, it still commands a high price. Years ago I figured out that I could buy the Atmega128a for less than the 328p, so I built a bunch of boards with this chip. It is very similar but has more peripherals, WAY more pins, has JTAG debugging (rather than the awful dbugWIRE abomination on the 328p) Still, the Arduino community has largely ignored the 128a, so you might need to use real software to program it. Today there are better cheaper options, especially if you're willing to pry yourself away from the Arduino IDE.
reply
The real problem here is supply and demand. The Arduino community continues to pump the 328p, so even though by most metrics it is an old inferior chip, it still commands a high price. Years ago I figured out that I could buy the Atmega128a for less than the 328p, so I built a bunch of boards with this chip. It is very similar but has more peripherals, WAY more pins, has JTAG debugging (rather than the awful dbugWIRE abomination on the 328p) Still, the Arduino community has largely ignored the 128a, so you might need to use real software to program it. Today there are better cheaper options, especially if you're willing to pry yourself away from the Arduino IDE.
reply
MSP_TechLab
I accidentally bought lgt8 arduino clone 5 years ago or so.
Spent a day trying to make it work with lcd, until I understood that something wrong with arduino core code (they've messed up with that dac pin initialization.
Next when I needed to go slightly more advanced and implement sleep mode (if you can name sleep mode advanced, but for arduino it was always an issue, it appeared that this chip has pretty diffrent code compare to original atmel chip, and I used to dig in that badly translated chineglish manual.
I hope that things were changed since that time,
but I wouldn't trust this chip for something more complicated than blink.
reply
I accidentally bought lgt8 arduino clone 5 years ago or so.
Spent a day trying to make it work with lcd, until I understood that something wrong with arduino core code (they've messed up with that dac pin initialization.
Next when I needed to go slightly more advanced and implement sleep mode (if you can name sleep mode advanced, but for arduino it was always an issue, it appeared that this chip has pretty diffrent code compare to original atmel chip, and I used to dig in that badly translated chineglish manual.
I hope that things were changed since that time,
but I wouldn't trust this chip for something more complicated than blink.
reply
ABaumstumpf
The arduino IDE is an insult. It really does not deserve to be called an IDE. Before V2 it was the NotePad of IDEs - even notepad was a better IDE. And even now - use anything but the ArduninoIDE. It is slow, buggy, and does not do what an IDE should do: Help the developer.
using VSCode with the arduino-plugin is a lot better - specially for people that are not well-versed programmers. Better code-highlighting, auto-complete, good language support and external tools.
The Idea of Arduino was great - and the IDE was the big BUUUuuuuut.
reply
The arduino IDE is an insult. It really does not deserve to be called an IDE. Before V2 it was the NotePad of IDEs - even notepad was a better IDE. And even now - use anything but the ArduninoIDE. It is slow, buggy, and does not do what an IDE should do: Help the developer.
using VSCode with the arduino-plugin is a lot better - specially for people that are not well-versed programmers. Better code-highlighting, auto-complete, good language support and external tools.
The Idea of Arduino was great - and the IDE was the big BUUUuuuuut.
reply
tin2001
I bought a few of those STM8 boards a few years ago when I was first getting into DIY gadgets. Never used any of them yet, but I've got a plan to add rotary encoders to my flight sim throttle quadrant. STM8 will read the encoder, and toggle a GPIO hooked by optocouplers to the existing buttons on the front that I never use.
I did briefly consider finding a microcontroller that had USB and loads of GPIOs and just replacing the entire guts of the thing, but that's much higher risk than just tapping into the existing buttons.
reply
I bought a few of those STM8 boards a few years ago when I was first getting into DIY gadgets. Never used any of them yet, but I've got a plan to add rotary encoders to my flight sim throttle quadrant. STM8 will read the encoder, and toggle a GPIO hooked by optocouplers to the existing buttons on the front that I never use.
I did briefly consider finding a microcontroller that had USB and loads of GPIOs and just replacing the entire guts of the thing, but that's much higher risk than just tapping into the existing buttons.
reply
_lolucoca_9735
Having used the CH32V003 extensively over the last 18 months (only in Mounriver though, it's an amazing little chip for the price. It's way cheaper to pop in one of those compared to a dedicated IC in most cases. The software (especially the given examples) are a bit lacking though, you're going to need to piece a lot of things together for yourself. Once you've got a working codebase of your own examples to turn back to, the CH32V003 is a breeze to work with.
reply
Having used the CH32V003 extensively over the last 18 months (only in Mounriver though, it's an amazing little chip for the price. It's way cheaper to pop in one of those compared to a dedicated IC in most cases. The software (especially the given examples) are a bit lacking though, you're going to need to piece a lot of things together for yourself. Once you've got a working codebase of your own examples to turn back to, the CH32V003 is a breeze to work with.
reply
domainmojo2162
ESP is just on another level and the IoT field is exploding with projects based on it.
The STM32s also, are just legendary. I love building projects and making products with the trusty Black Pill (STM32F411CE) and sometimes, it's popular older brother, the Blue Pill.
The performance and response of the ESPs and STM32s relative to other microcontrollers are unmatched. Their cost, and the ESPs ease of use, sets them apart.
reply
ESP is just on another level and the IoT field is exploding with projects based on it.
The STM32s also, are just legendary. I love building projects and making products with the trusty Black Pill (STM32F411CE) and sometimes, it's popular older brother, the Blue Pill.
The performance and response of the ESPs and STM32s relative to other microcontrollers are unmatched. Their cost, and the ESPs ease of use, sets them apart.
reply
greatscott
So, I have been using the STM8Sxx devices now for about a year. I can think of no reason that I failed to make the connection with you and the 'cheap choices' that you have been talking about before. (I do not mean cheap as in less useful but less costly) When time allows I will post some minor projects on the discord.
As a side note I went from the STM32 to the STM8 for a former company project.
Peace
reply
So, I have been using the STM8Sxx devices now for about a year. I can think of no reason that I failed to make the connection with you and the 'cheap choices' that you have been talking about before. (I do not mean cheap as in less useful but less costly) When time allows I will post some minor projects on the discord.
As a side note I went from the STM32 to the STM8 for a former company project.
Peace
reply
aliveli8650
if you are not going to produce thousands of products per year, it doesnt make sense to go after some pennies, especially for the hobbyists. you should focus on uCs with maximum support (both by the producer and the community. Then you will end up with most popular uCs. if you are living in a developed country, even installing an extra idea cost you more than 1$, if your time is not for free.
reply
if you are not going to produce thousands of products per year, it doesnt make sense to go after some pennies, especially for the hobbyists. you should focus on uCs with maximum support (both by the producer and the community. Then you will end up with most popular uCs. if you are living in a developed country, even installing an extra idea cost you more than 1$, if your time is not for free.
reply
suruadamable
i think the stm8 line is not a great value anymore, the stm32g03 series do more for the same price, and you can use the original stm32 core for arduino. I haven't used arduino for years now, because the compatibility of the arduino ide with the stm32 has become so good that I haven't run into a library that doesn't work. Most often I use the stm32f4s as a steroided arduino.
reply
i think the stm8 line is not a great value anymore, the stm32g03 series do more for the same price, and you can use the original stm32 core for arduino. I haven't used arduino for years now, because the compatibility of the arduino ide with the stm32 has become so good that I haven't run into a library that doesn't work. Most often I use the stm32f4s as a steroided arduino.
reply
greatscott
As for IDEs, I can highly recommend platformio. It's much nicer to use than the Arduino IDE since it's just a vscode extension and it has full compatibility (it can actually call the arduino ide.
The best part is you can define profiles for different boards and theoretically make your code compatible with different boards. In the end it's all just some C or C libraries.
reply
As for IDEs, I can highly recommend platformio. It's much nicer to use than the Arduino IDE since it's just a vscode extension and it has full compatibility (it can actually call the arduino ide.
The best part is you can define profiles for different boards and theoretically make your code compatible with different boards. In the end it's all just some C or C libraries.
reply
ChessIsJustAGame
SW programming to flash an LED or control brightness I'm old enought to use simple passive components to control brightness or advanced blinking or brightness control with a 555 timer. Again, mostly passive components and no SW. But I do program and encourage those new to electronics to learn programing. It is not only fun, but necessary in today's high tech world.
reply
SW programming to flash an LED or control brightness I'm old enought to use simple passive components to control brightness or advanced blinking or brightness control with a 555 timer. Again, mostly passive components and no SW. But I do program and encourage those new to electronics to learn programing. It is not only fun, but necessary in today's high tech world.
reply
Add a review, comment
Other channel videos















