• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Circuits and Electronics: Microcontrollers, OpAmps, Batteries and more!

Joined
Apr 24, 2020
Messages
2,562 (1.75/day)
I didn't see any post in the first couple of pages talking about Circuit Theory / Electronics. So I'm making this post! To get us started, this blogpost from 2017: https://jaycarlson.net/microcontrollers/

Also, to help seed this discussion on Circuits / Electronics, I'm going to rant a bit randomly. Don't feel like you have to read all of this to get into the topic!

-------

Despite that blog's focus on the $1 price point... hobbyists probably don't care about the $1 price point. Personally speaking, anything up to $5 is fair game for most of my projects, and $20 to $50 boards are also fair game. I think most people prefer using a well put together board (like Rasp. Pi, Arduino Uno, Teensy, RP2040 Pico, ESP32, etc. etc.). But... somehow I always come back to raw chips. Its just different when you're aiming your design around a custom PCB after all. You have way more freedom and make way smaller designs. Toying with electronics is expensive as it is (since we need oscilloscopes, power supplies and more), the additional costs to go PCB / custom really aren't that bad.

Still, I suggest people to start off on boards like Raspberry Pi, Arduino, Teensy, ESP8266, etc. etc. Feel free to talk about your projects. Or maybe parts that interest you.

AVR64DB32-- 8-bit AVR still lives! My microcontroller of choice​

Anyone who has become advanced with the Arduino Uno would feel at home with the AVR64DD32, but 10+ years of updates deserves a review.

Newbies can probably still stick with Arduino Uno, just due to the huge legacy / online tutorial factor involved. But when you're feeling ready to "grow up" and build your own circuit, take a look at the AVR64DB32 before you think of an ATMega328 based circuit. There's been so many improvements it behooves you to at least look at it.

* Full 24MHz at all voltage levels -- Arduino Uno / ATMega328 fans from 10 years ago may remember that 20MHz is only supported on 5V. This restrictive qualifier is no more... the newst AVR DA/DB/DD series, all AVRs of this most recent product line support full speed even at its lowest 1.8V power.

* Up to 128kB Flash / 16kB SRAM -- That old ATMega328 on the Arduino Uno only had 32kB Flash + 4kB SRAM. The line goes up to 128kB / 16kB SRAM now.

* Communications: USART, I2C, SPI -- Arduino Uno fans are familiar with these, but there's been some upgrades. The USART supports "S", syncrhonous, operations over the UART of old. Synchronous communications include any explicit clock-based communication, so basically the USART can serve as another SPI controller... or maybe your own custom protocols. All the Asynchronous / clock-free UART features of old are still supported. (Universal Synchronous / Asynchronous Receiver Transmitter)

* Timers upgraded from Timer0/Timer1/Timer2 into TimerA/TimerB/TimerD -- More modes, more flexibility, but a bit more complicated to configure. Each timer has different power-usage, features, and even sizes.

