• That’s a wrap!

    Taylor Hay10/09/2023 at 05:52 1 comment

    I’m pleased to announce that I’ve finished this project! Thanks everyone for following along, and for all the suggestions and feedback. Please enjoy the following video, and some pics showing off the final unit.

  • 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.