← Home ← Back to /diy/

Thread 2952647

34 posts 8 images /diy/
Anonymous No.2952647 [Report] >>2952826
/mcg/ - Microcontroller General: Massive Through-hole MCU Edition
Previous Thread: >>2928655

Here we discuss microcontrollers (MCUs), single board computers (SBCs), and their accessories, such as Atmel mega and tiny AVRs (Arduinos), PICs, ARM boards such as blue/black pill STM32, ESP8266/32s, RP2040, Raspberry Pi, and others.

For general electronics questions (power supplies, level shifting, motor driving, etc.) please ask /ohm/.

>where can I find verified quality microcontrollers and other electronic sensors or parts
digikey.com
mouser.com
arrow.com
newark.com

>but that's too expensive
aliexpress.com (many parts here are fake, particularly specific parts out of stock in the above sites)
lcsc.com

>I need a part that does X and Y, with Z specifications. How can I find it?
use DigiKey's or Octopart's parametric part search. Then purchase from one of the sellers listed above.

>how do I get started with microcontrollers, where should I start?
There is no defined starting point, grab a book and start reading or buy an arduino off ebay/amazon and start messing around. There are a plethora of examples online to get started.

>resources:
https://github.com/kitspace/awesome-electronics

>RISC-V microcontroller list:
https://codeberg.org/20-100/Awesome_RISC-V/raw/branch/master/RISC-V_MCU_development_boards.pdf
Anonymous No.2952826 [Report] >>2952827 >>2952861 >>2953076
>>2952647 (OP)
Arduino is not cool. In fact it's fucking stupid in multiple ways.
Anonymous No.2952827 [Report]
>>2952826
Are we gonna start hating on starter kits now?
Anonymous No.2952843 [Report]
Which is the easiest SoM to build a PCB for and get it to work with an embedded linux? Aren't there any templates with the right footprints and conducting traces for a basic periphery? As well as a pre-configured embedded linux? I basically seek a starting point to jump off the development board onto the self-designed board.
Anonymous No.2952861 [Report] >>2953044
>>2952826
i'm a noob. what's stupid about it
Anonymous No.2953044 [Report] >>2953049 >>2953146
>>2952861
It doesn't require signing your life away for an awful clunky toolchain that's bloated to all hell for some reason, and doesn't require a spaghetti of wires to an expensive bespoke programmer to develop for it.
Therefore, "real" embedded devs hate it.
Anonymous No.2953049 [Report] >>2953146 >>2953174 >>2953175
>>2953044
The Arduino IDE is the most clunky thing I've ever encountered, except maybe for the vendor Eclipse IDEs, that only idiots use.
Anonymous No.2953076 [Report] >>2953086 >>2953146 >>2953682
>>2952826
it's a general purpose prototyping board, it's not cool inherently. It does what it needs to and is relatively easy to adapt to changing requirements. I don't want to have to configure SFRs just to spin a motor when a button is pushed, my boss wants me to have a functional prototype yesterday. The PIC16F that will be used in production isn't cool either, but it's cheap, reliable, and and will be configured to the product spec that is already written before it even gets selected.
Anonymous No.2953086 [Report] >>2953131
>>2953076
How are pics still a thing how much are they saving per unit a nickle? And it has to be programmed in assembly how much does that cost?
Anonymous No.2953131 [Report]
>>2953086
There are compilers for PICs. I think a lot of the use of PICs these days is with legacy designs where the code is already written, I see them in multi-stage lead-acid battery chargers, that kind of stuff where you’d need under 50 lines of C anyhow. Doesn’t matter how inefficient your compiler is at that point, maybe these things are written in Basic. There’s also 32-bit PICs that surely nobody programs in ASM.
Anonymous No.2953146 [Report] >>2953255 >>2953689
>>2953044
>>2953049
>>2953076
what mcu do the cool kids use?
Anonymous No.2953174 [Report] >>2953176 >>2953488
>>2953049
You don't need the IDE. You can just use avr-gcc and avrdude.
Anonymous No.2953175 [Report]
>>2953049
how is it clunky? just type da code and compile and upload
Anonymous No.2953176 [Report] >>2953223
>>2953174
I know, but it's annoying how the IDE hides all the tool use, which could be pretty simple, and even needs to do that init/loop bullshit.
Anonymous No.2953223 [Report] >>2953229
>>2953176
It's designed for babbies, who would be confused by such things
Anonymous No.2953229 [Report] >>2953522
>>2953223
Stop being such an elitist debby downer and make something cool. The fish wont care you used an arduino to feed them. Bedides youre not getting an embedded job without a license anyways.
Anonymous No.2953255 [Report] >>2953259 >>2953486 >>2953488
>>2953146
Arduino is dinosaur tech which began with a 20 year old microcontroller. 8bit MCUs are going extinct.

Anyway the cool kids might use stm32, which is a pretty modern, extensive family of processors. As few as 8 pins, or over 100 if you want. They have the "nucleo" dev boards too which makes it easy to get started. I've used them and like them.

ESP32 is also worth a look. The company Espressif has sold over a billion esp32s, they're everywhere. Cheap devboards but extremely capable (lots of flash, lots of ram, and high clock rate, up to 240MHz IIRC)
Anonymous No.2953259 [Report]
>>2953255
I'm using a teensy 4.1, which I kind of lump in with Arduino because it uses Arduino IDE. It's pretty powerful.
Anonymous No.2953486 [Report] >>2953686
>>2953255
>8bit MCUs are going extinct
i just had a look at the new avr generation and i dont think so.
Anonymous No.2953488 [Report] >>2953522 >>2953554 >>2953806
>>2953174
Then it's just an overpriced ATMega/ESP/whatever the fuck they use now development board
>>2953255
ST is pissing me off with the whole Cube stuff, having to register with full name and address. ESP is nice, ESP-IDF is good to work with desu.
And I think AVR 8bit MCUs are here to stay.
Anonymous No.2953522 [Report]
>>2953229
I didn't say there was anything wrong with that. If you know enough to need more, you can figure out how to get it.