* RTC -- Arguably the Real-time-clock is also a "timer" of sorts, but... its different. With current-usage at 730nA, the RTC is the lowest-power peripheral you can enable. With capabilities to "wake" the chip out of even the deepest sleep cycles, the RTC is key for ultra-long battery life on the lowest power settings (if you're designing around a CR2032 watch-battery, this could be useful)

* ADC + DAC + Comparators + voltage references, 1.8V to 5.5V -- AVR's wide voltage range and slew of analog peripherals give it benefits with analog parts. The DAC is particularly interesting and somewhat rare in uCs.

* 3.6mA @24MHz. 1.1 mA @4MHz. Idle at 2.3uA, Standby at 600nA -- Relatively low power, but not as low as the "ultra-low" parts that are available today in 2022. Still, 600nA of standby-sleep is well under the leakage current of batteries, so its "good enough" for most people's work.

* 3x Rail-to-rail OpAmps -- This is the big one on the AVR DB series: OpAmps are some of my favorite parts. They are "analog" computers, capable of multiplication, addition, division, exponents, logarithms, and more. This is one of those "deep electrical engineering" tools however, they're extremely difficult for beginners to learn about and really require multiple-years of college worth of training to understand. Though... if you're a beginner, maybe start with the LM358 before you play with the complex OpAmp inside of this particular chip.

Unfortunately, due to upgrades like ATMega328's UART turning into the USART... or the ATMega328 Timer0 turning into the upgraded TimerA, some old code won't work any more on the newest chips. That's the reason why the ATMega328pb still is made ("pb" is the most upgraded model to the ATMega328 before code-incompatibility starts to occur). If you really must stick with your legacy code from an Arduino Uno platform, then buy the ATMega328pb.

ATSAML10 -- Microchip's "Ultralow Power" ARM Cortex-M23​

Today, a lot of people are more interested in the 32-bit ARM parts, such as the ATSAML10. Slightly more expensive than the 8-bit uCs, the ATSAML10 is Microchip's lowest-power 32-bit ARM available. How low power? Its actually lower power than my preferred AVR64DB32... going full-tilt at under 3mA and sleeping in the 100nA range (!!). It even has those fancy Op-Amps I love on it.

Microchip makes both the AVR64DB32 and the ATSAML10. So a lot of the peripherals work-and-act in the same way. In fact, the ICE programmer works on both the SAM-series and the AVR-series chips, so I don't even need to buy a 2nd programmer to work with this line of chips.

I know the STM32 uCs are more popular. But I figured I'd plug in Microchip's 32-bit ARM design as well as a mention.

RP2040 -- Fine MPU, terrible MCU​


I get that the RP2040 is pretty hype these days. But the RP2040 chip is missing rather important peripherals: such as a 32.678 kHz crystal support (aka: watch-crystal support), DAC, internal Flash RAM, internal oscillators, and more. As such, it requires a fair bit of supporting circuitry to even boot (12MHz XTAL + SPI Flash). While in contrast, every PIC, AVR, modern 8051, STM32, and most ARM parts (like SAM L10) boot with just +Voltage on their lines. The $1 price point is an illusion, you need another $3+ in parts before the darn thing even works.

The RP2040 does have some nice specs on paper, like 264kB SRAM, dual-core, and PIO. But 20mA current is awful for a Cortex M0+ part (10x more power usage than the SAML10 I talked earlier), and it sleeps at 1.3mA, well over 10,000 more sleep power than its competitors. As an M0+ part, its the smallest core of any ARM design (fewer instructions than the M23 like ATSAML10).

Well, the Rasp. Pi foundation is a giant in education. Their resources are great and simplify project design. But as far as actual specs, you've got rather limited niche where this is useful. RP2040 seems like its got a USB sweetspot. External XTAL is needed for USB to work (the communications require a certain level of precision where internal oscillators are unusable). But there's no easy offramp from the Raspberry Pi Pico. The Arduino Uno could teach beginners how to take a chip, jam it into a breadboard, and still get your code working.

Ultimately, I consider the RP2040 more of an MPU, rather than MCU. An MCU/microcontroller is what you reach for when you need to simplify your circuit, do as much as possible with just one part. An MPU / Microprocessor is what you reach when you need more compute power.

Small screens: E-ink, LCD, and TFT...​


With SRAM counts reaching into 4kB+ or 8kB even on the $1 to $2 chips... graphical screens are on the books!

LCD are an older, familiar technology and are the default pick for a lot of graphics. Typical LCD screens are ~1mA to 2mA for the screen, and maybe ~20mA for the LED backlight. However, Sharp's LS013B7DH03 Memory-LCD has ~50uA (!!!) power consumption instead (though no backlight seems to be available).

E-ink is perhaps my favorite tech, but it has severe downsides. The biggest: a ~2 to ~5 second update time, depending on model. So animations are impossible, and the UI updates are significantly laggy. E-ink also requires high-voltages to operate, so they all require inductor+capacitors to be added into your circuit to boost-up the voltage. This also causes an in-rush current you may have to manage. Digikey keeps Pervasive Display's e-ink in stock

Even Color-TFT is cheap these days Midas Displays offers MDT0096A2 with full color.

----------

Hopefully that's enough of a random rant to get us started!
 
Last edited:
Joined
Jan 3, 2021
Messages
2,671 (2.21/day)
Location
Slovenia
Processor i5-6600K
Motherboard Asus Z170A
Cooling some cheap Cooler Master Hyper 103 or similar
Memory 16GB DDR4-2400
Video Card(s) IGP
Storage Samsung 850 EVO 250GB
Display(s) 2x Oldell 24" 1920x1200
Case Bitfenix Nova white windowless non-mesh
Audio Device(s) E-mu 1212m PCI
Power Supply Seasonic G-360
Mouse Logitech Marble trackball, never had a mouse
Keyboard Key Tronic KT2000, no Win key because 1994
Software Oldwin
AVR64DB32-- 8-bit AVR still lives! My microcontroller of choice
And I see it comes in a DIP package, among other options. That's great for breadboarding and also if you make your own PCBs using less advanced 500,000 nm lithography. (We used to call it "exposure to UV" and "etching" etc. back in the day but why not use new fancy words?)
 
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)
And I see it comes in a DIP package, among other options. That's great for breadboarding and also if you make your own PCBs using less advanced 500,000 nm lithography. (We used to call it "exposure to UV" and "etching" etc. back in the day but why not use new fancy words?)

