• Parts have arrived!

    Taylor Hay09/08/2023 at 10:04 0 comments

    Update video coming soon - but the new parts look PRETTY SLICK!!

    Just gotta work out how to weather it now...

  • PCBWay joins the party

    Taylor Hay08/02/2023 at 10:05 0 comments

    PCBWay reached out and offered to provide some help on this project, which has reinvigorated me to finish the cad model and get some parts off to them to get printed on much better printers than my hacked up Ender 3!

    Here are some updates on the cad model - it's a bit of a chonky unit, but that's what I get for hand wiring everything. I'll be be able to fit a few lipo pouch cells in there though.

     I'm going to have the black part printed in TPU, and then I'll be able to stretch it over the nylon body. Then it will be capped off with the yellow bezel, which will be CNC machined from aluminium.

    I'll update when I have some parts printed! 

  • Video Update!

    Taylor Hay07/20/2023 at 22:14 0 comments

    I’ve done a big video, showing off the state of the case (not great….) and more importantly the UI and all of the features I’ve added!


    Grab some popcorn and enjoy

  • Macro's on the Baofeng UV5R

    Taylor Hay07/14/2023 at 10:28 0 comments

    Macros are cool. They work exactly how I'd hoped! For example check out this macro for setting the squelch...

    Nested in the menus is a submenu for SQUELCH. In this menu one can set the number (3 in the screenshot) to a number between 0 and 9.

    Then when actioning the SET_SQLCH button, the following Arduino function is called

    void CALLBACK_FUNCTION setSquelch(int id) {
      key_menu();
      key_num(0);
      key_menu();
      key_num(menuSQUELCH.getCurrentValue());
      key_exit();
    }

    this function presses menu, presses 0 to navigate to the squelch setting, presses menu to edit the squelch setting, reads the number from the OLED screen and then presses to corresponding key on the keypad, then presses exit.

    Amazing. It's no faster than doing the same on the Baofeng directly, but it's way cooler.

    Oh and if you want to do it the old way, just navigate to the keypad "app" where you can emulate any of the keypad keys and perform any task you'd like, or enter any frequency manually.

    Neat.

  • Case Modelling

    Taylor Hay07/14/2023 at 00:11 0 comments

    Using a canvas in Fusion 360, I drew up the start of the frame for the radio. I printed a sample last night, and I'm not confident I can fit everything in it without making it super thick... I might have to use some smaller lithium cells as fitting 2 18650's is going to make it into a brick (more than it already is!)

    How good is that font matching by the way? Wow!

  • Follow the white rabbit

    Taylor Hay07/13/2023 at 09:42 0 comments

    Just a quick one, while adding the NOKOTA logo to my cad model for the radio, I "what the fonted" it, and looks like the Cyberpunk 2077 devs used a font called White Rabbit. One of many Matrix nods in the Cyberpunk 2077 universe, neat.

  • Functions before Form

    Taylor Hay07/13/2023 at 08:22 0 comments

    So I've gotten the multitude of wires finally wired up, from the radio to the analog switches, to the Arduino Mega. I mapped all of the pins to their various functions (I decided to forgo trying to remember which trigger pin triggered which of the 4 switches on which of the 4 IC's, so I just wired it up, and then made a simple Arduino sketch to test each digital pin and see what function it performed. The findings were as follows.

    pinMode(16, OUTPUT); // Keypad 5
    pinMode(17, OUTPUT); // Keypad 9
    pinMode(18, OUTPUT); // Keypad 6
    pinMode(19, OUTPUT); // Keypad 8
    pinMode(20, OUTPUT); // Keypad 0
    pinMode(21, OUTPUT); // Keypad 7
    pinMode(22, OUTPUT); // Keypad 4
    pinMode(23, OUTPUT); // UNUSED BROWN WIRE
    pinMode(24, OUTPUT); // DOWN
    pinMode(25, OUTPUT); // Keypad 3
    pinMode(26, OUTPUT); // UP
    pinMode(27, OUTPUT); // Keypad 2
    pinMode(28, OUTPUT); // EXIT
    pinMode(29, OUTPUT); // SCAN
    pinMode(30, OUTPUT); // MENU
    pinMode(31, OUTPUT); // Keypad 1

    (Unused brown wire is a spare, and I'm trying to decide if I use it for A/B switch [which switches the radio between two settable frequencies] or the channel / frequency modes, or the FM mode, if I want to enable the FM tuner. A/B or FM makes most sense to me.)

    Oddly enough, the rotary encode stopped working unless I commented out the pinMode declaration for the pin 16. I moved the encoder switch button from pin 6 to pin 12, and it works fine. So for some reason, pin 6 and pin 16 interfered somehow... But once the encoder was moved to pin 12, it all worked perfectly!

    Scrolling through UHF Channels and the radio tuning to the correct frequency.

    The scan function also works, tonight I'm going to build more functions to pack this out! 

    The tune functions look like this

    void CALLBACK_FUNCTION UHFCH01(int id) {
        Serial.println("Tune to UHF 1");
        key_exit(); // press exit key
        key_num(4); // press passed number key
        key_num(7); // press passed number key
        key_num(6); // press passed number key
        key_num(4); // press passed number key
        key_num(2); // press passed number key
        key_num(5); // press passed number key
    }
    
    
    void CALLBACK_FUNCTION UHFCH02(int id) {
        Serial.println("Tune to UHF 2");
        key_exit(); // press exit key
        key_num(4); // press passed number key
        key_num(7); // press passed number key
        key_num(6); // press passed number key
        key_num(4); // press passed number key
        key_num(5); // press passed number key
        key_num(0); // press passed number key
    }

     And the key_num(x) function, and other key functions look like this 

    void key_num(int x) {
        switch (x) {
        case 0: 
            digitalWrite(20, HIGH);  // press button
            delay(delayTime);              // pause
            digitalWrite(20, LOW);   // release button
            delay(delayTime);
            Serial.println("0");
          break;
        case 1:  
            digitalWrite(31, HIGH);  // press button
            delay(delayTime);              // pause
            digitalWrite(31, LOW);   // release button
            delay(delayTime);
            Serial.println("1");
          break;
        case 2:  
            digitalWrite(27, HIGH);  // press button
            delay(delayTime);              // pause
            digitalWrite(27, LOW);   // release button
            delay(delayTime);
            Serial.println("2");
          break;
        case 3: 
            digitalWrite(25, HIGH);  // press button
            delay(delayTime);              // pause
            digitalWrite(25, LOW);   // release button
            delay(delayTime);
            Serial.println("3");
          break;
        case 4: 
            digitalWrite(22, HIGH);  // press button
            delay(delayTime);              // pause
            digitalWrite(22, LOW);   // release button
            delay(delayTime);
            Serial.println("4");
          break;
        case 5:  
            digitalWrite(16, HIGH);  // press button
            delay(delayTime);              // pause
            digitalWrite(16, LOW);   // release button
            delay(delayTime);              // pause
            Serial.println("5");
          break;
        case 6:  
            digitalWrite(18, HIGH);  // press button
            delay(delayTime);              // pause
            digitalWrite(18, LOW);   // release button
            delay(delayTime);              // pause
            Serial.println("6");
          break;
        case 7: 
            digitalWrite(21, HIGH);  // press button
            delay(delayTime);              // pause
            digitalWrite(21, LOW);   // release button
            delay(delayTime);              // pause
            Serial.println("7");
          break;
        case 8: 
            digitalWrite(19, HIGH);  //...
    Read more »

  • It's alive!

    Taylor Hay07/10/2023 at 11:25 1 comment

    I wired 4 digital pins from the Arduino to the inputs of the first analog switch IC, and then the four inputs and outputs to the pads of the Baofeng UV5R buttons (1,2,3 and SCAN)

    I whipped my code into shape and the results were great! I'm using a 400ms delay for holding down the buttons, and between the button presses. But I reckon I can shorten that down quite a bit.

    The wiring is a dog. I'm not loving it. The astute among you might think this is a good project for a PCB, and forgive the Eagle gore but I've had a crack...

    This was my idea for a carrier board to hold the Arduino, and give me solder pads on the sides to hold the wires for the buttons. I might still go this route - but I'm in a hurry so I think I'll plunge ahead with hand wiring the whole thing!

    Regardless, this test is awesome, and proves the concept even further. The idea is that the front of the unit will show the original Baofeng screen (just as a reference to the currently set frequency) as well as the OLED screen, the rotary encoder on top, with the original Baofeng power / volume knob also up there.

    The Arduino Mega clone I'm using can take up to 18v in, so I'll be able to power it directly from the 2s Lipo battery that the UV5R uses (I've added a wire after the Baofeng radio switch, that will power the Arduino) I'll be adding a USB-C charger to a couple 18650's to take care of power, and the original Baofeng screen will still show the battery level, which is pretty neat.

    Once electronics are done, I'll press on with the case! I've started on it, but the only cad model I could find is a shitty STL - and I'm having no luck converting into a parametric model. If anyone has any tips or is able to help - please reach out! I'll attach a link to the STL.

    STL from - https://sketchfab.com/3d-models/nokota-radio-cyberpunk-2077-641dc25a8e25498ea9a52b71153b7dab

  • State of the UI

    Taylor Hay07/10/2023 at 08:49 0 comments

    well, it’s not the cleanest implementation - but what’s wrong with having 100+ functions?!

    When clicking on a menu item, it will call the linked function - that’s awesome!

    I could do it with a number entry item from TcMenu, but then it’s all on one line, and I think scrolling through the long list of channels is way more interesting, I want to see as many of those pretty yellow pixels as possible.


    It’s also cool to see the rolling shutter effect from my phone camera on the oled screen in this photo.

  • TcMenu is amazing

    Taylor Hay07/10/2023 at 02:29 0 comments

    I struggled with the UI for this for some time. I was going to try using this legend's process - by making all the screens in photoshop, however I remembered some good advice from ADHD superstar Zack Freedman, and I aimed to avoid scope creep and make a real MVP before taking all my attention span building gorgeous UI's.

    Somehow I stumbled upon TcMenu - which is exactly what I was looking for! Similar projects were higher on the duckduckgo results for some reason, but few I found run well on OSX or Linux, (besides an embarrassing Windows7 VM I dont have any Microsoft in my life)

    TcMenu seems perfect - and is advanced enough to allow a rotary encoder to enter 6 digit numbers (perfect for tuning to a custom frequency) and capable of deeply nested menus. To allow me to quickly tune to any one of the 80x UHF frequencies, 60x VHF frequencies, and however many other frequencies I program in, I'm thinking of using a structure like the following - and would love to hear any feedback or suggestions for more features!!

    (forgive the odd highlighting...)

    UHF_CH
        UHF_01-40
            UHF_01
            UHF_02
            UHF_03
            ...
        UHF_41-80
            UHF_41
            UHF_42
            UHF_43
            ...
        SCAN // sets radio to channel mode, channel 1, and then scans through the 127 channels in memory (not sure how to exclude VHF channels)
    
    VHF_CH
        VHF_01-30
            VHF_01
            VHF_02
            VHF_03
            ...
        VHF_31-60
            VHF_31
            VHF_32
            VHF_33
            ...
        SCAN // sets radio to channel mode, channel 80, and then scans through the 127 channels in memory (not sure how to exclude UHF channels)
    
    FM_TUNE
        000.000 // user can set any frq
        SET_FRQ // tunes to above frq
        FM_SCAN // macro which sets UV-5R to FM, and then presses scanner button
        
    CONFIG
        MANUAL_CONT // allows for doing any function on the UV-5R that one might need to do by exposing the buttons directly
            UP_BTN
            DWN_BTN
            MENU_BTN
            EXIT_BTN
            01_BTN
            02_BTN
            ...
        SQLCH
            03 // user settable number
            SET_SQLCH 
    
        

     But next step is to go out this arvo and buy a rotary encoder with a button, as I had to strip one out of an old LED work light to get this far