>>2953488
>Then it's just an overpriced ATMega/ESP/whatever the fuck they use now development board
Duh, but why would you ever buy a real one? Chang will happily sell you ten functionally identical knockoffs for the price of one genuine Arduino™ board. As a beginner, that gives you access to all kinds of Arduino-oriented handholding AND nine chances to keep going after badly fucking up.
Anonymous No.2953554 [Report] >>2953556
>>2953488
>ST is pissing me off with the whole Cube stuff, having to register with full name and address
This alone drove me to other micros when I was picking a chip for a project.
I'm sure there are probably thirdparty toolchains that don't have this crap, but I can't be bothered to investigate when other chips work out of the box with no strings attached (also the supply chain issues of the time didn't help ST's case).
Anonymous No.2953556 [Report]
>>2953554
Back when it was new and ST guys were first trying to shill it, I looked at Cube and decided it was shit. Being able to pick a configuration with a Windows gooey app might be cute and impress PHBs and Arduweenies, but as I recall it generated *customized* header files. So much fun if you've actually got a product that you want to keep track of in source code control.
I never stopped using their old hardware libraries, which were flawed in other ways, but didn't change due to a fucking checkbox.
Anonymous No.2953588 [Report] >>2954113
Putting esp32's on custom pcbs. What, pray tell, do I actually require to be able to use serial over USB? Supposably you need a quart/USB chip, but there is also mention of it being native to the esp32, pins 19/20?
Anonymous No.2953682 [Report] >>2954113
>>2953076
>PIC16F
Is it possible to use a Raspberry Pi Pico to play the role of a PIC programmer and transmit data between them using a very thin wire carrying a signal through USART so as to have a Pico and a PIC picking up and passing pieces of data though a wire thinner than a toothpick?
Anonymous No.2953686 [Report]
>>2953486
I looked now because of your post and yeah the new avr stuff is pretty cool. I take it back, there's still space for 8bit
Anonymous No.2953689 [Report]
>>2953146
Different kinds of cool kids everywhere.

The pic stuff has some interesting options for extra peripherals. The language and your ultimate goals are the key. It is nice to use an interpreter like with Flash Forth, or Micropython, or Circuit Python. Any of the Forth languages can be fun. However, you will be doing stack based programming, so branching is a bit more complicated. Anything from Adafruit with support for Circuit Python is nice and well documented. Thony is an easy way to interface without some electron, google, or microsoft stalkerware. The cool kids take the time to learn both Emacs and Vim, usually Doom Emacs and NeoVim.
Anonymous No.2953760 [Report] >>2953778 >>2954113
>work has 3 high school kids as interns for the week
>kid I'm assigned says he has thousands of hours in Warthunder and WoW
>hand him a box of microcontrollers, breadboards, and other electronic scraps and tell him to figure out how a transistor works
He was entertained for the entire day, and he can't wait to continue tomorrow.
Anonymous No.2953778 [Report] >>2953787
>>2953760
that's cool of you anon. did he figure it out?
Anonymous No.2953787 [Report]
>>2953778
With a little help, yeah. Had him solder LED blinker circuits at the end of the day.
Anonymous No.2953806 [Report] >>2953847
>>2953488
> 8 bit is here to stay
Sadly, DIP or PDIP is slowly leaving us.
This is because the materials of the packaging (shipping, epoxy, lead frame, bond wires) cost way more than the actual die. Neo-Nexperia is finding this out now. So we’ll see more bare-silicon/flip chips since factories are getting better at using raw dies. We’ve had the black epoxy blob for decades. Bad for the diy’er. Get good at making carrier boards.

8 bit may also leave us for various complicated reasons. We’ll probably be emulating 8051s and z80s with ARM in the near future.
Home devices that only need 4 or 8 bit cores (like breadmakers, toasters, juicero, etc.) will soon want to be wired to the internet for the “service model” idea which 8-bit cores can’t really do by themselves.
Anonymous No.2953847 [Report]
>>2953806
that's sad about dip. i don't mind SMD that much but i probably would have found a different hobby if i had to deal with SMD only. but smd will likely get easier in time as well with cheaper solutions
Anonymous No.2954113 [Report] >>2954297
>>2953588
Which ESP32 model? Some of the more recent models have native USB capability, and some can even be programmed by USB without a hacky bootloader, but from what I remember they needed to be told to enable this first. Or that you need to cycle power, or push the programming boot button, or some other caveat that makes it less convenient. Unlike an RP2040.

If you’re just using UART to program them, you can use one or two of the flow-control pins to pull down the boot button or whatever, so you don’t have to press the button manually. Take a look at the schematic of a NodeMCU board to see how they did it.

>>2953682
Wire thickness isn’t an issue at all. 30awg can carry USART, no problem. I don’t know how PIC programming works outside of a PIC-kit, but I think I’ve seen one or two projects that implement it on custom hardware. One was on another PIC, which isn’t surprising.

>>2953760
Fun. I wish someone gave me that kind of internship out of high school, instead of going off to university for a useless degree.
Anonymous No.2954297 [Report]
>>2954113
S3-WROOM

19/20 are on USB data lines for programming, apparently I have to put the chip in USB otg mode or some shit. Eff that I'll just ftdi off board.