Arduino to stand-alone uP solution

Thread Starter

djsfantasi

Joined Apr 11, 2010
6,167
So, I don’t have a problem (yet), but I’m looking for some advice.

How do I move from Arduinos to a custom micro controller project. I’m comfortable with the Arduino for one-off projects or for development. But, it contains more features than I often need. And comparatively, it has a large footprint that constrains where I can place the hardware. This line of thought began when I designed a project, and the Arduino Nano was a scootch too large. I need something like (estimated) 12mm x 25mmin size.

So of course, there is reticence on my part, preventing me from going forward.

So far, I figure that I need a way to program the device. This includes an IDE, comm interface, programming harness or board and a programmer at a minimum. The programming environment would have a socket, perhaps on an adapter, so the chip can be programmed and subsequently installed on the production PCB board(s).

Note that once I’m in production and the device has been programmed, I don’t expect any requirement to change the programming.

This hopefully will become a consumer product.

Other than comm, I currently believe that the chip datasheet will give me the electrical characteristics of the chip and its IO pins. I thus believe that won’t be an impediment to the implementation.

Or, I asked myself if there was another platform (non-Arduino) that would give me a programmable microprocessor, power control (I.e. sleep) and 3-4 IO ports? I didn’t have an answer.

So my learned and experienced AAC fellows... Can you briefly respond to my reticence? Are you aware of any resources that will assist my studies?

Update: corrected measurement estimates
 
Last edited:

spinnaker

Joined Oct 29, 2009
7,837
For starters I would choose the same mcu as on your Arduino. That might make things easier. You might even be bale to use the same code.

Your problem would be (I think) the Arduino has a boot loader, You would likely not get that with a naked chip so you might need to use a programmer.

But moving to something like the Pic would not be much of an issue either. You have the concepts down and that is the main thing. The advantage is that I think most people here use the Pic so you would likely get better support. I started right off with the Pic and knew nothing at all about MCUs at the time.
 

spinnaker

Joined Oct 29, 2009
7,837
I started with the 18F series and have stuck with it. It is not like I am turning out thousands of boards so if I pay a little more for more than I need then I don't care. I would much rather have more chip capabilities than less.
 

cmartinez

Joined Jan 17, 2007
6,785
So, I don’t have a problem (yet), but I’m looking for some advice.

How do I move from Arduinos to a custom micro controller project. I’m comfortable with the Arduino for one-off projects or for development. But, it contains more features than I often need. And comparatively, it has a large footprint that constrains where I can place the hardware. This line of thought began when I designed a project, and the Arduino Nano was a scootch too large. I need something like (estimated)117mm x 250mm in size.

So of course, there is reticence on my part, preventing me from going forward.

So far, I figure that I need a way to program the device. This includes an IDE, comm interface, programming harness or board and a programmer at a minimum. The programming environment would have a socket, perhaps on an adapter, so the chip can be programmed and subsequently installed on the production PCB board(s).

Note that once I’m in production and the device has been programmed, I don’t expect any requirement to change the programming.

This hopefully will become a consumer product.

Other than comm, I currently believe that the chip datasheet will give me the electrical characteristics of the chip and its IO pins. I thus believe that won’t be an impediment to the implementation.

Or, I asked myself if there was another platform (non-Arduino) that would give me a programmable microprocessor, power control (I.e. sleep) and 3-4 IO ports? I didn’t have an answer.

So my learned and experienced AAC fellows... Can you briefly respond to my reticence? Are you aware of any resources that will assist my studies?
I've been working on the 8051 architecture for many years now, and even though there are other more modern alternatives in the market, it still is an extremely powerful device. But to be fair, I did some work on a PIC10LF322 a few months ago and was quite pleased with what it had to offer. Both systems have small footprints, configurable I/Os and have ISP available.

If you're getting started on MCU's, I'd lean on learning the PIC architecture, since Microchip bought Atmel (along with its 8051 tech) a few years ago anyway.