PDIP is great for breadboards, but I actually find the SOIC and SSOP sufficient for PCBs.

Surface-mount isn't hard, though its a different process than just soldering irons. The right tools include a hot-air gun, and a pancake skillet (heating up the whole PCB board gently). Some actually use a toaster-oven for reflow oven, and then hot-air rework the problem spots. There's really something to be said about surface mount process: using a stencil to spread liquid solder paste is way more convenient than individually dropping solder onto a bunch of holes.

But it does cost you more money to buy these tools. If you only have a soldering iron, then yeah, PDIP is great. Also, solder paste stencils cost extra when you're ordering the PCB.

------

I'll also plug wire-wrap while I'm here. Wire wrap is a good intermediate step between breadboards and PCBs. Its tedious since you need to hand-connect all the wires together, but if the circuit is simple enough, a 0.1" perforated board + wire wrap may be all your project needs. Next step up: if you are willing to bust out the soldering iron, then veroboard.

All of these are prototyping technologies, just with various costs / tedious work involved at each step. Try them all and figure out which one works for you.
 
Last edited:

qubit

Overclocked quantum bit
Joined
Dec 6, 2007
Messages
17,865 (2.98/day)
Location
Quantum Well UK
System Name Quantumville™
Processor Intel Core i7-2700K @ 4GHz
Motherboard Asus P8Z68-V PRO/GEN3
Cooling Noctua NH-D14
Memory 16GB (2 x 8GB Corsair Vengeance Black DDR3 PC3-12800 C9 1600MHz)
Video Card(s) MSI RTX 2080 SUPER Gaming X Trio
Storage Samsung 850 Pro 256GB | WD Black 4TB | WD Blue 6TB
Display(s) ASUS ROG Strix XG27UQR (4K, 144Hz, G-SYNC compatible) | Asus MG28UQ (4K, 60Hz, FreeSync compatible)
Case Cooler Master HAF 922
Audio Device(s) Creative Sound Blaster X-Fi Fatal1ty PCIe
Power Supply Corsair AX1600i
Mouse Microsoft Intellimouse Pro - Black Shadow
Keyboard Yes
Software Windows 10 Pro 64-bit
This is hardcore techie. The qubit approvez. :cool:
 
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)

Hmmm. Maybe 10 years ago, I'd have been interested in a cheap FPGA programmer. But not today.

What I'm more interested in, is the USB / Mass Storage Device programming methodology. I think I first heard of it on RP2040, where you drag-and-drop the firmware into a (fake) USB mass storage device, and that is how the RP2040 gets to run. Maybe there are earlier USB implementations, but this dirty hack gets around the $5000+ USB membership fee (to register for USB numbers)... and provides an easier way to pass data to an embedded device.

The FT232 trick (USB to Serial Port) might be easier though. FT232 already registered for USB and everything, and will just present itself as a USB / Serial port to Windows / Linux, and then present itself as a UART in the microcontroller-world side. Hmmm... decisions decisions...
 
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)
I was looking around for the lowest-spec chips, out of curiosity recently.

The cheapest chip on Digikey is the ATTiny4 at $0.39 each (at Quantity 100+). A variety of undocumented Chinese chips apparently come in under $0.05 (though I don't know where to buy them / check their prices). But these Chinese-chips seem like knock-offs of the Microchip PIC10F200. That's ~256-words of instructions + 16 Bytes of RAM.

-------

I get that ATTiny / PIC10F200 / Chinese Knockoffs of these chips are for the absolute lowest price, probably for mass production purposes. But at my level (hobbyist / very small scale manufacturing), the AVR16DD14 serves as a more useful floor.

The only reason to "go smaller" is for power-saving purposes IMO. If you're making anything at the hobby / small scale level, there's not much difference between a 15-cent chip and a 91-cent chip... because all the other one-time costs dominate your prices. (PCB design, USB Licenses, Software licenses, debugging tools, etc. etc.).

AVR16DD14 has one more trick up its sleeve: 4.7uA active current consumption at 32kHz. If lower-specs are "fine" for your uses, just run these chips at lower-and-slower speeds. Still though, ATTiny4 shares a compiler / assembly language / IDE with the AVR16DD14, so I could go down to 39-cent chips if I really wanted to. Just remember that the AVR16DD14 beats the older ATTiny4 in power consumption (!!!).
 
Last edited:
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)
I've been thinking about power-consumption for the past couple of weeks. I think its best to think about power in the following way.

