Web-Based Control For A CB Radio

There was a time when a CB radio was a simple affair: a small box with a channel selector, volume, and squelch controls. No longer it seems, because they can now be multi-mode devices that equal the capabilities of amateur radio rigs if not surpass them. [ThatCrazyDcGuy] has one, an Albrecht AE-5900, which has the interesting feature that it can be entirely controlled from its microphone. This led to a web-based interface for the rig, through clever emulation of the microphone.

The communication between rig and microphone is a serial line, for which an FT232 USB-to-serial interface is pressed into service. A USB sound card handles the audio along with some little transformers for isolation, and a USB hub joins everything together. The whole is mounted on perfboard in a small enclosure, and plugged into a Raspberry Pi which acts as a server. This is running a Python script that expose a web front end to control the rig. We like the way this has been done, with minimal intrusion into the radio itself.

Far less so than this CB to 6 meter conversion we featured a while back.

20 thoughts on “Web-Based Control For A CB Radio

  1. working at around 27 MHz, CB radio has nice range and propagates through objects better than the frequencies we’re more familiar with. there should be more effort put into having it carry digital packets, although that’s probably illegal. i would love to have a usb dongle for my laptop that would allow me to communicate via cb radio with some other device having access to the internet when i am in one of the many cellular dead zones i encounter in the adirondacks. LoRa is great, but it’s only good for telemetry and brief messages.

        1. 10 codes? They’re popular in the US, I assume.
          Here in Germany, CBers use Q codes, rather, just like REAL radio amateurs would do!
          Though I do admit some 10 codes had been used over here in late 20th century, too.
          I remember reading a leaflet printed by Stabo or Albrecht that mentioned the 10 codes.
          Perhaps because it was considered cool or because of Convoy, not sure.

      1. The chance of the FCC enforcing any rules on CB is nearly zero unless you’re interfering with another service.

        If you want to experiment legally, you can use LowFER or HiFER. You can also get a ham license.

    1. I’m not saying anyone should break any laws…

      But if you think that anyone is paying attention to laws on the CB band…

      When was the last time you listened to the CB band?

      I am pretty sure regulatory agencies gave up a long time ago, at least so long as you keep within the band.

      This is not legal advice, I’m not giving legal advice, I’m not interested in giving legal advice and if I was my advice would be to follow the law anyway.

      Just sayin…

  2. I remember the CB boom of the 1970’s. Everyone and their mother had one.
    The fee for a license was $20, but all that accomplished was cluttering up the band with unlicensed users.
    The FCC dropped the fee to $4 and more people got licenses but I don’t think the majority did.
    The FCC still does go after people if they get a complaint. There was a guy busted who was running some
    serious power. You can still hear people using roger beeps, echo chambers, and bass boomers. They’re way overmodulated and splatter 5 channels in both directions. I still remember my father’s callsign. He had
    an EF Johnson 23 channel CB in his big boat of a Cadillac. I still remember hearing boats on the Hudson
    River during the 1976 bicentennial celebration. Those were fun times.

    1. Here in W-Germany it was similar..
      In the AM days there had been a CB license, too.
      You had to register your nickname (aka handle, skip) at the Deutsche Bundespost (DBP).
      Did cost 15 DM per month, I think.
      A document with an ID and your nickname then was sent to you, singned by the Bundespostamt.
      That went on throughout the 80s, I think.

      In the 90s, by 1994 onwards, Packet Radio became officially allowed and shortly after Packet Radio callsigns could be registered.
      They were in the form of, for example, DA99AA and later DAA123.
      That caused issues with amateur radio software, which didn’t recognize it.
      So popular software like Graphic Packet didn’t work, for example.
      Software such as X-Packet had special CB support and allowed them.

      Slow Scan TV (SSTV) got popular shortly after, too.
      In early 2000s, the requirement for a registered call sign fell,
      but it was still being emcouraged to register one or choose one that’s not knowingly used.
      The CB club DAKfCBNF offered still a registration form and an ID card with the call sign, I think.

      Btw, after re-union, there was a second boom of CB in unified Germany.
      The citizens of former E-Germany did really enjoy participating CB radio legally.
      Previously, they merely had been allowed to do amateur radio and only if they had been politically alright.

      Also, in ex-GDR, they often operated from registered ham radio club stations.
      Working from home was dangerous, sort of. The whole espionage thing, you know.
      Originally, they had the DM..DT call signs (say DM2ABC), later it was Y2A..Y9Z (Y2 for hams, the rest for club stations).
      More info https://de.wikipedia.org/wiki/Geschichte_der_Amateurfunkrufzeichen_in_Deutschland

      PS: Packet Radio on CB wasn’t just a German thing.
      Austria and Switzerland had similar concepts.
      There was a large Packet Radio network that lasted from ca. 1994 to 2007.

      In the beginning, it was done on CH24/CH25 in FM (CEPT channel spacing, 40 FM channels were current at the time).
      Channel 24 often was used for normal 1200 Baud AFSK, while 25 was used for repeater-repeater links.
      Sometimes at higher speeds like 2400, 4800 or 9600 Baud.
      The latter two were possible with special TNCs/modems, such as the MHE 4800 or MHE 9600.
      They’ve used a non-standard modulation, rather than ordinary AFSK.
      That way, it wasn’t necessary to open and modify the CB radio.

      Ordinary CB operators often used Baycom modems (Bay for Bayern, Bavaria; “a” is softly spoken like in British “tomato”).
      Popular clones were PC-COM models.
      They were simple tone detector modems form V.24 port, using XR2211 or XR2206 chip.
      They could be hacked for 2400 Baud by changing a quarz crystal, I vaguely remember.
      Software wise, Baycom driver/software, TFPCX/TFX and WinTNC worked (Win 3.1).
      A former high-end base station, the Albrecht AE 8000, had an option for an internal PC-COM modem, I think.

      Ordinary TNC-2 TNCs such as PK-232 were also in use (or Pactor TNCs such as PTC-2).
      When the stock firmware was used, it was recommended that they were switched into KISS mode and let TFPCX (TFX) driver do its magic.
      The latter is a DOS TSR that implements a TNC in software.
      It’s also used with Baycom/PC-COM modems, to provide compatibility with NordLink’s “The Firmware” 2.7b.

      Because, TF 2.7 was the standard TNC command language over here.
      It used small ASCII commands instead of English commands, which was more efficient.
      To this day, software TNCs such as Direwolf or MixW2 do not provide any TF compatibility.

      To get X-Packet and other European PR applications running, a DOS VM with TFPCX is needed.
      Or a TNC with TF in ROM, of course. It’s available for all TNC-2 hardware compatible TNCs on Z80 basis and variants such as the AEA PK-232, for example.
      There’s also a DOS driver thst supports even simpler Hamcomm modems using 741 opamp, I think.

      Another important bit is that The Firmware had DAMA, which reduced traffic on the radip channel.
      Long story short, it implemented a srt of rules that made user TNCs wait for the digipeater’s response.
      Especially on CB, it made a difference.

      Nowadays, Packet Radio on CB has declined, but APRS is still in use.
      Software such as UI-View (or UI-View32) is historically most common in Europe, I think.
      It works with KISS TNCs and some scripts for classic TNS such as PK-232.
      The 16-Bit version still runs on Windows 3.1x on a 286 with 4 MB of RAM (the bitmap-based maps take up RAM).
      So about any PC emulator or vintage laptop can run it.

      US software such as APRS DOS, MacAPRS or WinAPRS can still be used, too, of course.
      Due to their age, the new link paradigm must be manually set (no more RELAY etc).
      Other software exist, as well. Anyway, it’s just meant as a small summary.

      PS: Adding a time-out is recommened for a sound-card interface, I think.
      A watchdog, basically. So the CB radio won’t get stuck in transmit when the PC crashs.
      That happened in the days of Windows 9x.
      Using an interverter and a timer IC can do it, for example.
      The inverter for the serial interface inverts the logic.
      (The timer switches the PTT permanently off if the transmission is continous for 10 to 30 seconds.)

      Because, by default, the data pin of RS-232 is +12v if the PC is powered on (if memiry serves).
      So the transmitter is off if the pin has +12v.
      If the CB/ham software toggles the pin for PTT, it goes to 0V (or rather -12v) and the transmitter goes on.
      That default logic can cause trouble.
      By using an inverter circuit (-that’s RS-232 powered so it won’t intercept if PC is without power-), that can be prevented.
      It will change this to 0V=transmitter of, +12v=transmitter on.

      Anyway, it’s just an idea. The behavior might be different between an USB-serial converter with TTL levels and a real RS-232 port on a 16550 FiFo UART.
      So please double check what I said. :)

      1. About the PTT inverter thing..
        Please everyone double check, my memory is a bit sketchy about it.
        Maybe the OS was switching the RS-232 levels of some pins during boot-up or resetting them, it’s been awhile.
        Windows did things such as auto-detection for modems and mice etc.
        A multi-meter or a simple LED can help to determine a pin’s polarity, for example.
        There are also DB25 test plugs with a couple of LEDs, I remember.

    2. I remember me and my late father building a tube amplifier for the 27MHz CB band back in the 90s, around 500w, I spoke with everyone 😋🤣 (and everyone around me heard me !!!)

      Those were the days!!! 😁

  3. Hello Jenny and thank you for the traffic to this project. It’s a joy to see how many people are still on CB Radio.

    When using the project, please pay attention to the laws of your region as much as possible.

    In most cases it is like this:
    Remote use by licensed HAM is usually permitted.

    The use by a CB radio operator is controversial.
    If I understand the law correctly:

    Within the building in which the radio is located, it is nothing more than a wireless microphone and can therefore actually be used without any problems. It is not permitted outside of this location, which is also known as an unmanned radio station in German-European countries. But if there is someone in the building who could turn off the radio if necessary, then yes.

    Have fun with this.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.