Skip to content

Development Notes

K7MDL edited this page Jan 28, 2025 · 6 revisions

Updated January 27, 2025

Most changes since last update are related to reassigning pins for the PCB. The first board set is assembled and in the Hammond enclosure, working good.

Today I reworked the incomplete former PC_PASSTHROUGH feature with a simpler approach using basic non-USB UART example code on the pins that feed the USB-UART port. I created a 2nd instance on pins 21 and 47 creating a 3rd serial port allowing me to see debug messages via a FTDI TTL to USB converter without interfering with CI-V traffic on the 2 USB serial ports. I initially added RGB LED color code for tracking how far certain messages were getting but that was too confusing. The serial debug messages are much better.

The 3rd port may be useful in the future as a bridge to a CI_V analog interface via the 1/8" audio jack on the back panel. Some level shifting circuitry is required, plenty of room inside to add that on a small board.

When you activate #define CIV_SERIAL debug is shut off after initialization and all CI-V traffic is passed in full between the 2 USB ports. I pick off frequency related messages from both directions in case it is not echoed back. This showed as an issue when testing with wfView which uses Band Stack Registers to change bands. wfView also pulls scope data through the CI-V messages (0x27) so there is a lot of traffic. Using wfView UI manual polling option will help if it gets slowed down. Some more perf tuning is needed. WSJT-X appears quite happy, response is snappy after tuning some multitasking delays. This only passes the Serial and spectrum data, the USB audio channels are not passed. You could use the headphone and mic jacks for audio and thus skip the LAN if you wanted.

The future target for this CI-V bridging is in my transverter project where I need to swap out the radio (IF) frequency for the transverter frequency, and possibly for connecting to legacy analog CI-V radios like the IC-706 and many others. I still use a 706 in my rover truck primarily as a 100W 6M rig and need to connect to it for logging and digital modes.

January 14, 2025

Now works with any radio CI-V address and USB VID/PID combo. CI-V address is detected at startup. You enable it by setting the radio address = 0. You can still specify a particular address if you want.

There is now a prebuilt image zip file and a Wiki page to explain how to flash your CPU with a firmware download. There is no need to install the dev environment with this if you are not into programming.

Added a vertical 20K (not critical) pot on the back panel to adjust LED brightness. Added ADC code to read pot position for easy field LED brightness adjustment. These things can get blindingly bright. Helps with in-vehicle, night and day usage. Drilled the LED holes and mounted 8 LEDs, got them all working proper. Code is fully functional, I just need to finish wiring up the buffer and rear 15 pin connector. Saving the most tedious for last. I used 165ohm resistors on my 20ma rated mini-LEDs, the green is lower voltage and could use a larger resistor value to better match the brightness of the blue and red LEDs. It is too hard to reach the resistors in the prototype to change it. I compensated for that in the code with the green (Pwr_On Status) LED set to the brightness level/3. For the PCB I will use a larger value resistor and remove the /3 adjustment. Investigating using a 3D printed case.

Jan 9 2025: Removed all (unfinished) OLED code and added 8 LED PWM pins for 8 LEDs. Power ON, PTT IN, and 6 Band LEDs. Each Band LED will (eventually) flash when that PTT is active. The PWM allows for easily configurable brightness. Now wiring up the 8 LEDs.

Jan 8 2025: I just received my small aluminum box and have mounted the CPU, 1 of 2 coaxial power jacks and a PTT phono jack at the front panel. A 15-pin D-Sub and a 2nd coaxial power jack will go on the back panel. It will pass through 12V to the radio. Assuming the box is attached to the back or top of the radio control head, on the front of the box will be 3 short cables that can stay permanently attached to the radio, all around 6" - USB, 12V and SEND. On the back will be radio 12V and 6Band outputs and 6 PTT outputs, 1 PTT input and GND. Maybe 5V also.

Inside is a ESP32-S3-DevKitC-1, 5V regulator, 2 ULN2803A drivers and either a 128x32 OLED, or 8 LEDs (6 band indicators, 1 PTT in) and 1 for power. The band LED would flash when PTT active on that band.