* Under 1mW -- "Ultralow Power". There are a wide variety of practical applications: hearing aids, insulin pumps, watches (and smartwatches) which must remain battery powered, but as miniature as possible. Batteries like AAAA cells, N-cell, CR2032, or CR123 are used for these applications. Don't expect any micropython or easy to use libraries, you're pretty much forced to code in highly-efficient C and think very hard about not only efficient code... but also efficient circuits and minimizing leakage. It is at this size that you begin to worry about leakage currents of cells (and why CR2032, a very low-leakage cell, is useful). Communications in general are a nightmare, even Bluetooth LE (low power), and competitors, are in the 10mA range, so careful use to minimize radio transmissions is a must.

For ultra-low power, many microcontrollers are sufficient provided you can run them at a low enough clockrate. AVR DA/DB/DD are fine, but it seems like the leaders are the ARM Cortex-M23 and Cortex-M33 chips, such as SAM L10/L11, or STM32U5 (this chip is very rare, maybe the slightly older STM32L5 could be used if you have a project today).

* 1mW to 100mW -- "Low Power". while CR2032 remains a potential option, you're likely a "big" enough project to consider standard batteries like LiPo, 18650 cells, AAA or AA cells. This is where the "Arduino Uno", and clones all lay. C or C++ programming is still a must, but Arduino libraries are still somewhat easy to use. Leakage is a somewhat obscure issue: losing 10uA here and there (ex: Aluminum capacitors, or Power Supply Quiescent currents) probably isn't a big worry of yours. But there are higher levels of leakage (such as NiCd or old-school NiMH cells) that you still have to watch out for. Months, or even years of battery life is on the table even on AA cells. Communication isn't quite a "nightmare", but still must be thought about deeply. 802.11 WiFi is in the ~300mW, Ethernet is ~500mW, CANbus is like 45mW. Power-efficient communications can be done (ex: Bluetooth LE, ANT, Zigbee), or you can use "bursty" mainstream communications like WiFi but only rarely.

* 100mW to 1000mW -- "Internet of Things mainstream". At this power level, we've hit ESP32 boards. Relatively easy interpreted code and libraries (ex: MicroPython) can connect to WiFi / 802.11 and interact easily with mainstream computers / routers. This is probably the level beginners should jump in on, you're small enough to still run an AA-powered part for hours-to-days (depending on how efficient you design it), and its still very easy to connect to HTTP servers or communicate in general. PoE Ethernet, WiFi, CANbus... things are looking way more "normal" compared to the low power world. Example boards: ESP32, Teensy 4.1, and RP2040.

* 1W to 10W -- "Small Computers". Rasp. Pi, Jetson Nano, Beaglebone Black, etc. etc. make an appearance. Things no longer really look like electronics and instead look far more like "small computers". You can run these devices for hours on higher-end 18650 LiPo cells... but you probably are thinking about permanently wired solutions now (USB, PoE Power, Wall Warts)

*10W to 100W -- Come on. This is Laptops to Desktop territory. Its not electronic circuits anymore!! This is the limit of portability with today's battery technology. But really, its just hardware / computer building at this point! Still cool.

* 100W+ -- Servers, GPU mining, etc. etc. Well beyond the discussion point of this topic.

-----------

At the "Low Power" to "IoT Mainstream" power sizes, I've been looking at mikroBUS components. MIKROE is a company that historically specialized in PIC microcontrollers. They seem to be the inventors of mikroBUS, a competitor to the "Arduino Shield" format. Its about 1/2 the size of an Arduino Shield, but it looks pretty easy to use.

I've found Ethernet boards, Bluetooth, CANbus, and all sorts of "click" boards that fit into mikroBUS. I've also found Arduino-to-mikroBUS shields, as well as boards (Curiosity Boards from Microchip) that seem to support mikroBUS. I figure I'd write a bit about it today because its always nice to have fast prototyping tools.
 
