Author Topic: How to grow past arduino  (Read 13185 times)

0 Members and 1 Guest are viewing this topic.

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: How to grow past arduino
« Reply #25 on: April 10, 2017, 01:52:50 pm »
The Arduino hardware is really a pretty nice prototyping setup.  There is no need to use the Arduino libraries and you can still keep the simple download scheme.

Next up is mbed https://www.mbed.com/en/platform/

I really like this platform for speed and the fact that I can use their web based toolchain from any browser, anywhere in the world.  Their servers are very fast and downloading to a board is a simple drag and drop of the .bin file.  There is no requirement to use their toolchain, many others work just as well.

mbed is really an idea, similar to the Arduino but much more powerful, that runs on a lot of different hardware.  I use the LPC1768 version but I see that many ST Microsystem boards (and chips) are also supported, at least to some level.

The original mbed is FAST and, with the addition of a MagJack, ethernet is provided.  There's a fair amount of memory along with DMA channels and some dedicated RAM.  A pretty nice platform.
 
The following users thanked this post: bitseeker

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9507
  • Country: gb
Re: How to grow past arduino
« Reply #26 on: April 10, 2017, 06:24:35 pm »
I would like to point out that maybe I misrepresented my level of skill in my original post.
I have experience programming PICs in MPLAB, as well as building a crypto-coprocessor on a ZYNQ (modular exp. and multiplier in Verilog, other stuff in C/assembly on the ARM core).

However, all of these projects were at my university, with a) Prebuilt boards with a nice "plug the programmer we give you in here" and b) already big template projects (eg the ZYNQ project) where we just get to add files and such. In terms of physical programming it was all just "plug the cable in and press the program button"


The thing that is putting me off is the complexity of all the boards and projects we already had. I don't really know where to get started - digital hardware is an alien world to me, I've only ever done analog and RF circuit design.

Well if that's all that is worrying you, then you really don't have much to worry about.  Most of these boards are really just convenient breakout boards for the microcontrollers in question, just providing basic life support like PSU, clock and comms, either USB or serial. The usual trouble these days is that a lot of people come up  from Arduino breadboards and have no clue about analog, let alone RF. It sounds as if you have the s/w side reasonably well covered too.

I think you just need to read the i/o specs of a few ICs, 74HC series logic etc. and take the plunge. There's nothing at all difficult about digital hardware compared to what you already know. You'll be fine designing real world I/O (ie. using resistors, transistors and opamps!) and by the time you're handling digital signals fast enough to worry about then you already have the knowledge to RF techniques to cope.

It sounds as if you're suffering more of a mental block than anything - time to just take the plunge and ask specific questions if / as they arise.
Best Regards, Chris
 
The following users thanked this post: 3db

Offline firehopper

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: us
Re: How to grow past arduino
« Reply #27 on: April 10, 2017, 06:31:21 pm »
Atmel clone programmers are ridiculously cheap so go with any one of those. Only thing to watch out for is that it has some adapter for the 6 pin header.

Use that atmel studio(easy/bloated) thing or set up your own gcc enviroment(harder/customizable/diy make files). Dig around here for more info:
http://www.ladyada.net/learn/avr/programming.html

Bunch of avr tutorials
http://maxembedded.com/

Atmega mcus are simple and should be fine for a beginner. After you cover the basics switching to something more powerful won't be much of a problem.

only issue some will have is the software is windows only. and dont forget the psoc 6 that is in the works.
 

Offline exoticelectron

  • Regular Contributor
  • *
  • Posts: 68
  • Country: us