A few more details on what you wish to accomplish could come in handy to help you make a more informed decision.
 

Norfindel

Joined Mar 6, 2008
326
Well, if you use the same microcontroller from the Arduino in your project, you can flash it with the same code, and the microcontroller's size is a lot smaller than any Arduino board.
 

cmartinez

Joined Jan 17, 2007
6,785
I've been working on the 8051 architecture for many years now, and even though there are other more modern alternatives in the market, it still is an extremely powerful device. But to be fair, I did some work on a PIC10LF322 a few months ago and was quite pleased with what it had to offer. Both systems have small footprints, configurable I/Os and have ISP available.

If you're getting started on MCU's, I'd lean on learning the PIC architecture, since Microchip bought Atmel (along with its 8051 tech) a few years ago anyway.

A few more details on what you wish to accomplish could come in handy to help you make a more informed decision.
I forgot to add that the PIC10 is also a micropower device, in the order of 75 µA working at 3.3V, and has its own internal oscillator. So unlike the 8051, it's an excellent alternative for battery-powered devices.
 

JohnInTX

Joined Jun 26, 2012
3,982
For PIC, avoid the midrange architectures that don't have LATx IO and the small banked memory layouts among the many drawbacks. The later the PIC family, the better the cheap debugging capability. That leaves out baseline and midrange, for me at least.

Try Enhanced Midrange. In the 8 pin parts look at something like a 12F1xxx. For bigger chips look at 16F1xxx. These are Enhanced Midrange parts and are better in every way than the old basic midrange stuff. Microchip is putting lots of cool analog on these as well as lots of other useful stuff. For debugging with a PICKit. You can get an additional header debug board (-ME2 headers) that add some serious debugging capability for a few $$. If you just want to get your feet wet, try a Curiosity board. For US $20, you get a board with a 16F1619 on it, a resident debugger/programmer (no PICKit needed) and headers for connecting to the IO. Add the free MPLABX/XC8 and off you go.

A new low cost tool is the Snap-In debugger. Haven't use one yet but it looks like a PICkit sans case. US $14.95. Works with AVR, too. This would be used to debug/program a circuit of your own.

PICKit4 is the latest in that series. Does AVR, too.

Just my .02
Have fun!
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
6,167
Thanks for all of the replies. My memory was jogged as I had looked at PICs before I decided on the Arduino family for a project almost ten years ago. Being very skilled at coding, and not so much hardware, the boot loader and supporting structure of the Arduino was attractive.

But I have a very simple project which I felt I could use as a first project with PICs or another processor.

@cmartinez asked for more details. It will flash one of several strings of lights (three or more strings in total), in a very specific pattern. This pattern will be a seemingly random sequences of flashes and pauses, varying in duration. Each flash in the pattern will start string and then fade out. The LEDs in the string will be dimly illuminated. I.e. not full strength. Then after a short delay (3-10 seconds), it will repeat the pattern on one of the other strings. Which string is next is randomly selected. Note that the pattern is fixed and repeats.

So the code in the microprocessor does the hard work of creating the pattern and controlling the strings brightness. That’s it!

As many of my projects, this will be used in a theatrical production.

You all have given me a lot to think about. So, it’ll be a while to digest. But I’m sure a bunch more questions will arise.
 

cmartinez

Joined Jan 17, 2007
6,785
Thanks for all of the replies. My memory was jogged as I had looked at PICs before I decided on the Arduino family for a project almost ten years ago. Being very skilled at coding, and not so much hardware, the boot loader and supporting structure of the Arduino was attractive.

But I have a very simple project which I felt I could use as a first project with PICs or another processor.

@cmartinez asked for more details. It will flash one of several strings of lights (three or more strings in total), in a very specific pattern. This pattern will be a seemingly random sequences of flashes and pauses, varying in duration. Each flash in the pattern will start string and then fade out. The LEDs in the string will be dimly illuminated. I.e. not full strength. Then after a short delay (3-10 seconds), it will repeat the pattern on one of the other strings. Which string is next is randomly selected. Note that the pattern is fixed and repeats.