Last edited:
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)
* 1W to 10W -- "Small Computers". Rasp. Pi, Jetson Nano, Beaglebone Black, etc. etc. make an appearance. Things no longer really look like electronics and instead look far more like "small computers". You can run these devices for hours on higher-end 18650 LiPo cells... but you probably are thinking about permanently wired solutions now (USB, PoE Power, Wall Warts)

I was thinking about this the past week, when I suddenly remembered these babies from Home Depo / Lowes:


In case the link goes down: its a SLA / VRLA battery... lead-acid, 12V / 7.2 Amp-hours for $20. Now I know, this is the 150-year-old design and all, but Lead Acid is actually exceptionally good for "UPS" style applications. First a review of the downsides.

* Lead Acid is very heavy
* Lead Acid only has a few hundred cycles. (NiMH and Li-ion can do over a thousand cycles).
* Lead Acid don't like deep discharges: the deeper you discharge, the more you damage it. 50% is the most you should do.
* Lead Acid takes ~10+ hours to charge.

But... in a "UPS" type application, none of these downsides matter. Indeed, that's why lead-acids are extremely common in UPS-style applications. This focuses on Lead Acid's #1 benefit: its rock bottom, dirt-cheap prices. You are simply not going to find a 84W-hr Li-ion or NiMH battery for $20... Or even 42W-hr, since 50% discharge is the most you're supposed to do Lead Acid.

-------

Oh my god.


Somehow, I should have seen this coming. Herp derp dudes, I've reinvented the UPS. Apparently they use a 12V 9 Amp-hr SLA battery, with dimensions very similar to the battery I linked earlier. Looks like typical desktop models use 2x of these (12V 18Amp-hr ??).

--------

EDIT: Decided to do a bit of Rasp. Pi research. Looks like some others have come across this idea already: https://www.hackster.io/news/explai...ower-a-lead-acid-battery-in-fact-0f566de5a1be

Looks like ~40-hours in practice with these larger Lead-Acid batteries, even with a higher power Rasp. Pi 4. Looks like that tester simply charged the Lead Acid Battery, then hooked it up to his Rasp. Pi. I feel like I'd want a proper "UPS" kind of setup, but it would obviously be a complicated set of electronics... I'd have to practically create my own charger circuit, possibly my own fuel gauge circuit as well (if you don't want the lead-acid battery being discharged too much anyway...). Honestly, I was expecting that more people would have tried this and have maybe a design to discuss, but its looking like an "exciting" project to work around... one that AVR64DB32 can solve rather cheaply IMO (similar to AVR DD, except the AVR DB has built-in OpAmps).

OpAmps + Microcontroller is very magical. 0.01 Ohm Sense Resistor -> OpAmp multiplier circuit -> OpAmp integral circuit -> Microcontroller == Fuel Gauge. I've even heard of Microcontrollers (like ATTiny, predecessor to AVR DB) can be used to make buck or boost converters, using their ADC, though I'm sure efficiency suffers compared to a proper analog solution.

EDIT: Found that old note I heard of long ago: https://www.microchip.com/content/d...ApplicationNotes/ApplicationNotes/doc8080.pdf . Yeah, just an ATTiny was all that was needed to control the buck/boost converter to charge a Li-ion battery there. Very interesting...

-------------

EDIT: https://eu.industrial.panasonic.com.../files/downloads/files/id_vrla_handbook_e.pdf

The charging circuit and UPS circuit are way simpler for Lead-Acid than for Li-ion. Apparently, simplicity to the Lead-Acid circuits is a major advantage over Li-ion!! See Chapter 4: "Charging Methods" to Panasonic's handbook to lead-acid. Example "D", float charge, is exactly the UPS use-case scenario.

EDIT: The 12V 7.2Ah battery for $20 is a very solid watt-hour per dollar. It pretty much beats all cheaper lead-acid batteries (6V 1.3Ah seems common, but for $12). Larger batteries, like 12V 100Ah for $100, are even more efficient but that's a lot of battery to put towards one use. I guess there's something to be said about efficiencies of scale. Going beyond that size starts to be 12V Car batteries.
 
Last edited:
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)

1674176419027.png


A very exciting board I learned about today. This is an AVR + Cell Phone chip for IoT uses. Looks like its a 4G compatible Cell Phone transceiver for ~$50 or so. There is also an ECC Cryptographic module on board (Public-key infrastructure). Very cool.

