dinsdag 28 november 2017

Racal Cougar Standalone Programmer - Part 4

Since i posted about the stand alone programmer earlier this year i have been working on the protocol used to fill the crypto keys, a PCB for the programmer and a 3D printed case to house the electronics of the programmer.
Inside the programmer
In this post will try to give some details including the schematic and binary version of the code driving the programmer (the sketch it self will be released later).

Important:


This information is supplied "As is" meaning i'm not responsible for any damage to your precious Cougar. Also i don't have the time to support you on your build, feel free to send me an email message with questions but don't expect 24/7 support.

Schema


The design is basically made up of all the components described in a previous post, Racal Cougar Standalone Programmer - part 2 with the addition of some additional parts in a single schema used to create a custom PCB.

The programmer code should also work on a default Arduino Nano with a 4x4 keypad, an I2C LCD driver and a 20x04 LCD as long as you keep the pins connecting them to the ATMEGA 328 the same as used in the above schema.

A note on the I2C LCD driver

The I2C LCD driver is based on the NXP PCF8574A I2C 8-bit I/O expander. There are two versions of this IC: the PCF8574 and the PCF8574A which only differ in the usable I2C address range:

PCF8574         0x20 ... 0x27
PCF8574A      0x38 ... 0x3F

(see datasheet)

On the PCB and in the code i used the PCF8574A set to address 0x38.

PCB


I had some PCB's made that could be placed on top of the 20x04 LCD. This PCB contains the following parts:

  • DC-Jack and power regulator to generate 5 volt to drive the battery charger
  • Single cell Li-Po/ Li-Ion charger circuit with status leds.
  • 5 volt DC DC converter (without under-voltage protection so use li-po/li-ion's with protection circruit)
  • ATMega 328 micro controller (as used in Arduino Nano).
  • PCF8574A I2C 8-bit I/O expander set to address 0x38 (see datasheet)
  • Racal interface circuit (level shifter, DB9 connector)
The Gerber files for the PCB can be downloaded using this link.

Battery


I used a 18650 Li-Ion battery to power the programmer. There is no under voltage or reverse polarity protection so make sure you use a battery containing a protection circuit and when you accidentally connect it the wrong way around it will for sure damage the DC-DC converter IC.

The Sketch


I'm still working on the sketch and will release the code as soon as i think it is ready to be released. In the mean time i will provide a binary version of the sketch which can be downloaded using this link.

More information about how to upload hex files to the Arduino can be found on the Arduino forum using this link for example.


3D printed case


The housing of the programmer is made up of 3 separate parts that are tied together using M3 hex screws and M3 stand-off nuts:
  • Top part containing all the elctronics
  • 18650 battery holder that is placed on top of the keypad using 4 short M3 screws.
  • Bottom part with ventilation slots.
I printed these parts using PLA and PETG with a 0.4 mm nozzle and 0.2 mm layer height and as long as you set the correct speed/ nozzle temperature there is little shrinkage. I haven't tried to print the casing using  ABS.

The STL files for the housing can be downloaded using this link  





6 opmerkingen:

  1. Hello Dave,
    I finally put together my own programmer based on your design (using protyping board and full-size Arduino Uno). I crypto-filled my PRM4515L with success (MA4437 board), but I have trouble programming a MA4083C fill gun. I powered it independently with a Cougar battery to the C and E pins , but the programming fails roughly halfway with "Error". Any idea? Could the lack of FLA mode on the A pin be involved?

    Also, I am in trouble with the channel programming function. It worked perfectly with your first software (through the PC terminal), but with the 0.9.4 hex, I get garbage on the frequency slots; the numbers are huge, random and the "Khz" unit even wraps to the beggining of the line. It looks like a memory init issue. Real problem is, when I try to input frequencies like in your previous video, the input is always rejected, even when it looks legit... I feel like I have to "clean up" my Arduino memory but can't find how. Saving channels, resetting the board did not help.

    Anyway, once again, thanks a lot! It's really great being able to fully use these nice radios :-)
    Best regards
    Matt

    BeantwoordenVerwijderen
  2. Well, I found a solution to the second problem (memory initialization, garbage data in frequency slots). Before installing the Racal programmer software, one should upload and run the "eeprom_clear" example Arduino program (shipped with Arduino IDE). This zeroes the EEPROM entirely. Then upload the Racal programmer, works like a charm :)

    BeantwoordenVerwijderen
  3. Hi Matt,
    Thank you for your response and posting the solution, maybe others can benefit from this. The current versions of both programmers do have a crude check to see if the eeprom has garbage or valid data. It checks if the first 5 bytes of the eeprom memory contain the string "RACAL" and if this isn't the case it fills the memory and crypto key data with default values. I think your problem was caused by the Arduino first being used as the simple programmer which did set the first 5 bytes to "RACAL" and then using the same Arduino for the standalone version. It did see the "RACAL" header assuming the content is correct while the memory structure between both programmer is different.

    BeantwoordenVerwijderen
    Reacties
    1. Regarding your question about the Fill Gun, you are correct. This isn't supported (yet) and i need to dive into this. I can't say when this feature will be added but it's on my todo list :-)

      Verwijderen
  4. That's great! For your information, I tried setting FLA by pulling the A pin to the +5V line through a 10K resistor -- it didn't change anything. Maybe it has to do with pin G, which provides a "framing pulse" according to the MA4073 technical manual.
    For more accurate results: the key fill to MA4083 fails at around 1/3 progress, while channel fill fails almost immediately (only the very first segment of the progress bar appears).
    I own radios with both crypto boards, as well as MA4083C and G fill guns. If I can be of any help at some time...

    BeantwoordenVerwijderen
  5. Hi Dave I have had a PCB made
    For your design and eager to program my Low band Cougar. Can you please tell me if you will release the sketch for the arduino. Many thanks kind regards Spence

    BeantwoordenVerwijderen