While waiting for the Edison to arrive, I had planned to discuss about the software.
Before doing that, I will refer to some software related issues that I faced, while trying to set up an Edison environment on my computer so that I can be ready by the time the hardware arrives.
Unfortunately I do not have my old faithful Linux HP anymore, so I am using a Lenovo 10” 4 core ATOM tablet PC with 2 GB of RAM that has Win10 Home edition pre-installed. The machine is fine for doing almost all my tasks, including CAD and Spice, plus running Arduino IDE 1.6.5 which I consider quite stable for my projects. I had tried much newer versions, but had port problems (USB) with a number of boards. As I have all my development libraries installed here and had prototyped the 2 first processes of my project here, I decided to download the Edison board for this version of IDE which I did quite easily, but yet no Edison to verify its functionality.
At the same time I decided to also install Intel's version of Arduino IDE 1.5.3/Intel 1.0.4 which I did with no problem. However, whenever I try to run it, I get incompatibility messages that practically make it difficult to run that IDE, as all the underscored names of my .ino files are not accepted.
Using the 1.6.5 IDE, I had no problem.
I only hope that the Edison board that I downloaded for that IDE will work with no serious issues
Also I had a problem downloading the Intel toolkit with Eclispe for Win10 Home, but I eventually found a way to overcome it.
Frankly speaking, I was expecting the Arduino IDE to be more updated.
Meanwhile, I also downloaded the latest versions of Yocto and Ubilinux, to have them handy for flashing.
The Software
As there is no previous experience with Edison the idea and current prototyping was tried on Arduino and SDK Ver. 1.6.5, while WiFi communication and USB Audio that will be controlled from Edison’s embedded Yocto or Ubilinux will be tried when the Edison is available.
For this reason, the programming task has been split into 4 processes to maintain compatibility with the first two that have already been tested on Arduino.
These are:
1. Buttons and Rotary control
2. LCD control
3. WiFi layer control
4. USB Audio layer control
The first two processes are interfaced as presented in the previous Hardware section.
WEB SDR Server connectivity and control
In order to connect to the UTwente WEB SDR, we need to enter into a browser an URL in the form: “http://websdr.ewi.utwente.nl:8901/”.
We can directly tune to the desired frequency and demodulation mode, by concatenating the string template “?tune=xxxxx.yyzzz”.
xxxxx.yy stands for the desired tuning Frequency in KHz or MHz followed by two optional decimals (yy; for hundredths and tenths of Hz), concatenated by another two or three characters (zzz) which correspond to the demodulation mode, namely AM, CW, LSB, USB.
This will be referred as the “Tuning Sentence”.
For example, the URL “http://websdr.ewi.utwente.nl:8901/?tune=198am”, instructs the WEB SDR Server to tune to 198 KHz with AM demodulation; that is the frequency of BBC Radio 4’s transmission in Long Wave. Note that the browser should support either HTML5 or Java.
The 4 Processes
For Process 1, we need to synthesize the templated string part of the Tuning Sentence, i.e., xxxxx.yyzzz by means of the Rotary Encoder Control and/or the f++/f-- buttons, and the Mode button.
Process 2 then visually displays the frequency and demodulation mode on the LCD.
Process 3 sends the Tuning Sentence to the WEB SDR Server, and returns as streaming audio the digitized contents of the frequency in the demodulation mode that has been selected or “Tuned-in”.
Finally, Process 4 redirects the audio to the USB DAC and through its headphone/speaker output drives the Upcycled Radio’s analog audio amplifier using its original volume, and EQ controls.
In that way, we have a “new” dual function Analog & Digital Radio for Bedtime listening!
Ideally, if the Edison Subsystem is packed with a small physical overhead, it could also be fitted to other smaller transistor or valve radios.
Code for the control of the inexpensive Nokia 5110 clone LCD is provided by the well documented library of Oliver Kraus (https://github.com/olikraus/u8glib/), which supports a multitude of colour and monochrome graphic LCDs, as I explained the other time. Before concluding to using this library, I tried some others, but their documentation was not explicit enough to allow me to design the screen layout from scratch in a way that would suit my visioning for such a client.
A bit of advice after "playing" with libraries for Arduino, especially for newcomers. Use libraries that you understand what they are doing and have some reasonable amount of documentation. Otherwise they can be a nightmare for you. Trust me, I have come to that conclusion the very hard way. When you see something strange, ask the author of that library. If you do not get a clear answer you should consider looking for an alternative library!
After running one or two different layouts and discussing with some more Amateurs about their functionality and appearance on the LCD, the following setting was concluded.
The code for the push buttons that control the Frequency Stepping (tuning resolution 10 Hz, 100 Hz, 1 KHz, etc.), Demodulation Mode (AM, CW, etc.) and Band Switching operations, cycles through the available options.
For example pressing the Mode button multiple times, programmatically goes through the following values: AM => CW => LSB => USB => AM, and so on.
For Band selection a number of Start frequencies are predefined; the first one is assigned as the default.
For each selection, Process 2 displays on the LCD the corresponding Wavelength Meter Band from an internal lookup table.
The frequencies are:
153000 <= Start of LW (Long Wave Band)
530000 <= Start of MW (Medium Wave Band)
1800000 <= Start of 160 meter Ham Band
3500000 <= Start of 80 meter Ham Band
7000000 <= Start of 40 meter Ham Band
10100000 <= Start of 30 meter Ham Band
14000000 <= Start of 20 meter Ham Band
18068000 <= Start of 17 meter Ham Band
21000000 <= Start of 15 meter Ham Band
24890000 <= Start of 12 meter Ham Band
28000000 <= Start of 10 meter Ham Band
All the above can be altered to suit your personal preferences.
Other settings are:
(Step) 10 Hz, 100 Hz, 1 KHz, 5 KHz, 9 KHz, 10 KHz, 100 KHz, 1 MHz, the default is set to 9 KHz for wideband AM reception in Long and Medium wave bands.
(Mode) AM (Amplitude Modulation), CW (Carrier Wave), LSB (Lower Sideband), and USB (Upper Sideband), the default Mode is AM.
This concludes the description of the Software concept that has already been tried with an Arduino board. My apologies for the bad quality of the pictures from my mobile. I am expecting a better camera shortly.
As soon as the Edison hardware arrives, I will try to convert the trial code for Edison and proceed with the remaining processes.
According to my planning this is the task of this week, should the Edison arrive early this week.
Having completed this writing, I went back home. On my door, I found a notification that a courier had a delivery for me, so I assume that my package will be delivered to me by tomorrow, which means that I will enter real business.
Till next Monday then...
Top Comments