The board comes with a battery controller for Li-ion and Li-po batteries (3.6V and 3.7V). Looks like the cell phone modem is around ~30mA and is likely the highest power device on board. This should open the board up for standard 18650 cell support.

---------

I'm not sure what the cell phone connects to however. It seems to be some kind of "cloud service": https://github.com/microchip-pic-avr-tools/iotprovision-bin. I'd of course prefer an ordinary radio and am a bit disheartened by this news, but compatibility with LTE networks probably makes this a very pragmatic choice. I'm just worried about the ongoing costs (cell phone SIMcard subscription + cloud service subscription) it would take to keep something like this working.

Still, I'm sure there's a bunch of professors who want some solar-powered + battery backup doo-hicky out in the middle of the wilderness that just needs to call back once a day to report its findings. I imagine a development board like this is highly useful.
 
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)
So who wants to talk about what parts you stock in your home-labs? Its not like I have a lot of room at home, but I still want to be able to do various electronics projects.

My lab philosophy: through-hole / DIP parts preferred. Though SMT parts are superior in almost every way imaginable, its difficult to create custom PCBs and use SMT in practice. Some SMT parts may be unavoidable, so a decent collection of breakout boards can be used. https://www.sparkfun.com/products/496 . All the parts below are in through-hole.

OpAmps: LM358 for 30V applications. MCP6002 for 5.5V applications and lower.

MOSFETS: 2N7000 for NMOS. PMOS is... kinda expensive actually, I don't stock PMOS. Note that 2N7000 is specified at 4.5V Vgs(on) and no lower, meaning you really should use 5V uCs with this MOSFET.

BJTs: 2N2222 for NPN and 2N2907 for PNP. The NMOS part is preferred due to not requiring a resistor on the gate, but 2N2222 is far better behaved at 3.3V and lower voltages. 2N2907 is cheap and readily available when your backwards PNP is required.

Passives: E12 Resistor set from 1Ohm to 1Meg-Ohm. E6 Ceramic Capacitor set from 1pF to 10uF. E3 Aluminum capacitor set from 10uF to 470uF. Inductors are... I haven't figured out yet. See "Voltage Regulators", which are the biggest use of inductors. I'll buy an inductor kit once I figure out voltage regulators. Trimmer-pots 100Ohm, 1000Ohm, 10kOhm, and 100k Ohm cover the gamut, especially since there's plenty of tricks (series resistors and/or parallel resistors) to change the range of pots.

Batteries: AA NiMH for portable applications, and 2.1mm x 5mm barrel jacks to boot. Wall power is 5V USB