So the code in the microprocessor does the hard work of creating the pattern and controlling the strings brightness. That’s it!

As many of my projects, this will be used in a theatrical production.

You all have given me a lot to think about. So, it’ll be a while to digest. But I’m sure a bunch more questions will arise.
What sort of lights are we talking about? LEDs? incandescent? High-powered spot lights?
 

MrChips

Joined Oct 2, 2009
20,245
I personally don't get tied down to any one chip. I look at the application and then choose the chip to match the application.
Here are my thoughts:

1) Most programming projects can be written in C which can be ported to any MCU. You can code the low-level functions for the specific MCU.

2) Arduino is a programming platform which has available extensive third party libraries. I like to have total control where possible. I would not want to have a system crash because of someone else's code.

3) Many MCUs today are flashed with a simple one or two-wire interface via a USB interface on the PC side. Any programming hardware required is usually minimal. Atmel AVR (e.g. Arduino ATmega328) is one exception. That is one of the reasons the Arduino platform was created in order to implement a bootloader.

4) For production purposes, I would choose a non-Arduino solution. However, this does not eliminate Atmel chips. You can still program Atmel AVR with Atmel Studio.

5) The more manufacturers and their chip you work with, the better you become at being able to find the right MCU for any application. I can choose from any of the following:

Analog Devices
Atmel (Microchip)
Freescale (NXP)
Microchip PIC
TI
Silicon Labs
ST
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
6,167
What sort of lights are we talking about? LEDs? incandescent? High-powered spot lights?
I did mention that the lights were a string of LEDs. Typically powered by two CR2032 batteries I will add. If the processor cannot directly drive the lights, I’ll add a few SMT Logic Level MOSFETs. The load is not an issue for me. It’s learning how to select, power and program a different platform.

And I expect to get into SMT for the first time. I hope I can, because I often have a tremor in my hands.

The posts which mentioned a PIC platform with a link to an IDE and programmer / debugger have been most helpful thus far. I’m also considering an ATTiny85.
 

danadak

Joined Mar 10, 2018
3,900
If you anticipate needing analog capability, and stuff like filtering, LCD, USB, BLE
take a look at PSOC 4, 5LP, and 6.

You can do design with no programming, ignore the CPU onboard, and just use
the logic facilities, all done with a GUI drag and drop of gates, flops, LUTs, and MSI
like stuff, counters, PWM, Quaddec, shift register......You just drop the logic onto
a schematic, wire it up internally and to pins, hit the build button, and it will create
and program. There is even a state machine wizard thjat makes life easy as
its a graphical tool.

On extreme end do DSP (with wizard), USB, BLE, dual core. Very versatile.
Simple boards with USB program and debug, even Arduino footprint.

The analog is OpAmps, DAC., A/D to 20 bits, SAR to 12 bits, mixer, analog mux,
PGA, TIA, Vref.....

Attached is a catalog of components. A component is an onchip resource.

Regards, Dana.
 

Attachments

Thread Starter

djsfantasi

Joined Apr 11, 2010
6,167
Interesting alternative! I would need 3-4 analog outputs, with PWM that can be adjusted, multiple timing functions (for different sequences) and... a way to randomly select each of the outputs without repetition.

I might consider this option, but it would be a stretch. I’m a programmer by heart. I have created new languages for unique applications and think in C!
 

mckenney

Joined Nov 10, 2018
70
the Arduino Nano was a scootch too large. I need something like (estimated)117mm x 250mm in size.
I'm not sure I understand this statement. I'm pretty sure a Nano is more like 40x20mm. And Adafruit (e.g.) has a collection of Arduino-ish devices which are even smaller.

The value in the Arduino is (a) the board's already built, including power supply and USB (b) a wealth of contributed software. The newer boards have (a) with more efficient components, and many use other MCUs (mostly ARM Cortex) with substitute software for (b) that's mostly the same at the Arduino abstraction.

