• The whole family

    Arduino Enigmaa day ago 0 comments
  • This project has been shrunk to 88x98mm

    Arduino Enigma03/29/2020 at 04:00 0 comments

    Introducing PicoEnigma. 

    Runs the same Universal Enigma Machine Simulator as MegaEnigma, but with a slightly changed IO Layer owing to its 14 segment displays.

    https://arduinoenigma.blogspot.com/p/picoenigma.html

  • A new little something

    Arduino Enigma02/26/2020 at 06:02 0 comments
  • Putting Batteries Inside a Laser Cut Enclosure

    Arduino Enigma01/14/2020 at 05:16 0 comments

    To put batteries inside a laser cut enclosure, one has to think in 3D using 2D:

    The pictures in this article will show how:

    https://arduinoenigma.blogspot.com/2020/01/how-to-put-battery-compartment-inside.html

    And now that there is a built in battery compartment, then the question of how long will it run on batteries becomes more important.

    The following article shows a method of measuring run-time by writing timing checkpoints to EEPROM, no external components needed.

    https://arduinoenigma.blogspot.com/2020/01/measuring-battery-run-time-by-writing.html

  • How to use Sketchup to design complex PCB shapes for Fritzing

    Arduino Enigma10/26/2019 at 17:40 0 comments
  • Added menu to edit UKWD

    Arduino Enigma10/22/2019 at 04:38 0 comments

    This simulator already had 5 UKWD rewirable reflectors, 4 were available to be used with the M3 machine, the other with the KD. The D reflector wiring can be changed in the field. The 5 reflectors included are examples of known wirings used at some point in time.A mechanism was needed to change the actual wiring of the reflector in this simulator.

    Adding an item now to the menu system is easier than developing it from scratch. It is just a matter of inserting an item in the existing menu system. The UKWD sub menu has two special features, it is skipped if the currently selected machine did not have a D reflector, and the user cannot leave that menu until the pairs specified are correct.

    Read more here:

    https://arduinoenigma.blogspot.com/2019/10/ukwd-added-to-mega-enigma-universal.html

  • What's the most efficient way to print things

    Arduino Enigma10/10/2019 at 04:06 0 comments

    We are at a stage of the project where things are getting standardized and optimized. The program needs to print a space every once in a while to separate groups of characters, as well as send the CR LF sequence to start printing things in a new line. We are curious what is the best way to do that.

    Let's start by saying that the most efficient way to print strings is to wrap them in the F("") macro. This keeps the string in PROGMEM, otherwise the string is stored in PROGMEM, then at runtime it is copied to precious RAM before printing and it is possible to run out of RAM if the sketch uses a lots of strings.

    Example:

    Serial.print(F("HELLO WORLD"));  // DO THIS, 18 bytes code, 0 bytes ram

    don't do this:

    Serial.print("HELLO WORLD"); // DON'T DO THIS, 26 bytes code, 12 bytes ram

    Now, what what is the most efficient way to print a single space to separate two characters printed elsewhere? How about a newline / CR LF sequence?

    The sketch below was created to test different ways to print a space and a new line in between the A and B letters. 

    First a very basic sketch was created and compiled. The program size and ram usage were recorded.

    void testSerialSpace()     /*xls*/
    {
      Serial.begin(9600);
      Serial.print(F("A"));
      Serial.print(F("B"));
    }
    
    void setup()
    {
      testSerialSpace();
    }
    
    void loop()
    {
    }

     Then different ways to print a space and a new line were added, one at a time and the memory usage was obtained by subtracting it from the baseline program.

    The moral of the story is that the most efficient way to print a space is simply:

    Serial.print(F(" ")); // adds 8 bytes code, 0 ram

    Things got a little more surprising in the newline department.

    The obvious and wrong choice would be to print an empty string using the F("") macro.

    Serial.println(F("")); // adds 26 bytes code and 4 bytes ram

     But this added a whopping 26 bytes of code and 4 bytes of ram. Not sure why.

    After trying different combinations the most efficient way to send a newline is to do a regular print, not a println and send a hex escaped string with the CR LF sequence

    Serial.print(F("\x0d\x0a"));    // adds 10 bytes code and 0 bytes ram

    This result was a little unexpected. but now we know.

    The full results are listed below, ranking from most efficient to least efficient. The strings printed without F("") are at the bottom of the list, with the absolute worst  ways to send a single new line clocking at 40 bytes of code and 4 bytes of RAM.

    //
    // moral of the story:
    // to print a space, use Serial.print(F(" "));
    // to print a newline, use Serial.print(F("\x0d\x0a"));
    //
    //  Only prints AB
    //  Sketch uses 1,794 bytes (0%) of program storage space. Maximum is 253,952 bytes.
    //  Global variables use 182 bytes (2%) of dynamic memory, leaving 8,010 bytes for local variables. Maximum is 8,192 bytes.
    //
    //  Serial.print(F("HELLO WORLD"));
    //  Sketch uses 1,812 bytes (0%) of program storage space. Maximum is 253,952 bytes.
    //  Global variables use 182 bytes (2%) of dynamic memory, leaving 8,010 bytes for local variables. Maximum is 8,192 bytes.
    //
    //  Serial.print("HELLO WORLD");
    //  Sketch uses 1,820 bytes (0%) of program storage space. Maximum is 253,952 bytes.
    //  Global variables use 194 bytes (2%) of dynamic memory, leaving 7,998 bytes for local variables. Maximum is 8,192 bytes.
    //
    //  Serial.print(F(" "));
    //  Sketch uses 1,802 bytes (0%) of program storage space. Maximum is 253,952 bytes.
    //  Global variables use 182 bytes (2%) of dynamic memory, leaving 8,010 bytes for local variables. Maximum is 8,192 bytes.
    //
    //  Serial.print(F("\x0d\x0a"));
    //  Sketch uses 1,804 bytes (0%) of program storage space. Maximum is 253,952 bytes.
    //  Global variables use 182 bytes (2%) of dynamic memory, leaving 8,010 bytes for local variables. Maximum is 8,192 bytes.
    //
    //  Serial.print(" ");
    //  Sketch uses 1,810 bytes (0%) of program storage space. Maximum is 253,952 bytes.
    //  Global variables use 184 bytes (2%) of dynamic memory, leaving 8,008 bytes for local variables. Maximum is 8,192 bytes.
    //
    // Serial.print(...
    Read more »

  • RC1 (release candidate 1)

    Arduino Enigma10/03/2019 at 05:34 0 comments

    Feature complete and code complete.  No apparent glitches. Testing time...

    https://gitlab.com/arduinoenigma/megaenigma

    http://people.physik.hu-berlin.de/~palloks/js/enigma/enigma-u_v25_en.html

  • Lots of Progress

    Arduino Enigma09/24/2019 at 04:16 2 comments

    The universal enigma engine seems to be working correctly

    Here are a couple of posts with the current project status:

    https://www.instagram.com/p/B2dJO-4n6Dr/

    https://www.instagram.com/p/B2dJO-4n6Dr/

    https://www.instagram.com/p/B2HatohnKy1/

  • The State of Both Machines

    Arduino Enigma07/28/2019 at 17:07 0 comments

    Current pictures of the machines:

    This is how I ended up doing the Transient Voltage Suppression (TVS) Diodes since the legs were a little wider than the holes on the board.

    And a little bit of Yak shaving. This is a programmable tester to make sure the LED display modules are not defective, custom made for this project.