Voltage Regulators: I'm... stumped. I know I need to stock a part, but I haven't really figured things out. The `317 is like 3V of dropout and impossible to use with battery / 5V circuits. 1117 is nominally LDO... but it really isn't much better. SMPS would be nice, but MC34063 is pretty awful in terms of specs. SMT might be required for a good chip here, unfortunately. TPS7201 (LDO) and TL497A (SMPS) seem better. Note that TI notes the TLV767 is the up-to-date LDO part except... its SMD only. Voltage-regulators really are just "the thing" that's really hard to do from a through-hole perspective alone. I'm struggling to stock my lab correctly with this important class of parts.

Displays: LEDs for basic indicators. 7-segment LED x 4 characters for simple outputs. Anything else is too expensive / specialized to stock in a home lab (and should be bought on a project-by-project basis). Prefer to use UART for I/O (RS232 and talk with a laptop / computer).

Inputs: UART is the default choice. But I'm experimenting with photodiodes + IR Remote Controls. Who needs buttons? Just buy a universal-remote control + photodiode module to read it and bam, you've got like 50 buttons you can custom program for your projects. TSSP4038 seems like the ideal part here, but I need to experiment.

Microcontroller: I've got a few remaining ATMega328p 28-DIPs from years ago, but AVR64DB28 is so much better so I've ordered a few AVR64DB28 28-DIPs when the ATMega328p isn't good enough.

-------------

Hardware: 0.1" header pins, .21" and .318". Wirewrap parts. 30 AWG wire (wirewrap + most purposes) and 24 AWG wire (when more current is needed). Crimp-pins + keying pins for custom connectors. I've just ordered this particularly interesting prototype board: (https://www.digikey.com/en/products/detail/arshon-technology-inc/AST1108-E02/14312429), we will see if its useful. SMT parts + breadboard like layout sounds really interesting.
 
Joined
Aug 20, 2007
Messages
20,787 (3.41/day)
System Name Pioneer
Processor Ryzen R9 7950X
Motherboard GIGABYTE Aorus Elite X670 AX
Cooling Noctua NH-D15 + A whole lotta Sunon and Corsair Maglev blower fans...
Memory 64GB (4x 16GB) G.Skill Flare X5 @ DDR5-6000 CL30
Video Card(s) XFX RX 7900 XTX Speedster Merc 310
Storage 2x Crucial P5 Plus 2TB PCIe 4.0 NVMe SSDs
Display(s) 55" LG 55" B9 OLED 4K Display
Case Thermaltake Core X31
Audio Device(s) TOSLINK->Schiit Modi MB->Asgard 2 DAC Amp->AKG Pro K712 Headphones or HDMI->B9 OLED
Power Supply FSP Hydro Ti Pro 850W
Mouse Logitech G305 Lightspeed Wireless
Keyboard WASD Code v3 with Cherry Green keyswitches + PBT DS keycaps
Software Gentoo Linux x64
I recently modded my usb keyboard in specs to run off a bluetooth microcontroller + 4 AA NiMH eneloops in a power bank. Does that count?

Specific power bank I am using:
https://www.amazon.com/dp/B07WVVXQX7?ref=ppx_pop_mob_ap_share

Even with the backlit leds on + microcontroller, lasts about 8 hours using eneloop pro cells.
 
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)
I recently modded my usb keyboard in specs to run off a bluetooth microcontroller + 4 AA NiMH eneloops in a power bank. Does that count?

Specific power bank I am using:
https://www.amazon.com/dp/B07WVVXQX7?ref=ppx_pop_mob_ap_share

Even with the backlit leds on + microcontroller, lasts about 8 hours using eneloop pro cells.

I'd say it counts!

So how'd ya do it exactly? Which microcontroller? I assume USB -> Interpret commands -> Send it out with Bluetooth ?? Simple conceptually but a lot of details / libraries could be involved (or maybe just the right #includes at least).
 
Joined
Aug 20, 2007
Messages
20,787 (3.41/day)
System Name Pioneer
Processor Ryzen R9 7950X
Motherboard GIGABYTE Aorus Elite X670 AX
Cooling Noctua NH-D15 + A whole lotta Sunon and Corsair Maglev blower fans...
Memory 64GB (4x 16GB) G.Skill Flare X5 @ DDR5-6000 CL30
Video Card(s) XFX RX 7900 XTX Speedster Merc 310
Storage 2x Crucial P5 Plus 2TB PCIe 4.0 NVMe SSDs
Display(s) 55" LG 55" B9 OLED 4K Display
Case Thermaltake Core X31
Audio Device(s) TOSLINK->Schiit Modi MB->Asgard 2 DAC Amp->AKG Pro K712 Headphones or HDMI->B9 OLED
Power Supply FSP Hydro Ti Pro 850W
Mouse Logitech G305 Lightspeed Wireless
Keyboard WASD Code v3 with Cherry Green keyswitches + PBT DS keycaps
Software Gentoo Linux x64
I'd say it counts!

So how'd ya do it exactly? Which microcontroller? I assume USB -> Interpret commands -> Send it out with Bluetooth ?? Simple conceptually but a lot of details / libraries could be involved (or maybe just the right #includes at least).
The microcontroller is some premade kit thing. Most of it's documentation is in japanese but google translate might help you out. Here's a place selling it (too expensively) in english:


I have no idea what binary blobs it's running, but as I live rural I'm not concerned with someone bluetooth hacking my keyboard, or anything, so not too worried.
 
Joined
Apr 24, 2020
Messages
2,562 (1.75/day)

TI Announces their low cost Cortex-M0+ core offering. This MSPM0 line starts at ~39-cents at the low end, and goes slightly above $1 at the higher end (quantities 1k, target price). Based on the specs, these look extremely competitive. Under 100uA/MHz (low power), 4kB SRAM, OpAmp, Comparator, 4 MSPS ADC, 1MSPS DAC, etc. etc.

All surface mount though, but that's to be expected these days. Here's one datasheet of a chip I was kinda interested in in the line: https://www.ti.com/lit/ds/symlink/mspm0g1505.pdf

IIRC, the MSPM0G1505 was aiming at the 70-cent price tier. So that's a lot of specs for not a lot of money.
 
Top