And when you decide you want to toss out (b), the Adafruit ARM boards (at least) provide the SWD programming pins right there, so you can wipe out the boot loader and run your own stuff.

If your goal is to build your own board, I won't say you shouldn't. But if what you want is small size and an evolutionary path to native programming, just look towards the edges of the Arduino world.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
6,167
If your goal is to build your own board, I won't say you shouldn't. But if what you want is small size and an evolutionary path to native programming, just look towards the edges of the Arduino world.
What are this “edges of the Arduino world” to which you refer? The Nano is the smallest Arduino board available. The micro is a tad larger.

My goals are to build a customized system on my own board, to learn how to program a microprocessor other than an Arduino system, to meet my design requirements - all on a board approximately 120mm x 250mm.

I don’t need the digital IO, I don’t need any analog IO. I don’t need three alternative power sources, I don’t need serial communications (except for programming perhaps) I don’t need I2C. I don’t need USB. Etc...
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
6,167
Oops! I shouldn’t have attempted converting from Imperial. I’m thinking more along the lines of 12mm x 25mm

Thanks for pointing out my mistake!
 

nsaspook

Joined Aug 27, 2009
6,935
Interesting alternative! I would need 3-4 analog outputs, with PWM that can be adjusted, multiple timing functions (for different sequences) and... a way to randomly select each of the outputs without repetition.

I might consider this option, but it would be a stretch. I’m a programmer by heart. I have created new languages for unique applications and think in C!
To use C efficiently, in a structured manner on a 8-bit PIC controller I would recommend you play with a PIC18 K series chip too. Not as tiny as some others but they offer lots of programming space and high performance in a small package while you hone your embedded controller C skills.
https://www.digikey.com/products/en/integrated-circuits-ics/embedded-microcontrollers/685/page/2?fid=252467

XC8 also supports C99 now so most of the modern C constructs can be used to create better source code.
 

danadak

Joined Mar 10, 2018
3,900
I might consider this option, but it would be a stretch. I’m a programmer by heart. I have created new languages for unique applications and think in C!
PSOC programs in C and/or ASM. All significant peripherals, like counters, PWM, A/D,
COM, DAC, DSP......have extensive C APIs you call and pass to/from parameters. to setup
and control them. At the basic level a wizard is used on each one that sets it up with basic
parameters, like period, duty cycle, triggers, etc. for PWM. You do that in a minute or two,
then in program use the APIs to read status or start/stop or service interrupts.....

The PSOC 101 series, short videos, will give you basic idea. Tool and compiler free.
Tons of example projects you can cut and paste code from.

PSOC 4 has a subset of the component catalog, 5LP most of the catalog. $4 boards
with bootloader for low end, and $ 10 - 15 for USB debug/program, no bootloader needed.

https://www.mouser.com/Semiconductors/Engineering-Development-Tools/Embedded-Development-Tools/Embedded-Processor-Development-Kits/Development-Boards-Kits-ARM/Newest-Products/_/N-cxwm3?P=1yykuau&gclid=EAIaIQobChMI_Ya2s-_D3wIVjYTICh2oogCoEAAYASAAEgIcn_D_BwE

From low to mid range these two boards most popular -

http://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit

http://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-and


Watch the first 5 videos -

http://www.cypress.com/training/psoc-101-video-tutorial-series-how-use-arm-cortex-m0-based-psoc-4


Tool - http://www.cypress.com/products/psoc-creator-integrated-design-environment-ide


Regards, Dana.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
6,167
I don’t want to offend anyone. You all have provided important data.

I’m seriously looking at the ATTINY85. I’ve ordered a few. I’ve also ordered the tinyAVR Prigrammer

The ATTINY85 is programmed with the Arduino IDE, of which I am already familiar. Which is good, because I’ve slowed down measurably since hitting my mid-60s.

Each pin can sink 40mA. That plus that is the most requested by the led strings. ATTINY85 program will only simultaneously drive one set of LEDs at a time
 
Top