EMRFD Message Archive 14610
Message Date From Subject 14610 2018-04-13 13:40:26 richj_focus microcontroller for diy radio For a long time the PIC was king for diy radio projects with a microcontroler was needed.
However is seams to me the Arduino is coming on strong.
Today if you need a micro for a project, which one would you use?
I get confused on which i would choose if radio projects.
I do not care which people think are the best micro-controller i just
wonder what people are using the most.
If i knew that maybe i would know which is supported the best.
Thank for any help.
p.s. No project in the works i just want to know what is being used today.
14611 2018-04-13 14:09:06 Dana Myers Re: microcontroller for diy radio 14612 2018-04-13 15:03:41 ad7jt Re: microcontroller for diy radio Note that Microchip (of PIC fame) now owns Atmel who makes the micros Arduino is built around. Microchip is also working on conversion tools to allow Arduino users to port their sketches to Atmel's full powered IDE.73,Dave Collins - AD7JT 14613 2018-04-13 15:13:34 Dana Myers Re: microcontroller for diy radio 14616 2018-04-13 16:07:27 Eric J Re: microcontroller for diy radio If you're primarily a ham and not an advanced computer hobbyist or professional, it's hard to beat an Arduino. You can do just about everything you need to do with a $4 Arduino Nano.
Hans Summers sells an Arduino shield which you could use with an Arduino to homebrew his Ultimate3S WSPR transceiver.
BITX is Arduino based. They use a Raduino specifically for the BITX and other radio-based projects. It's based on the Arduino Nano, packaged with an LCD, Si5351 and I don't know what else.
It does what you need to do, it's relatively easy to program (easier than PICs which I did several years ago), and meets your requirement of support. Lots of hams are involved with Arduinos and they know what your facing. More advanced microcomputers are generally used by computer hobbyists who have no idea what you're talking about half the time.
I'm working on a single band WSJT transceiver for 30m using an Si5351 and an Arduino clone from Adafruit called the Metro Mini. I think it was $12 with built in USB. Makes modifications easy and convenient. But a $4 Nano would do just as well.
14617 2018-04-13 16:12:17 Gary Tennyson Re: microcontroller for diy radio I agree. ARM Cortex-M is the way to go. I’ve programmed a lot of AVR’s, but ARM is the future. There’s just so much more capability.Gary 14618 2018-04-13 16:16:31 Rob Re: microcontroller for diy radio It depends on what you want to do It really depends on WHAT you want to do with mixing your radios with microcontrollers.
It really depends on your computer skills....
and your tolerance for being forced into a box to do something you know little about.
it depends on your tolerance for DIY (forums) support verses purchased support.
MY first microcontroller project was to build a
CLONE of the PICCON beacon for foxhunting.
We did local monthly fox hunting using 2 PICCONs and we needed more so
when I saw the ingredients of this beacon was a PIC16F84 I figured that for
the $99 price of the MELABS.com PicBASIC I could buy a BASIC compiler and then anytime I wanted to play with microcontrollers I could buy a $2 PIC16F84 and make my own toys instead of forking over $66
for ONE piccon at byonics.com
This truly set me down the path of PIC BASIC and robotics.
When the $350 controller board failed in my pellet stove I replaced it with a PIC12C509 chip.. a transistor.. a diode.. and a relay.
When I wanted a simple keyer... no memory... no bells and whistles....
I built this toy:
Now then ...there really is nothing advanced or "internet of things" involved here.....
stepping up to ARDUINO... you still are using a MICROcontroller.... and then... the Raspberry PI is a super computer compared to a PIC microcontroller.......
but they all have their place for what they are good at....
so you figure out WHAT you want to do with microcontrollers ....then ask yourself if you really
want to spend the time going down that path.
Noting that I chose BASIC because I already knew BASIC... and
I already was a professional computer programmer.....
so from the day my PicBasic compiler arrived to the time I had a working PICCON CLONE was about 20 minutes later.
Good luck with your endeavor.
73 Rob KB3BYT
14619 2018-04-13 16:22:15 Dana Myers Re: microcontroller for diy radio 14620 2018-04-13 16:29:57 Dana Myers Re: microcontroller for diy radio It depends on what you want to do 14621 2018-04-13 17:19:09 Rod Re: microcontroller for diy radio Dana,
The Arduino development environment is set up to minimize the startup
overhead pain for one who wants to start writing software for an Arduino
Many of the 'simplifications' came at a cost of performance,
flexibility, and memory usage.
It is possible to use your favorite Integrated Development Environment and
the open-source GCC compiler/linker. The GCC compiler provides code
and run-time libraries that are not encumbered by the Arduino philosophy.
However, that comes at the cost of some added complexity: one needs to
binary and hexadecimal, and I/O ports, interrupts, etc.
The GCC package follows the nomenclature shown in the Atmel ATmega328
so it is pretty easy to figure out what to do.
I run Linux, and my favorite IDE is Geany. Its editor is C and C++
syntax aware, and it
uses Make files for compiling and linking. It uses avrdude for uploading
into the Arduino
processor. I personally abhor make files, but it is pretty easy to
modify a working one
to suit your needs, so I don't complain (much).
One feature I like a lot about Geany: you can search all files in a
project for a symbol. That is
to say, searches are not limited to the file you are currently editing.
I have done over 20 projects using Geany/GCC, with both background code
and interrupt code,
and I have never regretted my choice of tools.
I believe Geany and GCC are available for Windows, as well.
The attached files are the famous blink program, and a makefile, and a
Geany config file
for your review.
Be aware, the makefile and the Geany config file contain hard-coded
Let me know what you think, and I can answer questions for you.
14622 2018-04-13 17:40:31 Dana Myers Re: microcontroller for diy radio 14623 2018-04-13 19:34:19 ad7jt Re: microcontroller for diy radio I agree. I suspect Microchip regrets their initial decision to use the MIPS architecture for their entry into the 32-bit world and is using the Atmel acquisition to rectify it.73,Dave Collins - AD7JT 14626 2018-04-15 10:04:36 AD7ZU Re: microcontroller for diy radio I second Dana's commentsPJRC has a selection of assembled, tested boards, Teensy series, with various ARM processors from M0 to M4F (floating point). All have USB load/debug connections. Cost is $12 (Teensy LC 48Mhz ARM M0) to $30 for a180mhz ARM M4F (floating point). The I/O varies with each but is more than ample for radio projects.RandyAD7ZU 14627 2018-04-15 20:56:46 Ashhar Farhan Re: microcontroller for diy radio Why not go straight to raspberry pi? The rpi W is just 5 dollars.-f 14628 2018-04-15 21:44:02 Dana Myers Re: microcontroller for diy radio 14629 2018-04-16 08:50:47 Ravi Miranda Re: microcontroller for diy radio Hi,Just a question here; for the ease of programming, would the Cortex-M0 have a library for say the myriad displays that exist? It is not feasible to write a library from scratch for the TFT displays.The Arduino side have a rich set of libraries that can be combined to develop a project.Thoughts?On the RPi0 too there are several libraries that exist, not sure how deterministic realtime processing is required, but if if does run in a loop an encoder, a display, ADC and a port expander can be added in, all running off an I2C bus?Thinking, as I have just about embarked on front-end that would work with a uBitx, but if an RPi0 won't work for the reasons mentioned in an earlier post, I would rather try something where there was help available?Best 73Ravi/M0RVI 14630 2018-04-16 09:23:02 MOB Re: microcontroller for diy radio Ashhar,
Some of the reasons are: integrated ADC's and DAC's, integrated real
time clock, lower power requirements, processing without OS delays.
14631 2018-04-16 09:53:49 Dana Myers Re: microcontroller for diy radio 14658 2018-04-28 10:57:49 hasmanean Re: microcontroller for diy radio The arduino is a good place to start. You can get an arduino up and running in a few minutes...the compiler and ide (integrated development environment) are simple to use and generally well supported...and they work. There are also lots of people and many websites that can help you if you’re stuck (which is guaranteed to happen).
However the arduino is not very powerful and not that cheap. Arm processors have a lot more memory and run a lot faster. The red pill and blue pill boards cost only a few bucks compared to tens of dollars for arduino boards . Their Analog to digital converter specs are also lacking (a few kilohertz).
I’m starting to switch to st micro Arm processors. Their nucleo boards have arm processors, arduino compatible pins, and 1Mega sample per second. That’s enough to sample an entire band of 500kHz.
Check out the mbed.org development environment. You can write code online on a website, download it for any supported micro controller and just flash it by dragging and dropping it onto the file system icon that pops up when you connect the board via USB cable. Makes it easy to share designs online and keep it cross platform compatible.
14664 2018-04-28 17:16:28 wb6ogd Re: microcontroller for diy radio >However the arduino is not very powerful and not that cheap.Obviously you haven't used them lately...
Go to ebay, they are less than $3 (USD) shipped to your door.
In the total relm, maybe they are "not very powerful" but I have NEVER neeed more for
common ham radio type projects.
They are so cheap and easy that I just use them like I would use transistors...
14666 2018-04-28 20:20:08 kb1gmx Re: microcontroller for diy radio Generally the Arduino has far more power than given credit for. The Atmega328 has two bigger brothers andthey are cheap and available. The 2650 is a winner and if 256K is not enough your just doing it wrong.However my usual complaint is not enough IO.However there are times when more speed is needed and the Arm cpus are good at that. That and there are a lot of choices and available cheap like the ST32F4 series and friends.For system level where and OS is need Rpi3 is a good start. If I need faster the TinkerBoard at 1800mhz and 2gb ram can really do the DSP work under linux.Bur as someone that has suffed aps into 8048 and many other over the years I find the Arduino underutilizedand often filled with overly fat code. If speed is an issue there are 20mhz parts but that is not usual.Its just me, but I wrote code for PDP8 and many others that made the Arduino look like a rocket.you learn efficiency and to use the tools well.Allison 14667 2018-04-28 21:52:55 Ashhar Farhan Re: microcontroller for diy radio I remember my elmer, VU2OZ, Arun wrote a tracker for Oscar 6 on the 128 byte 6809.he had to hand enter the code each time he powered up the heathkit trainer!The Arduino is an interesting challenge, but people have written complete cw and psk31 decoders. You have to get creative and vkeep staring at your fish'.- f 14668 2018-04-29 07:08:23 kb1gmx Re: microcontroller for diy radio Farhan, Exactly.I've been designing with micros from 8008 on and the rule it either fits or it gets costly.Creativity and attention makes it fit.The big thing that makes Arduinos useful and easy to develop for is the libraries.For people that do not wish to be programmers its easy as legos.The thing that is negative about Arduino is the libraries. They make life easier butthey are often larger than needed as they do a lot and one might only need a smallersubsection. That means if your not careful with the compiler you run out of programspace unexpectedly for what may seem trivial tasks.An example I needed a lot of storage (megabytes). The microSD chips easilyinterface to Arduino but the software libraries to use that device usiverally usedSDfat file system which is huge. The SDFAT file system was not needed as I coulduse a simpler tag and bag. The problem is no one did bare uSD. I had to dig throughthe libraries and then clean up what I found and add the tag and bag cost under4.5k program storage for the whole ap, the SDfat library would have used at least8-10K and much too much of the limited ram I'd need more code to live with it.One of the things that was interesting is the almost religious you can't write toa uSD without using fat file system. FYI you can but you have to do yourown accounting as in where did you put it.Allison 14669 2018-04-29 07:38:41 Nick Kennedy Re: microcontroller for diy radio Yep. When I saw the original question, I wondered what kind of programs the person wanted to develop.I've found the Arduinos and bare AT-Megas and Tiny AVRs and PICs to be entirely adequate for the kinds of things I wanted to do, which generally involved reading or setting digital I/O lines and sometimes ADC and even PWM to interface with some sensors, display, I/O device or whatever.Examples of what can be done with the simple MCUs and Arduinos include -Morse Keyers. Also encode / decode Morse & RTTYDDS controllers for AD98xx series chipsControllers for Si570 and Si5351Output to displays, Hitachi standard and otherwiseRead / decode rotary encoders as well as common switches and potsRead data stream and 1PPS pulses from a GPS for time and frequency standardTransceiver T/R control and timingFrequency counter with Morse annunciationAll of that could have been done with a 6502, for that matter.Of course if you can do that kind of stuff, things can get a lot more exotic with some imagination.As far as things you probably can't do with a simple MCU - these are generally things you'd run on your full featured Windows or Linux PC. When I got into using the Raspberry Pi a few years and got into ham discussion groups to learn about it, I found that most folks weren't so much interested in programming the thing but were wanting to know if certain sophisticated and powerful applications would run on it. Like "FL-digi" if I have that name right. Apps that FFT a whole swath of audio spectrum and display it graphically, and also decode the various signal types, for example.There's not always a clear demarcation between DIY programmers of simpler apps like I listed on one side and powerful desktop apps on the other side though. For example, in the current QEX W7PUA did need something with more horsepower than a stock Arduino with AVR chip to do his DSP based VNA.73-Nick, WA5BDU 14671 2018-04-29 09:25:00 kb1gmx Re: microcontroller for diy radio Nick,That is the key. Rare is it a problem of enough program memory its usually less an issue of speedas the Atmega parts exist to past 20mhzand 256K of program space. Its also DC power neededcan be a factor.The sharp demarcation is when an application needs to do fast processing with data thatis 16 bits or longer at say 20K samples a second. At 20mhz and 8bits is enough for verysimple DSP but if you need to process a 16 or 22bit data word the speed cost for multipleprecision arithmetic is very high. That is when a larger part with longer word length typicallya 32bit ARM is required. Like ST32Fx series.The next demarcation iis handling large amounts of data and storing it for that at least a minimaloperating system is needed and that is the bigger 32bit or even 64 bit parts are easier to use theyhave the resources Gigabytes or Ram and additional sophisticated IO for larger displays,Wifi and Ethernet, Bluetooth, and USB. Then we are using canned OS and the applicationitself or it's development is the subject. At this scale we can easily develop on the very samemachine as the resources are on it. After this its only a matter if is it fast enough to makepeople happy and that due to new parts 1800mhz is there at a cost for DC power.The cost of cpu power is always a horizon, faster more IO stuff all cost power.the question then is that fast needed or just convenient and how big is your battery!Allison 14678 2018-04-30 18:17:29 Bill Carver Re: microcontroller for diy radio It's only a hop-skip-jump from talking about a "DIY radio" with DSP processing to just making it a DDC/DUC SDR. Although I'm a hardcore high performance receiver guy, I was seduced by DDC/DUC and a year later only look over my shoulder at my analog radios (anyone interested in a loaded K3? with latest LO mods, dual RX, six xtal filters, tuner?) I'm using an Orion-II PCB connected to an old "duo-core" PC: a little over the top from a homebrew standpoint, and a love-hate situation: the SDR is a dream, the Windows OS is a slow-booting nightmare.
Is there a real-time OS with just basic "hooks" matching Windows so it could run OpenHPSDR, or some similarly capable SDR software. It wouldn't need any "cute" hooks, just a high speed Ethernet port, and video output. OpenHPSDR is open source, and perhaps the core modules could be interfaced to a real-time OS. Signal processing could be done by an ARM, a second ARM could run the display. The more the merrier......and without periodic updates clobbering the OS, and without multiple fans, it would be Nirvana. Relatively. I know, thousands of unspoken difficulties and pitfalls....but is there a real-time OS/ARM capable of coping with lots of samples from a dedicated Ethernet port?
Our backgrounds touch in a few respects, Allison: I toggled in boot loaders with PDP8/Interdata panel switches, but avoided OS software so I've ended up way out of my comfort zone. Be interested in your opinion.
14681 2018-04-30 21:33:34 Bernard Debbasch Re: microcontroller for diy radio
>>> Is there a real-time OS with just basic "hooks" matching Windows
I suggest that you look at FreeRTOS. It is very reliable RTOS running on many ARM-based processors. These days I am generally using the STM32 processors and the RTOS works very well
14682 2018-04-30 22:21:11 Dana Myers Re: microcontroller for diy radio 14686 2018-05-01 04:06:56 Lee Hiers Re: microcontroller for diy radio
14689 2018-05-01 07:14:34 Dana Myers Re: microcontroller for diy radio 14690 2018-05-01 07:21:40 Dana Myers Re: microcontroller for diy radio 14691 2018-05-01 07:52:33 Cecil Bayona Re: microcontroller for diy radio 14692 2018-05-01 08:57:19 Dana Myers Re: microcontroller for diy radio 14694 2018-05-01 09:25:39 rcbuckiii Re: microcontroller for diy radio Dana and Cecil,
Out of curiosity, what programming environment are you using for the STM parts?
I have used PICs since 1995. My go to parts for most projects are the enhanced PIC16F series. I have used PIC32s for a couple of projects. I played with the STM32F4 parts, CubeMX, and System Workbench last year.
I just finished building a 40/30/20 meter superhet that is controlled by a PIC16F1719. The PIC controls the Si5351a LO, LCD, encoder, switch reading, and all switching functions. I only used 40% of the PIC's memory. It doesn't take much in the way of resources to do a lot.
14696 2018-05-01 09:52:19 Dana Myers Re: microcontroller for diy radio 14697 2018-05-01 10:09:14 Cecil Bayona Re: microcontroller for diy radio I either use a ready built development board or use DIP CPUs, not many
are available for ARM so I stick to boards. I'm thinking of changing
that by laying out some boards using SMT, in that case I like to use
solder paste and an oven.
Lately I also played some with the esp8266 and esp32 boards, cheap and
fairly powerful, using Arduino Development software or eForth.
As far as I'm concerned PICs and AVRs and their variants are just fine,
it was in my case that I was using too many widely different CPUs so the
learning curve was huge. I ended picking ARM for cost and processing
power, MSP430 because I like the CPU.
For STM parts I use a variety of tools, Rowleys C++ compiler, eForth,
VFX Forth, MikroPascal. Again maybe too many tools so I might cut back,
my favorites are MikroPascal and eForth Rowley C/C++ is a fairly decent
tool so I hate to give it up so things will stay the same for a while.
For the MSP430 I also have Rowley's C compiler, Arduino Tools,
Assembler, and eForth
14698 2018-05-01 10:31:58 Bill Carver Re: microcontroller for diy radio Slow booting isn't my real problem with Windows, it's the fact that it's not a stable platform. On the Apache SDR site: the overwhelming problem that keeps coming up, over and over, is "it used to work until the last Windows update". It's so far from a real-time platform that it gives me shivvers to have my station dependent on it. I've built a radio around an ANAN-8000 PCB, running OpenHPSDR on a "refurbished" HP duo-core Pentium that I got from Fry's for $75.
The PC is NEVER connected to internet. Since I cut that connection it has run for over a year without a single problem, a huge improvement over the 3.4GHz i5 that was connected to internet.
I'm using ATMEGA2560's under Studio 7.0. I strip the Arduino-ness out, turn the JTAG flag on and have an Atmel JTAG debugger. I've prefer writing interrupt-driven code for projects: a wireless antenna switch, an elaborate RX-ant switch/preselector that animates a Harris RF592 2-pole preselector, and have a CAT controller with (gasp) knobs: very slick variable rate tuning among nice features, running OpenHPSDR to make it really slick, my daily-use radio.
While I lack the experience/intellect to get to a higher level of abstraction, I recognize good info when I see it. Dana, at your suggestion figured I'd get an STM board as a tool for that abstraction extension. I had no idea there's such a huge number of STM boards. You suggested STM32F446RE. For $14 seems like helluva bargain with the FPU and DSP instruction set (Arduino compatibility adds nothing). What more could I ask for? Considering even minimal value of my time the price of boards is low: would an Nucleo-F429ZI at $23 be a useful higher performance, or just bury me deeper?
The battery in one Vette keyfob is dead. Remaining keyfob is probably not far behind it. I need to order a couple of batteries from Mouser. Let me know what your opinion is on development board choice: I'll get an STM board to justify the shipping cost of the batteries, then sit down for a month or two and figure out how to get/use FreeRTOS. Maybe I can bootstrap my abstraction up a level.
14699 2018-05-01 11:05:04 Bill Carver Re: microcontroller for diy radio Tnx Bernard. I'm going to give that a try!
14700 2018-05-01 11:22:32 Dana Myers Re: microcontroller for diy radio 14701 2018-05-01 12:36:50 Bill Carver Re: microcontroller for diy radio Yes, ANAN is moving to a new protocool, from 100 MHz to 1GHz as minimum Ethernet connection
I ordered the Nucleo 429 board so I'm not resource limited. Assuming I don't choke, I can port little things to little boards as they happen.
14703 2018-05-01 14:57:22 Bernard Debbasch Re: microcontroller for diy radio
For the STM part (as well as some other ARM-based), I use VisualGDB. Visual GDB allows you to use a well knows IDE (Visual Studio) with the GNU tools. In the “old days” the value in using a proprietary IDE was the compiler. Nowadays, the GNU compiler (and other GNU tools) are very good.