Why not make your own Arduino? - Page 1
Forum section: electronics / beginners

author: LoveLaika
author_rank: Frequent Contributor
timestamp: April 13, 2021, 03:46:57 pm
content: I was examining the schematics for an Arduino Nano Every, and I was curious about something. It seems to me (more or less) that an Arduino is essentially just 1 or 2 microcontrollers on a board along with other necessary circuitry. In the case of a Nano Every, you have the ATMEGA4809 (8-bit microcontroller) and the ATSAMD11D14A (32-bit microcontroller). I have some questions regarding this topology and with the idea behind Arduino in general.You program the Arduino through USB, but the USB port interacts with the ATSAMD IC which 'drives' the ATMEGA IC. Why couldn't the host computer via USB work with the ATMEGA directly (or perhaps a better way to ask, why is it necessary to have two microcontrollers in the first place)?With the whole idea of Arduino being relatively straightforward (at least looking at the Nano Every), why hasn't there been some beefed-up microcontroller board available? Looking at Digikey, there appears to be a lot of microcontrollers, each with their own specifications. With say like the availability of USB-C, which to me allows for more power, why hasn't there been a simple microcontroller board that takes advantage of it?

author: james_s
author_rank: Super Contributor
timestamp: April 13, 2021, 04:02:15 pm
content: There are arduinos where the USB is handled directly by the microcontroller, but the atmega does not have a USB interface built in. Yes it's possible to bit-bang but that comes with some issues.There are tons of different microcontroller platforms that support the Arduino environment.

author: agehall
author_rank: Frequent Contributor
timestamp: April 13, 2021, 04:03:26 pm
content: There is nothing magic about Arduino. They just decided to create a few simple boards with some abstractions around them (like pin names) and build a complete IDE around this.I think that Arduino did one thing well, and that was bring simple and easy-to-use boards to the mass market. Their IDE and ideas around how to use it, well, let’s just say that the words I think describes that part are not suitable for this forum.There is nothing stopping you from replicating an Arduino board on your own, but you will probably not be able to do it cheaper than an Arduino clone off the shelf in a store due to volumes. That said, there can be some good reasons for doing it - like if you need the functionality but don’t want a shield on an Arduino board but rather would integrate it all on one PCB. The Arduino schematics are well-known at this point and laying them out is a fairly simple task.Now, when it comes to beefier boards, it sounds like you have been looking at low end Arduino. Check out some of the STM32 development boards and you’ll find some true marvels. You can still use the Arduino software to develop for many of them, so I’d say they are basically Arduino as well.

author: oPossum
author_rank: Super Contributor
timestamp: April 13, 2021, 04:04:58 pm
content: 1) Arduino Leonardo and AVR based Teensy do that.2) There are numerous Arduino (or compatible) with more powerful MCU. Arduino Due (ARM), Blue/Black pill (STM32), Various ESP-32 (Tensilica/RISC-V), ST Discovery/Nucleus (ARM), TI Launchpad, Digilent ChipKit (PIC32) and more.

author: Ian.M
author_rank: Super Contributor
timestamp: April 13, 2021, 04:53:44 pm
content: There is no point as an end user in making an Arduino style board. There are plenty available with all sorts of MCUs and varying levels of hardware and software compatibility with genuine Arduino products, ranging from pin-compatible + fully and natively supported by the Arduino IDE to entirely software incompatible, not even programmable in a 'C'ish language, but using some form or superset of the Arduino header footprint so you can use cheap Arduino shields.It is however worth learning how to create your own application boards around a bare MCU, with or without Arduino software/hardware compatibility, just so, for your own projects, you can get away from the mess of stacked boards, shields, breakouts and DuPont jumper cables that is a typical Arduino based project, with all the reliability implications the mess and frequent lack of design insight brings*. Cloning a well chosen Arduino board may well be a valid third step#up the learning curve towards fully custom MCU based projects, but unless you are a developer working for or supporting maker or educational retailers, communities or institutions it should never be your end target.*Airspeeder Ltd:https://www.eevblog.com/forum/dodgy-technology/95-kg-drone-with-howyadoin-arduino-bodgery-crashes-made-in-straya!/# The first and second steps should probably be anArduino on a breadboard, then building one on stripboard with a different processor to your own design, that needs you to customize the Arduino (or other preferred) IDE with a board support package that may well need tweaking for your particular choice of processor and I/O pinout.

author: Algoma
author_rank: Frequent Contributor
timestamp: April 13, 2021, 05:10:40 pm
content: The new Raspberry Pi Pico and its RP2040 chip has an interesting set of direct interfaces for programming, definitely an improvement that Arduino may eventually follow... Already done:https://www.tomshardware.com/news/raspberry-pi-pico-arduino-official

