Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)MI

Microcontroller

  • My favorite MCU boards.

    When I first started using AVRs I bought a couple of UNOs. I needed something smaller that I could use inside controllers for my machines. I moved to the ProMini and it served me well for two or three years. I got a couple of Nanos in Hacker Boxes and really liked them. I like the built in voltage regulators, the USB port, and the ICP port. I used Nanos for a couple of years then needed something bigger. Now I'm using the ATMEGA2560 Pro Mini. It's got enough IO to run my entire room.

    I've recently switched from Bascom AVR to Great Cow Basic. I'm thinking that I may need to mode to a PIC based MCU.

    Does anyone have a favorite PIC based MCU board similar to the ATMEGA2560 Pro Mini?

    0
  • IrDA: Can it be relevant in 2022? (aka: 2023 but its an old post of mine!)

    I wrote this up for a /r/Reddit community a while back, thought I'd share it here. I also cross-posted to MICROCONTROLLERS@lemux.minnix.dev, which seems like another Microcontroller-community trying to bootstrap itself here on Lemmy-verse.

    I had thought-experiments with IrDA and it seems like a reasonably solid technology. Most modern TI, STM32, and AVR chips seem to support IrDA today in 2023, and IrDA modules still seem to be made. So its an interesting idea for a "wireless" platform.

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

    I was researching wireless communications and... IrDA was brought up in an ancient document somewhere. And that got me thinking: is IrDA a serious option in 2022? We've got like $4 ESP32 for WiFi and $2.50 Radios (NRF2401) --- the wireless space is just so competitive.

    But what about that... old infrared technology from the 90s/00s? Well... lets look at it seriously. And I don't mean to reimplement the mess that was OBEX, IrCOMM, IrLAP and all the other acronyms from that era. But the lowest level IrPHY is just a 115,200 Baud UART over infrared. Lets look at some parts available today and think of things...

    Hardware: Vishay TFDU4101 -----------

    The Vishay TFDU4101 IrDA combo LED (transmitter)+Photodiode (receiver) is around $5. Though more expensive than radios like NRF2401, it comes with significant power-benefits. It only has 0.075mA of active current and 0.00001 mA of sleep/shutdown current. Your typical radio modules are 10ma to 100mA on receive, so this is clearly a significant benefit.

    The TFDU4101 transmitter is "just an LED". At full power, it is specified to eat 300mA+ at ~1.8V dropoff. But the IrDA standard is 3/16 pulse-width, meaning on-bits are just 18% on, while off-bits are 0% on. Assuming 50% on-bits and 50% off-bits, you'll in practice only be using ~9% of that power on the average, or ~30mA or so average transmit current.

    You can also use a 56 Ohm resistor to limit the LED's current, with "low-power IrDA" being supported on just 30mA of LED current. At ~10% overall power usage (18% for on bits and 0% for off bits, and 50/50 mix of both), you're only at ~3mA of current on transmit at the low power specs.

    At full power, the transceiver module is designed to be used at ranges of 1 meter. At low power, its only designed for 5cm to 10cm or so, being an "NFC-like" protocol.

    The TFDU4101 alone has 39,000+ in stock at Mouser and 55,000+ in stock at Digikey. TFDU4101 is 9mm wide, and has smaller siblings at 6mm and 8mm. Though IrDA is not anywhere near as popular as it used to be, someone out there continues to make tens-of-thousands of transceivers. So for the year 2022, we don't have to worry about this transceiver completely dying yet.

    Modern uC support in year 2022 ----------

    • ATTiny: IRCOM in USART provides support for Atmel chips.

    • Atmel SAM D10/D11: Shares lineage with ATTiny, also has IRCOM bits / support for 115200 baud IrDA

    • MSP430: TI not only has an example of IrDA, but its example is extremely comprehensive, including the entire IrPHY / IrLAP / IrLMP / TTP / IrCOMM protocol stack !!

    • STM32: A big line of chips, but a good application note here shows an implementation for the larger STM32F7. However, chips as small as the STM32L0 claim IrDA support in STM32Cube.

    • RP2040: Someone made that PIO work on fast protocols like DVI. I'm sure it'd work for 115,200 baud IrDA or even the 1Mbit / 4Mbit IrDA standards. You'll probably have to implement oversamping / other such communication details yourself, but I'm sure its actually "possible".

    So we have support for virtually every popular hobbyist microcontroller on the market. I haven't used them all, but at least their datasheets have something to say about IrDA.

    Example use cases ------------

    90s kids probably remember the myriad of applications of IrDA and other infrared technologies. Here's some that I remember:

    • (In Japan), Infrared payment (similar to NFC credit cards today)
    • Tamagotchi interactions / "Digimon battles"
    • Gameboy Color enhancements ("Mystery Gifts" in Pokemon Gold/Silver)
    • Delivering photographs out of a camera
    • Exchanging contact information in PDAs

    Today, a lot of these are accomplished with NFC and/or RFID. And... I think that makes sense. Low-power IrDA's sweet spot range was very similar to the range of RFID cards (though you had to have the transmitter/receivers "point" to each other, unlike RFID which is "directionless).

    One-way communication examples ----------

    • Remote controls (TVs)
    • Infrared wireless keyboard / mouse (https://www.amazon.com/Think-Outside-Stowaway-Wireless-Keyboard/dp/B0002OKCX4)
    • Infrared wireless headphones (https://www.amazon.com/Wireless-Headphones-Travelling-Universal-Entertainment/dp/B079CKQR4N/ref=sr_1_3?keywords=infrared+headphones&qid=1669938474&sr=8-3)

    One-way communication is still useful! Every TV back in the 90s had remote controls through infrared lights, and it worked quite reliably. The TV Remote Control standard is a 38kHz carrier wave (much slower than the 115200 baud of IrDA), but is a closely-related technique. If you need a bit more oomph / transmission speed than just the 38kHz remote control protocol, maybe consider the upgrade to IrDA?

    So... is IrDA still relevant? -------------

    While there's a number of infrared projects I see pop up, I don't think IrDA / 115200 baud infrared comes up very often.

    Still though, I'm curious what people around here think. The power-usage on receive is downright miniscule and having ~1 meter range is a bit more than typical NFC / RFID.

    Or is this an irrelevant protocol that should remain in the dustbin of the 90s/00s? We have so many radios today (Bluetooth, WiFi, Zigbeee, Z-Wave, etc. etc.) that radio is often the default choice.

    Thanks for listening to my rant! Hopefully this serves as inspiration for someone out there.

    0
  • The AVR-IoT Cellular Mini: 8-bit AVR DB with LTE-M Cell modem

    One of the more interesting 8-bit AVR boards that have come out with the new, modern "DB" (or DA/DD/EA) numbering is this AVR-IoT Cellphone.

    While its a straightforward hookup of a cellphone modem to the UART of a typical 8-bit AVR microcontroller, its a fun little concept board. I don't really know what I'd do with a cell phone-based microcontroller... maybe some kind of Solar Panel + Lead-Acid project that I call with modem to transfer data somehow? I don't even know where I'm going with this.

    32.768 kHz crystal for accurate time keeping. Cell modem with 150MB SIM card from Truphone, so Data transfers has been figured out, with Nano SIM / eSIM card support to buy whatever cell phone plans you got.

    I will say that I was somewhat annoyed by the "Zigzag" pins the first time I saw them from Microchip. But I've been sold on it: by zigzaging the pins, the header-pins become easier to solder (!!), because the additional friction holds the pins still during soldering.

    It takes more force and effort to jam those pins in, but its worth the effort and an overall easier job when you get used to it.

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

    The ~$70 USD board is on the expensive end, but... cell phone modem !!!! Temperature Sensor, Color Sensor, and Serial EEPROM, etc. etc. Lots of nifty little features for sure.

    0
  • Idea: MCU/parts swap or school donation postings?

    Hi, just found this community. The inaugural post here showing a desk top full of miscellaneous boards reminded me of the random bits I have in boxes, stored away and not being hacked on like they should be :/

    I wonder if there would be interest here in a sort of swap-by-mail thing where we post boards or parts we feel bad about not using and swap them for other things, that we might want to use instead.. maybe an MCU dev kit for some sensors, or a even box of nice cookies if the hacking spirit is snoozing right now (as it is for me -- so many other things in life to do at the moment...)

    I find it actually harder to focus on doing a project because there are too many bits in my boxes sometimes.

    I think the idea of donating bits to schools for students to use would be cool as well, but haven't looked into it much (would they get used? Which schools have good programs with teachers that could actually use donations?)

    0
  • STM32C011J4M6 Low-cost 90nm 6kB / 48MHz ARM Cortex M0+ uC

    cross-posted from: https://lemmy.world/post/766830

    > STM32C0 is a new line of Cortex M0+ Microcontrollers this year. Low-end STM32 chips have been trying to dethrone the 8-bit crowd by offering a 32-bit ARM Cortex M0+ for some time, and I welcome this competition. STM32C0 is cost-optimized with 8-pin to 48-pin form factors, and targeting very low end with 6kB SRAM and 48 MHz clock speed. > > SPI, UART, I2C, 4+ MHz XTAL and 32kHz XTAL support, multiple timers for PWM, 12-bit ADC with best case 2.5 Megasamples / second. > > Not bad for 61-cents (quantity 1k) at Digikey, ehh? > > ---------------- > > I think the 8-bitters still seem to have more I/O features, but this is a pretty competitive 32-bit chip on the low end. ST-micro is selling this chip as "entry-level 32-bit", saying that you can keep code-compatibility as you scale up your projects. After all, ARM is ARM, be it a tiny Cortex M0+ or a higher end M33, M4 or M7 chip. > > For people hoping to scale designs up and down, adding STM32C0 line chips is probably welcome to the STM32 hobbyists. >

    0
  • A picture of just some of the Microcontrollers and MCUs in my office right now.

    I currently have everything from ATTINY9 and 10 chips in SOT23-6 packages, to ATMEGA328Ps and PBs and their Chinese LGT8F328P clones to ATMEGA2560s, some STMs, some PICs, some Raspberry Pis, and some ESPs of various flavors. There are also Py boards in there and some that I don't even remember.

    I mostly work with AVRs and ESPs but the brothers I work with who own a small custom electronics business use PICs so they have been encouraging me to branch out.

    I had been using BascomAVR to program the AVR chips but following the author expiring the license I had paid full price for for asking questions in the forums I have switched to Great Cow Basic. It can compile to a large number of MCUs, not just the AVRs so I'm expanding my repertoire.

    Are you new or experienced? What MCUs and microcontrollers do you use? Which ones are you interested in? What languages do you program them in? Which IDE do you use? What projects are you working on?

    0
3 Active users