Initial Commit. Hello.

master
Jay 5 years ago
commit 2b7e2ae533

@ -0,0 +1,5 @@
CHANGELOG:
There have been no revisions to any code as of the initial commit.
Stay tuned for development updates.

@ -0,0 +1,18 @@
Copyright 2020 Jay Moore
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

@ -0,0 +1,112 @@
ArFO - Arduino Frequency Oscillator
A (mobile) remote head for your ham transceiver.
# History
```
8-Feb-2020: Repository Creation, Intitial Commit, Alpha Versions
````
# About
ArFO is an Arduino-based program that interfaces with an external display, external controls, and your ham rig;
to allow you the convenience of a remote head for rigs that do not feature one. It is written in Arduino and
commands your rig using it's CAT/CI-V connection. ArFO is a continuation/reboot of PiFO; a previous project
that sought to do the same thing.
In addition to being able to control your operating mode, VFO, and a few other select options; ArFO also provides
"advanced logic" for an otherwise older rig. When possible, it uses it's own programming rather than rely on the
rig's internal functions. Planned features include a memory function, similar to what the proof-of-concept PiFO
was; that will allow you to expand on the memory preset functions of older rigs as well as the ability to carry
your memory presets with you between rigs. ArFO stores the frequency information and sends it to the radio as
a frequency for the VFO.
ArFO will use it's own internal logic when necessary, meaning older rigs will get some new features. This means
some limitations (like CI-V WARC band data) are irrelevant to ArFO as we can calculate and process things
ourselves.
# Why The Change To Arduino
When I originally came up with the idea for PiFO; the Raspberry Pi seemed like the easest development solution. With
existing software in it's repositories the original idea was just a basic python script to interface with these.
However as I began developing it I found a lot of limitations in the existing solutions that did not perform the way
I thought they should, or wanted it to.
The other problem with the RPi is the amount of time it takes to boot. Even with a basic installation of Rasbian;
20 seconds was how long it took to become active without getting in to the OS and really stripping things down.
When I created [HiFiLOGIX](https://gitlab.com/dewdude/hifilogix) I decided to go with the Arduino platform due to
almost negligable boot-up time; the goal was to have it booted and ready to go within the 4.5 seconds it took for
the stereo to activate it's speaker output relay.
The (relative) success of getting HiFoLOGIX to work and armed with new knowledge of Arduino; I decided it should be
possible to build PiFO in a way that works entirely on a microcontroller. We don't need a full OS; and this means
no long boot times.
# Hardware
Though I have not gotten to the full design of a "reference" remote head; I am shooting for the following:
* easy-to-read seven-segment LED displays with a minimal amount of information
* one (or more) rotary encoders for spinning the VFO/channels
* dedicated buttons for functions that don't require you to navigate a menu
* onboard level converters for your rig's communication protocol
* two cables to the head; power and communications
Currently development is occuring on an Arduino Mega2560 and a simple 7404 based level converter for CI-V. This is
actually the same converter used in the RPi version. If the code allows; the final product may contain an ATMega328.
All hardware is planned to be integrated in to the head, meaning you should only need a power and communication
cable going to your radio.
I will post full pictures and a schematic as I get further along in the development.
Usage of onboard USB controllers in newer rigs will depend on how difficult it is to implement. Unlike the RPi;
the AVR based ATMegas do not feature native USB support and only offer serial communications. So plugging a rig's
USB in to the thing won't work. The chip that handles serial-to-USB on the board would have to be reprogrammed to
act as a USB host and understand all the various serial-to-USB adapters on the market. While USB controllers are
available as an external module; the goal of this project is to keep costs to a minimum. No one wants to spend
$300 on a remote head accessory!
Additional display types may be supported depending on demand or user-submitted code. The project is open-source; you
are welcome to contribute code.
# Current DEV Status
Development offically started on 5-FEB-2020 with working out the physical interface betweent he rig and the radio.
This has been fully tested and I'm able to send and receieve bytes.
The current phase of development is largely focusing on the communication library for CI-V. In it's current state,
the software is able to detect, receive, and filter CI-V data packets and able to process iCom's BCD data in to a
decimal format that can be worked with by the rest of the software. Currently this just displays the frequency to
the serial port on the Mega2560 connected to the USB adapter. The radio is currently using one of the remaining
hardware serial ports.
![Current Development Version](/images/civdecode.png "CIV Decoding")*Current Development Version*
# License
Copyright 2020 Jay Moore
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

@ -0,0 +1,82 @@
/* ArFO Development Version
*
* This software doesn't control the radio yet. It is just to test working with the
* iCom CI-V data stream coming from the radio.
*
* de NQ4T - 08-FEB-2020
*/
const byte numBytes = 32;
byte receivedBytes[numBytes];
byte numReceived = 0;
long vfoa;
boolean newData = false;
void setup() {
Serial.begin(9600);
Serial2.begin(9600);
Serial.println("CI-V Monitor Ready");
Serial.println();
}
void loop() {
recvBytesWithStartEndMarkers();
showNewData();
newData = false;
}
void recvBytesWithStartEndMarkers() {
static boolean recvInProgress = false;
static byte ndx = 0;
byte startMarker = 0xFE;
byte endMarker = 0xFD;
byte rb;
while (Serial2.available() > 0 && newData == false) {
rb = Serial2.read();
if (recvInProgress == true) {
if (rb != endMarker) {
receivedBytes[ndx] = rb;
ndx++;
if (ndx >= numBytes) {
ndx = numBytes - 1;
}
}
else {
receivedBytes[ndx] = '\0'; // terminate the string
recvInProgress = false;
numReceived = ndx; // save the number for use when printing
ndx = 0;
newData = true;
}
}
else if (rb == startMarker) {
recvInProgress = true;
}
}
}
void processciv() {
int i = 0;
long bcd[4];
for (int x = numReceived; x > 2; x--) {
bcd[i] = (((receivedBytes[x] >> 4) *10) + (receivedBytes[x]&0xF));
i++;
}
vfoa = ((bcd[0]*1000000)+(bcd[1]*10000)+(bcd[2]*100)+(bcd[3]));
}
void showNewData() {
if (newData == true) {
numReceived--;
processciv();
Serial.println();
Serial.print("VFO A: ");
Serial.print(vfoa, DEC);
Serial.print("kHz");
}
newData = false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Loading…
Cancel
Save