I am also working on bridging PC to Radio CI-V messages between the 2 USB ports. It it can be used for logging. IF audio is needed then you can run wfView or RS-BA1 and use the LAN. I am also working on adding in the SSD1306 OLED code. In parallel I am waiting on parts to finish my IC-705 transverter box project, chipping away at some small tasks on that.

Jan 7, 2025 I looked at the PTT input and no debounce is required. It is a transistor output and there is no trouble with it. There is a 5V pullup in the radio, perfect for TTL logic including the ULN2803A I am using for a buffer device. I measured 0.6ma driving a 2803A input direct. It is good for 500ma continuous load on any one output, 600ma total package.

I imported some of the 705 transverter code to support the M5Stack AtomsS3 and its small color LCD screen. It is a single Type-C USB port that is capable of OTG host mode and has a 0.95" color graphics LCD display that is very bright and sharp so small text can stand out. I wanted to try programming and using host mode on a single port device. This would allow selection of smaller ESP32-S3 modules saving room. The display is also handy, better quality than the typical small OLEDs and I can fit all the useful info on a single screen, no need to rotate screens. I have time, date, grid square (8-digits), band name, PTT TX status icon, and dial frequency displayed. How to mount it requires some creativity though. I have M5StampC3U and M5StampS3 modules that are very OTG capable and small, but still have many IO pins without needing an I2C expander chip. We need 13 pins.

I plan to build this on a small single port module. Debate welcome. Cost is no difference. It is easy to develop on a 2-port board then load it up on a single port target. You just hold the reset button for several seconds and it changes to device mode for programming. I figure most users are not going to modify the code for this, at least rarely, maybe only to set up custom output pin patterns. Setting up the esp-idf dev environment is not likely going to fly for a non-developer so I plan to offer compiled images that can be flashed with minimal tooling required. M5 has a standalone flash tool that I should be able to leverage.

  Prototype hardware plan for this week:
  1. Small black aluminum case, 100mm x 82mm x 27mm.  Has PCB slots, split body with end plates.  I have one with mounting flanges which is connenient but that is no longer available.  I plan to mount mine on the Peavy cage surrounding my 905 controller, it has lots of 1/4-20 threaded holes all over.
  2. 2x 12V coaxial jacks connected together to pass through 12V power to the 905.  If the decoder is mounted on the 905 controller then this is 1 less cable to unplug.
  3. Right-angle 15-pin HD D-Sub PCB-mount connector for 12 outputs.  For Band, PTT, and 1 PTT input line which will be in parallel with the phone jack.
  4. Phono jack for PTT input from the 905 SEND port. 
  5. The CPU USB port will stick out on one end plate.
  6. Debating puttig a power switch in.  Not sure it has a real use.
  7. Internal resettable poly fuse and reverse polarity diode.
  8. ULN2803A buffers (x2).

Will cut a vectorboard to fit the case and hand wire it. When it is finalized, and prove it all fits in, I can do a PCB layout and publishe the BOM.

The decoder, USB and SEND cables, can stay attached to the radio and you can simply plug/unplug the 12V feed and HD15 cables for setup/teardown, leaving the USB abnd 12V cables between the decoder and controller in place. If the decoder is remote located then no issue, you have to extend the USB as required though. I have a USB extender that works over a long 4-pair enet cable (not ethernet, just the same cable type.)

I checked in code today that supports the M5AtomS3. Has a single OTG USB port, works fine. The 0.95" color LCD is sharp and easily shows useful information. Band, grid, time, frequency, PTT.

To switch between the AtomS3 and other boards there is a #define AtomS3 near the top of the IC905_ESP32-S3_PTT_Breakout.cpp file. After connecting to your computer, hold the AtomS3 reset button for > 3 seconds to put it into boot mode. In the IDE change to ESP32S3 and choose the built-in-JTAG option. For the dual port Dev-Kit-1 choose the last option Prog2. See pic below. I usally delete the build folder for a clean build. sdkconfig sometinmes gets confused. I keep all my changed config settings in the sdkconfig.defaults file.

20250105_182008

20250105_182031

I also added in CI_V address config and VID/PIDs for the IC-705 and IC-9700. It works on the 705 as long as you stay on the 144 and 430 bands. I stripped support for the lower bands from the code I imported from the 705 project since I was targeting the 905. I will likely revisit that decision. I do not have an IC-9700 to test with so are waiting for feedback.