Monday, 10 August 2015

Concept Session 1 - Arduino

Starting 8 Sept, the Banbury Amateur Radio Society is running a course we call Concept.

Concept S1 Arduino 024

The goal is to bring members up to speed with the Arduino and software programming, and then to build Digital VFO and SDR shields to make a stack of a complete radio receiver. There are 7 sessions overall to complete the program. In the future we may continue to develop TX, PA and LPF shields.

Here are the main slides used for Session 1, given by M6KWH, and the complete code of the software used.


Concept S1 Arduino 005

Kits have been prepared for people attending the course:

Concept S1 Arduino 007

Concept S1 Arduino 008


Concept S1 Arduino 009


Your PC must be loaded with the IDE from web site.

Concept S1 Arduino 012

Concept S1 Arduino 013


A bunch of local files - programs and libraries - are installed on the PC. These are handed out during the session on a USB stick. If you are following this course on-line you will get the source code of sketches published here, but you will have to Google the libraries you need an install them yourself.


All Arduino program sketches have a basic structure like this:

Concept S1 Arduino 015


We will build two simple circuits to interface with the Arduino and run sketches for them. They are the famous starter sketch "Flash an LED" and an Amateur Radio sketch for generating Morse Code.

Concept S1 Arduino 017


// My_Blink
// flashes a LED on pin 13

// pin number
#define LED 13

// the setup routine runs once when you upload (->) the sketch
void setup() {
  // initialise the digital pin 13 as an output
  pinMode(LED, OUTPUT);

// the loop runs over and over again, forever
void loop() {
  digitalWrite(LED, HIGH);  // turn the LED on (HIGH voltage level)
  delay(1000);              // wait for 1 second (1000ms)
  digitalWrite(LED, LOW);   // turn the LED off (LOW voltage leve)
  delay(1000);              // wait for 1 second

The second sketch buzzes morse code.

Concept S1 Arduino 020


// My_Morse_KB is a morse morse sender with KB input
// active piezo buzzer on pin 7

// include the special llibrary to generate morse dit/dah
#include "MorseEnDecoder.h"

// define a constant for words per minute
#define WPM 5

// define a constant for the buzzer pin
#define BUZZER 7

// create a morseOut object
morseEncoder morseOut(BUZZER);

// setup runs once on upload
void setup() {
  // set BUZZER pin as an output
  pinMode(BUZZER, OUTPUT);

  // start serial comms with Arduino IDE monitor window, over USB
  while (!Serial); // wait for USB connection

  // call morseOUT object to set the morse speed

// loop repeats over and over
void loop() {
  // char variable to hold a character of input
  char text;

  // set morseOut encode mode

  // if characters in the input buffer & morse object available
  if (Serial.available() && morseOut.available()) {
    text =; // read a character
    Serial.write(text); // echo it
    morseOut.write(text); // send out as morse

Before moving on make sure you understand the code, it will always get more complex!!!

Tuesday, 4 August 2015

Concept update


The component kits for the sessions have been ordered - thanks go to Geoff M0GUF for his hard work doing this.

Screen Shot 2015 08 04 at 10 58 21

We have tried to source from UK or European suppliers, and only used one from the Far East, they are low cost but sometimes delivery is uncertain.


A reminder of the weekly sessions planned, starting Tues 8 Sept 2015:

1 Update on the Arduino UNO & a couple of get-you-up-to-speed projects

2 VFO: an introduction to the Si5351 DDS and DS3231 RTC

3 An interlude about the use of Eagle CAD for PCB design, LTspice for circuit simulation

4 VFO: adding a rotary encoder and LCD display

6 Building the VFO_RTC_IQ kit

7 SDR: An overview of the design

8 Building the SDR_40M kit

Here's the completed prototype kits in a stack with an Arduino UNO:

Completed Kit