Re: How to grow past arduino
« Reply #28 on: April 10, 2017, 07:12:27 pm »
An easy way into the hobbyist embedded wold beyond the Arduino is to stick with chips available in PDIP you can stick in a solderless breadboard.  The ex-Atmel AVRs are a great migration path from AduinoLand in 'baby steps' all the way - start with a 'board' support patch for the Arduino IDE,  dump the setup() loop() paradigm (see reply #40 onwards in the topi I linked in my previous post) and start reducing your dependence on the Arduino libraries so you can get closer to pure AVR-GCC C++ and eventually migrate to either Atmel Studio or the preferred generic GCC compatible IDE of your choice with a supported Atmel in-circuit debugger. 

You mention some Microchip experience.  Their 8 and 16 bit PICs are very accessible to the hobbyist breadboarder.  At the low end of the range the core architecture is frankly vile, but it gets better as you move up to the more powerful and newer ones.  The 16 bit ones have a GCC based compiler, and the 8 bit ones have Microchip XC8, (originally HiTech C for PIC10/12/16 or for PIC18).   Try to avoid resorting to assembler - PIC assembler is very much a hair-shirt exercise - if you enjoy CARDIAC (the Bell Labs cardboard computer simulator), you'll probably love it!

So why go PIC?  Well the only reason to do so is the vast range of devices and peripheral choices they have, from the low end sot23-6 PIC10(L)F320/322 family which can do useful work ambling along at only 0.0079MIPS drawing an average of under 10uA powered by a single coin cell, boosting to 4 MIPS at about 3/4 mA when you need more 'grunt'  or sleeping till a pin change on a fraction of a uA, right up to the dsPIC33EP family capable of doing complex signal processing at 70 MIPS on a breadboard.  They are very well documented so its fairly easy to hit the bare metal and control the peripherals at the register level without using Microchip's libraries.   A PICkit 3 (or clone if you are on a *really* tight budget), a breadboard, a Sparkfun 3.3V/5V breadboard PSU or similar, a home made PICkit 3 to breadboard ICSP cable, a few PICS, preferably with on-chip debug support, and the usual assortment of resistors, LEDs, buttons, displays etc that is typically sold as an 'Arduino component kit' will get you going. You should also have a USB<=>logic level serial breakout cable (3.3V/5V) if you want to do anything with the on-chip UARTs. Initially its as well to choose a PIC that is used on one of Microchip's entry level demo boards so you can easily find example code to get started with, but once you are past the blink a led, read a pot, output a PWM stage, only your imagination is the limit.  PIC based projects are often featured in Australia's Silicon Chip magazine and republished in the UK's Everyday Practical Electronics (EPE) Magazine, and although sourcecode is often not available (or of it is its probably FUGLY assembler), such articles can be a good source of project ideas, and some help deciding how powerful a PIC you will need.  OTOH they normally don't bother reserving the programming/debugging pins so going up to a higher pin-count device for easier development is often a worthwhile tradeoff.

Then there's 8051 derivatives.  The  Intel 8051 (MCS-51) was the classic embedded processor, beloved of educators from the second half of the '80s onwards.  There are still a lot of instruction set compatible ones about in niche markets.  I'm barely touching on the 8051 other than to note that a few current manufacturers have breadboardable ones with built-in serial bootloaders as I haven't used one this millennium, so hopefully a current user will chip in here,

I would agree your block is mental. Confidence is not inspired by using hobbyist tools and a university environment. What you really need is to see how many teenage hobbyists have/were using bare microcontrollers long before Arduino's existed and without any formal training. Then I think you'd see its not a big deal. With mplab + a C compiler, and a copy of K&R 2nd ed., you are on your way.  Just do it.









 

Offline ohdsp

  • Contributor
  • Posts: 32
  • Country: gb
Re: How to grow past arduino
« Reply #29 on: April 10, 2017, 07:44:13 pm »
TheUnnamedNewbie, If you already have a lot of programming experience, and experience with analog/RF electronics, then it should be easier to work with the hardware; as you will not be trying to work out everything at once.

In terms of understand digital hardware the essence is it is still all analog electronics.  If you pick a simple micro (basic Atmel or Mircochip 8 bit part) then understanding what it needs should be covered in the datasheets and user manuals. All you should need is a power supply and a clock source (crystal) for most low end chips, and a programming interface to get them up and running.

My first attempt at embedded programming was on a PIC16F877A using a discrete RS232 programmer built on strip board, with the PIC plugged into a solderless proto-board. It was flaky to say the best but did work. These days a cheap programmer off ebay would most likely be the best option for a programmer, with the proto-board giving an easy platform to play with.

The only way to really get into it is to get your hands dirty and be prepared to spend a little money in the process; it's not wasted money if you plan on using it as part of your career. And sometimes you can score free samples of micro's; or you used to be able to from microchip.


Check out the Open Hardware DSP Platform:
http://www.ohdsp.org
http://github.com/ohdsp
 

Offline pyroesp

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Re: How to grow past arduino
« Reply #30 on: April 10, 2017, 10:11:59 pm »
You can get your arduino to program other microcontrollers too, well at least some PICs.
As others said, all a microcontroller really needs is power, a clock and a programmer.
I like PICs so here's how to connect the programmer to the PIC, spoiler there are only 5 wires :


It's that easy. Just give it a try, and if at first you don't succeed, try again. The forum is here to help in case you get stuck.

If you think you want to get started with 32 bit MCU, I do recommend the ST Discovery boards. They have an on board programmer so you just have to plug in a USB cable to flash the MCU. (Other manufacturers like TI for ex. do the same).
 

Offline exoticelectron

  • Regular Contributor
  • *
  • Posts: 68
  • Country: us
Re: How to grow past arduino
« Reply #31 on: April 10, 2017, 10:23:40 pm »
Skip MCU's that need an external crystal. There are zillions that have internal oscillators. Save the PCB space and the time dealing with it.  Also, crystals + breadboards = asking for trouble. Actually, breadboards period = asking for trouble. We've finally hit the golden days where you can capture, layout, simulate, and get PCB's made for basically nothing, in a few days, from the USA, with almost entirely free tools. Breadboards are just going to get in your way. Take your design seriously, do your homework, and commit something to fiberglass for $10. The rewards will far outweigh the learning curve, which you will need to deal with anyway at some point.

 
 
The following users thanked this post: blueskull

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3442
  • Country: us
Re: How to grow past arduino
« Reply #32 on: April 11, 2017, 05:34:20 am »
...
...

I personally think people should start with an ATTiny, especially something like the Tiny13 or 25/45/85.
(...)

The biggest problem, is thinking of a project in the first place to get started with.  A simple calculator might be a fun task to fit into a Tiny85, or maybe even Tiny13, lots of concepts there.


Yeah, finding projects is always a pain. I have a few in mind tho, all quite simple control-type applications (a way to monitor the AC/light/temperature in my lab, for example)
...
...

Sometimes, sharing experience is like sharing prescription eye glasses.  What works nicely for me may not work for you at all.  At the risk of "sharing my glasses"...

I did my "stepping away from Arduino" via the ATTINY13A and ATTINY85.

I am a relatively inexperienced hobbyist.  A while back, I did build a bare (no boot loader) ATMEGA 328p (28 pin dip) to work like an Arduino UNO.  Learning how to use an UNO as the ISP flasher was useful.  Stepping away from Ardunio means one would need some kind of an ISP burner.

I needed some flashlights.  I got a very cheap (under $5) single-18650 flashlight and decided to do some upgrade.  I found the NANJG105c (which uses the ATTINY13A) to be rather suitable along with a Cree XML-T6 led.  Well, with the ATTINY13A, the most obvious further improvements would be to upgrade the firmware.  I found tons of information out there on writing drivers for 105c.  Best of all, a bare-bone flashlight driver source code - it works and it was a good base to learn from.  Starting with something working and learn by modifying existing codes is the easiest way to learn in my view.  Getting the downloaded simple driver source code compiled and downloaded help me build and understand the tool-chain.

I ended up making a dedicated Arduino NANO as my ISP equipped with SOIC clips, and breakout of target MCU pins - and of course some blinking lights for convenience and important status info.  So, at that point, I was coding C without a single line of code from the Arduino library, and with tools that can stuff the result down to the Attiny 13A using my NANO-ISP.  The flashlight with the NANJG 105C was transformed into an "AVR application development education tool" at this stage.

Having custom flashlight with my personal brightness setting is of course good, but more fun things can be done.  Finding the Attiny 13A limiting, I moved on to the Attiny 85 with a lot more space and capabilities.  Needs a bit of pin-bending to get the Attiny 85 on to the 105c - again with lots of info out there about how.  With the added capability, I can temperature-sense  using Attiny 85 built in temperature-tied ADC to throttle down to keep the LED from over-heating.  By then, I feel very comfortable working with the MCU outside Arduino environment.  I even learned to "wear balance" the EEPROM so I can switch brightness on the LCD tens of millions of times on the Attiny 85 -again, learned that from flashlight firmware information out there.

Attiny 85 is big enough to actually run some of the Ardunio library.  So of course I have to try it.  I got that to run my 20x04 LCD with I2C showing the time from an I2C clock.    So, I crossed the Rubicon and came back.  Now I feel comfortable working the the MCU with/without Arduno boot-loader or library.

In the end, I have a handful of 18650 flashlights with the NANJG 105c driver using my own custom code (no Arduino library).  And back on the Arduino side, I have a keyboard handler running ATTINY85 doing input handling and communicating back to a "master MCU" via I2C.

I am still tied to the AVR at this stage, but I am freed from Arduino, and I feel should I want to switch to something else, I know what additional hardware and knowledge I may likely need.

Again, this is like sharing my prescription eye-glasses.  What works for me and what counts as great results for me may not be what works for you.  But, I hope this input helps with your quest.
« Last Edit: April 11, 2017, 05:40:06 am by Rick Law »
 

Online TheUnnamedNewbieTopic starter

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: 00
  • mmwave RFIC/antenna designer
Re: How to grow past arduino
« Reply #33 on: April 11, 2017, 05:58:04 am »
I want to thank you all for your replies. They made me realize that I perhaps overestimated the complexity getting my own microcontroller to work, and through doing so have stopped myself from trying. Once I'm finished with my current project, in which I will use an arduino still - It's a project for someone else and I want them to be able to easily replace/update the hardware - I'm going to try and use a separate micro controller for a small project. I'll have to see with what I start, I have one or two ATTINY laying around, but I'll have to look at what is easiest.

If I get to it, I might put my experience into a blog, who knows.

Thanks again for the help guys! I have a lot of things to look at now, and some nice places to look at for help.

The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline dimkasta

  • Regular Contributor
  • *
  • Posts: 185
  • Country: gr
Re: How to grow past arduino
« Reply #34 on: April 11, 2017, 07:03:38 am »
Another way to get some more insight about the mcus and check out what arduino hides, is an assembler tutorial.
You don't have to follow the code, just see the concepts that they have to tackle with.
Very eye-opening

Sent from my HUAWEI NXT-L29 using Tapatalk

 

Offline jamie297

  • Contributor
  • Posts: 10
  • Country: gb
  • 'Mature' grad engineer
Re: How to grow past arduino
« Reply #35 on: April 12, 2017, 05:57:07 am »
Huge thanks to all the replies on this thread for encouraging me to stop messing about and just order a PIC.

Sometimes need a kick to stop thinking about projects and just start them.
Noob forum questions on the way no doubt!  :-/O
 

Offline Luminax

  • Regular Contributor
  • *
  • Posts: 159
  • Country: my
    • Electronesk
Re: How to grow past arduino
« Reply #36 on: April 12, 2017, 07:32:21 am »
You can get your arduino to program other microcontrollers too, well at least some PICs.
As others said, all a microcontroller really needs is power, a clock and a programmer.
I like PICs so here's how to connect the programmer to the PIC, spoiler there are only 5 wires :


It's that easy. Just give it a try, and if at first you don't succeed, try again. The forum is here to help in case you get stuck.

If you think you want to get started with 32 bit MCU, I do recommend the ST Discovery boards. They have an on board programmer so you just have to plug in a USB cable to flash the MCU. (Other manufacturers like TI for ex. do the same).

+1
I'm mainly using PIC18F nowadays for its various embedded peripheral. Capture Compare PWM, ADC/DAC, Gate-able 16-bit timers, and some even have direct LCD drivers, the lots!.
With the latest version of MPLAB X IDE is the capability to "Generate Code" using the MCC (MPLAB Code Configurator) so most of the "early setups and configuration" are done through an easy to use interface code generator. Additionally, the codes are formatted for a "State Machine" base configurations which is one of the useful programming method for small-memory sized MCU.
16-bit PIC24 and 32-bit PIC32 looks interesting, too, with the abundance of low-cost development boards.
Jack of all trade - Master of some... I hope...
 

Offline pyroesp

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Re: How to grow past arduino
« Reply #37 on: April 12, 2017, 07:26:52 pm »
+1
I'm mainly using PIC18F nowadays for its various embedded peripheral. Capture Compare PWM, ADC/DAC, Gate-able 16-bit timers, and some even have direct LCD drivers, the lots!.
With the latest version of MPLAB X IDE is the capability to "Generate Code" using the MCC (MPLAB Code Configurator) so most of the "early setups and configuration" are done through an easy to use interface code generator. Additionally, the codes are formatted for a "State Machine" base configurations which is one of the useful programming method for small-memory sized MCU.
16-bit PIC24 and 32-bit PIC32 looks interesting, too, with the abundance of low-cost development boards.

And I'd like to add that you can get a few PICs for free from Microchip.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12862
Re: How to grow past arduino
« Reply #38 on: April 12, 2017, 07:45:00 pm »
Yes, in many countries, but you cant use a free email address to register.  Apparently some dishonest idiots were making multiple registrations, ordering sample PICs and EBAYing them still in their Microchip antistatic bags with the samples label on.  This caused Microchip to clamp down a long while back.   
 

Offline Luminax

  • Regular Contributor
  • *
  • Posts: 159
  • Country: my
    • Electronesk
Re: How to grow past arduino
« Reply #39 on: April 13, 2017, 07:40:42 am »
I did get some free sample from Atmel when they were still "Atmel", and some from Microchip, I think it was 16F, the smaller ones without any big-bang peripherals.
I remembered Dave's video about PICKIT2 comparison against PICKIT3 and I wish I have had experienced the PICKIT2 but eh, PICKIT3 works for me.
Now... to figure out how to properly get this damn ICD 3 working...
Jack of all trade - Master of some... I hope...
 

Offline Docholiday

  • Regular Contributor
  • *
  • Posts: 217
  • Country: us
Re: How to grow past arduino
« Reply #40 on: April 13, 2017, 10:36:21 am »
I have learned so much on this thread.

Thank you to every single one of you that replied. I truly appreciate your time and effort taken in your responses.

Sincerely,

Nicholas
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf