I was wondering if anyone has any recommendations on any small MCU (preferably something I can program with arduino, like the attiny85) that has a built in Uart. I've been over the options like using an ATtiny85 with software Uart but I'm getting an impression that it messes with things like using Millis and such (unless I'm reading into it wrong). The general idea is using the MCU with a sensor in a location and it can send the results back to an arduino through the uart. On a side note the distance of unit from the arduino could be anywhere from 1 - 10 meters so I'm assuming the serial communication is the way to go?
Anyhow, thanks in advance.
PS. Wireless isn't an option.
there are ESP32 mini kits - try a search on EBAY for "esp32 mini"
for 1 to 10meters TTL serial communication should be OK unless you are in an electrically noisy environment - if not may require RS232
May we know why ?
When you say "small" are you referring to the bare chip, or a PCB? The chips themselves are all pretty small these days. Most of the new Trinkets have hardware serial and there are also some ESP32 boards like the Seeeduino that are about an inch or so with hardware serial ports.
I use D1 Mini boards get a handful of them from amazon cheap they have WiFi capabilities size of board is 1"x1.5"
Yes, the Trinket M0 may be just right
https://www.adafruit.com/product/3500
We've taken the same form factor we used for the original ATtiny85-based Trinket and gave it an upgrade. The Trinket M0 has swapped out the lightweight ATtiny85 for a ATSAMD21E18 powerhouse. It's just as small, and it's easier to use, so you can do more.
Have you tried if ATtiny85 works with a Software UART Port (SUART)? The SUART Port will not conflict with the millis() function.
An ATtiny 2313 has a hardware UART, which is one of the reasons i have use for it. You can use an external crystal for timing, and is fairly power efficient. I mean it doesn't require much current and runs on a wide range of voltages. Mind you it is not that cheap comparatively and the maintainer of the ATtiny core told me there are a few newer ATtiny versions that are better.
Also the 'Serial' object implementation was not very efficient in the old core, (using a rather big buffer for rx & tx using up nearly all variables) not sure if that has been improved, but just a simple write & read directly to the registers is simple enough to create
Oh, the Tiny2313 brings back memories. I used to sell a counter board that used that chip for about a decade before I finally stop building them. Nice little chip.
Well, ALL of the "Xiao" and "QT Py" boards have UARTS, if you're looking for a board-level product.
The new generation of ATtiny AVRs (say, ATtiny804), and many of somewhat older generation (attiny841) have UARTs and are supported by Spence Konde's (DrAzzy) Arduino core. Nothing quite like the tiny85 - max of 4k flash in an 8pin SOIC, and no 8pin DIP packages.
Sorry for the late reply. Been one of those months.
I didn't see a point in wireless as I would need a power source where the sensor is in the first place where there wouldn't be. Which means I'd have to run a power wire to it so I might as well run a communications through to it too. Also there might be various metal sheets and such in the way.
I actually got a few of those d1 minis (with the oleds) for cheap too recently. I might play around with them a bit.
I'll give the new Gen a look. Thanks for the suggestion.