author: Nusa
author_rank: Super Contributor
timestamp: April 13, 2021, 05:18:38 pm
content: Making your own Arudino (even if it's only on the breadboard) is a common first task for new makers. It's pretty easy, given that most Arduino hardware is not much more than a fancy breakout board for an IC.

author: MikeK
author_rank: Super Contributor
timestamp: April 13, 2021, 05:33:35 pm
content: Arduino was (and is) a specification. In the beginning there were no official Arduino boards, only open-source specs that allowed others (including vendors) to produce the things. One thing they got wrong was the pin layout as it doesn't lend itself to producing a shield from a standard 0.1" spacing protoboard...They got the alignment wrong and it requires pins that are offset.As mentioned, you can't compete with "clones" that are produced in countries with very low wage labor (and cheap knockoff components).If you want to make your own board...go for it. All you really need is the programming header. I have a DIY DDS board on my desk right now that has the microcontroller and the programming port, and using a cheap USB-serial module for getting the program loaded.

author: james_s
author_rank: Super Contributor
timestamp: April 13, 2021, 07:07:36 pm
content: Quote from: MikeK on April 13, 2021, 05:33:35 pmThat drives me nuts, they should have fixed it years ago, sure there would have been some pain early on but they could have easily produced an adapter shield to allow mixing of new and stuff. Similarly the early Raspberry Pi boards had the USB jack offset so it sticks out. Total noob error, I would not have let a board go into production with my name associated with it if it had an error like that.

author: Refrigerator
author_rank: Super Contributor
timestamp: April 13, 2021, 08:03:08 pm
content: Quote from: james_s on April 13, 2021, 04:02:15 pmIt's possible to make the micro interface USB through software, the Digispark does this already.

author: ledtester
author_rank: Super Contributor
timestamp: April 13, 2021, 08:07:16 pm
content: Quote from: james_s on April 13, 2021, 07:07:36 pmThe people behind the Arduino were indeed total hardware noobs. They were artists and designers:https://arduinohistory.github.io/Nowadays I think the odd dimensions isn't really much of an issue. You can get blank shields for your own custom circuitry, and I don't see the shield idea as all that important anymore as people have found it easy enough to use breadboards and protoboards to integrate modules into their projects.One of the main contributions they gave us was a somewhat portable software API permitting libraries to be written which work across a wide range of hardware platforms.

author: Rick Law
author_rank: Super Contributor
timestamp: April 13, 2021, 08:26:14 pm
content: Well, there is a point in making your own -- as a learning experience for us the less-experienced.Messing around with a purchased one did not give me the sense that I know how things works. So, I made one from scratch using a virgin (no boot loader of any sort) 328p 28pin dip version and an FTDI TTL-USB conversion module. I boot-loader that 328 on breadboard to make the "Arduino" working, then later added the ISP header. After I got that thing working, I feel I have better understanding of things. I went on to make one for special purpose - a 4 channel volt meter using the MCU's 4 adc. No good use for it really, but good learning practice.It is for sure cheaper to buy one of the shelf. I can get an Arduino NANO cheaper than I can buy the bare MCU. The FTDI TTL-USB module costs more than twice that of an Arduino NANO. The "4 channel volt meter" I made, well, I can get a NANO plus an ADS1115 modules off the shelf and have 4-channel 16bit ADC version at lower cost. The money I spend to made that two was for pure learning.Apart from learning experience, I can agree that there is no other points in making your own unless you need a very specialized one like being able to operate it under extreme condition -- Hey, you can have the first home-made virgin Arduino (compatible) to receive it's boot-loader on the summit of Mount Everest...

author: james_s
author_rank: Super Contributor
timestamp: April 13, 2021, 09:40:38 pm
content: "Making your own Arduino" can be as simple as plugging a bare AVR into a breadboard, connecting power, and flashing the bootloader with your programming device of choice. For the UART you can use one of those USB to TTL serial cables, and you probably want a decoupling capacitor across the power pins but even that is not strictly necessary in all cases. There is really not much to it. There are valid use cases for this, say you want to build a custom device using the Arduino language and development environment, rather than stick an Arduino and shields inside a project box (yuck), you can test your custom hardware on a breadboard.In practice I use the Arduino kit I received as a gift several years ago as a dev board and then if I decide I want to make something permanent I build custom hardware. I use other platforms too and I pooh-poohed Arduino for a long time but eventually it grew on me, the thing that sold me is the vast library of existing code and drivers for things. I could spend all day writing a half baked driver for some random Chinese display and maybe it will work, or I can grab someone else's driver, wire up the display and have a demo program running in 5 minutes. It's hard to argue with that.

author: Rick Law
author_rank: Super Contributor
timestamp: April 13, 2021, 10:20:07 pm
content: Quote from: james_s on April 13, 2021, 09:40:38 pmIt is true, not much to it. That is what made it a good beginer's project. Having done it builds confidence in understanding the system.

author: janoc
author_rank: Super Contributor
timestamp: April 13, 2021, 10:26:17 pm
content: Quote from: Refrigerator on April 13, 2021, 08:03:08 pmYes and it is a horrible, unreliable hack that will leave your 8bit micro barely able to do anything else than servicing the low speed USB bus (it can't handle anything faster). When it actually works - e.g. the V-USB stack this is based on doesn't cope well with many USB hubs and the timings are marginal in the best of cases because the poor ATTiny (or ATMega) simply doesn't have enough resources available.No, thanks.

author: james_s
author_rank: Super Contributor
timestamp: April 13, 2021, 10:29:48 pm
content: Quote from: janoc on April 13, 2021, 10:26:17 pmI already mentioned exactly that in the post he replied to, bit-banging USB, it can be done, but it isn't worth it in most applications IMO.

author: GodIsRealUnless DefinedInt
author_rank: Contributor
timestamp: April 13, 2021, 10:38:52 pm
content: Atmega32U4 does it all in one chip. That's what I use on my China special pro micros. If I recall the chip doing it for the Uno 328P is a 16U2 doing the USB comms.Edit : Arduino is open source hardware, you can and people do build their own using components on a breadboard or custom pcb and just load the bootloader onto the uC using the Arduino IDE.Most users are real beginners though and want to buy their Arduino already assembled and ready to use.