Zwartoog

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts

  • Zwartoog
    Participant

    @DonZalmrol: did you check the NTP code in this package?
    http://sebastiaanbreedveld.nl/other/nixie/NixieClockWeatherStation.zip

    I also made some updates to the NTP code there.

    in reply to: Add WiFi shield? #25433

    Zwartoog
    Participant

    Great! That shield looks like a similar solution as mcpgza uses (and I tried to use before). It is basically an Arduino with separate EPS8266 on board. From a software point of view, they are two independent boards (just as if you would add an ESP later). This means that you will have to setup the communication manually over serial. So, you can have a look at my code for some inspiration on that.

    in reply to: Add WiFi shield? #25430

    Zwartoog
    Participant

    I think you will have to experiment with that. The simplest approach is to use a generic Mega with either an integrated or external ESP8266, and (re)use the source code I wrote (see link above) to communicate between the Arduino and the ESP.

    When only using an ESP8266-only board, the question is how compatible these boards are with generic Arduino code. Does it run “normal” Arduino code out-of-the box? If not, you will have to reprogram (parts of) the NCS code anyway. The good thing is that the code is fairly readable. In its bare basics, you can also only use the Nixie-indicator code and design your own program around it.

    From the hardware side, you will need logic-level-shifters for each pin to interface between 3.3V-5V, an ESP8266 with many pins (an Uno has barely enough pins to fully run the Nixie shield), and I guess you’ll have to apply 12V power on the shield directly (on the proper pin) otherwise the nixies will not lit. I really do not know if there are unforeseen pitfalls.

    So, if it is only for displaying your own numbers, you can probably get away with limited number of GPIO pins for the tubes and possibly the LEDs (require PWM). Also, you can use the indicator code as basic, and write your own code around it, which is very straightforward. Much of the pins are assigned for clock functionality (momentary push buttons, RTC, EEPROM, temperature, IR-function, serial-GPS, etc), and much of the code is around setting and displaying the time and so. Just keep in mind that you would want to implement some slot-machine like effect to increase the lifetime of your nixies, and possibly also want to turn them off.

    Anyway, just try. The worst thing that can happen is that you end up with “just” a Nixie clock πŸ˜‰ (given that you worked out the electronics carefully)

    in reply to: Add WiFi shield? #13020

    Zwartoog
    Participant

    Ok, the main part of the codes can be downloaded here:
    Nixie Clock Weather Station

    In the NCS code, replace MY_WIFI_SSID and MY_WIFI_PASSWORD with your own. If you want DST, create an account at timezonedb.com and enter your key also in the file.

    For the ESP, you need the files in that directory, and some libraries. One of them is the NTPClient, to which I made some updates (still need to push those changes them upstream).

    If you hooked up the ESP directly to serial, you can see if it works by giving some commands, like:
    PING
    GIMMETIME
    GIMMEACCURATETIME

    etc.

    Full tutorial still needs to be written, but this is a start.

    in reply to: Add WiFi shield? #13010

    Zwartoog
    Participant

    I used a generic ESP8266 module, nothing fancy. Just note that you need a logic level converter, since the ESP works on 3.3V and the Arduino on 5V. U used a 4 pin one, one for each connector (+, -, Rx, Tx). Also bring tools to program the ESP. I used the one-but-cheapest solution, by using a FTDI cable, and following these instructions (here they use an USB-FTDI module):
    https://www.instructables.com/id/How-to-Flash-Firmware-Update-for-ESP8266-With-FTDI/

    Cheapest version is to configure your Arduino as a USB-passthrough.

    On wiring: I used feather stackers and bended them 90 degrees. Feather stackers have long pins, and fit tight in the connectors on the board. Then I connected jumper cables to those stackers towards the ESP. What puzzled me the most was where to tap on the 5V juice. If you look at the Mega board, the right connector has +5V at the top 2 pins, and GND at the bottom 2 pins, see:

    Arduino Mega Tutorial – Pinout & Schematics

    It is unfortunately not that visible. I connected the serials to Tx3 and Rx3. Of course, use non-conductive tape to properly fix the jumper cables to the feathers, and the feathers to the board – you don’t want to risk a cable being pulled out easily, especially not when close to the high voltage circuit!

    On GPS timings: this has one huge advantage: your (great-)grandchildren will still be able to fairly accurately use the clock. It does not require any knowledge to use this option. For NTP, you already need to reprogram the board as soon as your WiFi network changes password.

    Anyway, this is one of the loose ends in my code still – if there is no WiFi or internet connection, the clock freezes. Proper solution would be:
    – if NTP works, use that
    – if last succesfull NTP sync > 7 days, fall back to standard option (use GPS if available)

    Another one is fixing the dot-blinking, so it blinks exactly 0.5 secs after each second update (now it has its own 1000 ms timer, which is by far not in sync with the RTC).

    I’ll post the “almost done” code soon and let you know.

    in reply to: Add WiFi shield? #13007

    Zwartoog
    Participant

    Hi,

    Yes, it works! I abandoned the Wemos solution: the board didn’t fit due to connectors in the centre of the board, and I fried the board when I tried to remove them :s

    Anyway, Arduino Mega + ESP8266 module works, and can be made to assemble properly πŸ™‚ NTP syncs up to sub-second accuracy, and I have even added automated DST adjustment. And much more.

    Just haven’t gotten the time to write it all down in a howto. πŸ™

    I can try to make the beta sourcecode available somewhere this weekend.

    Ciao!

    in reply to: PIR Sensor / Switch ON/OFF #12685

    Zwartoog
    Participant

    Good idea! I made something similar. I used a sound meter so all hardware could be fitted in a chest. I added this function to the doIndication ino file. Looking at it now together with Gra Afch’s solution, the bitshifts are very useless πŸ˜‰

    Not sure what the digitalWrite does though…

    
    void allNixiesOff()
    {
      // This is quite simple - just put everything to NULL
      digitalWrite(LEpin, LOW);
      unsigned long Var32 = 0;
      SPI.transfer(Var32>>24);
      SPI.transfer(Var32>>16);
      SPI.transfer(Var32>>8);
      SPI.transfer(Var32);
      
      SPI.transfer(Var32>>24);
      SPI.transfer(Var32>>16);
      SPI.transfer(Var32>>8);
      SPI.transfer(Var32);
    
      digitalWrite(LEpin, HIGH);    
      
    } 
    
    in reply to: Can't upload arduino sketch to nixie clock #12529

    Zwartoog
    Participant

    Also, if the above still doesn’t work: can you post the full output of avrdude?

    in reply to: Can't upload arduino sketch to nixie clock #12528

    Zwartoog
    Participant

    The serial monitor has the same interface amongst all Adruino’s (only some very cheap imitations have a different chipset), so it will give you the output anyway.

    In the Arduino menu, go to Tools->Board and select “Arduino/Genuino Mega or Mega 2560”. If you have an Uno, select “Aruidno/Gnuino Uno” instead.

    In the Tools->Processor, “ATMega 2560” is the most logical one for the mega. Otherwise, try the other one.

    I am not sure where you found the 328P in the menu, I can only select that for an Aruino Nano.

    in reply to: Can't upload arduino sketch to nixie clock #12509

    Zwartoog
    Participant

    Could be many things:
    – Which board do you have? Uno or Mega?
    – Did you select the proper board under Tools->Board?
    – Does uploading a simple Arduino program work?

    More ideas: https://stackoverflow.com/questions/19645441/avrdude-stk500v2-receivemessage-timeout/29135050

    in reply to: Add WiFi shield? #11408

    Zwartoog
    Participant

    I do not think that there is sufficient room between the Arduino and the NCS board.

    I also wish to add WiFi capability for syncing the clock by NTP, so I have ordered a board with integrated WiFi module: Wemos Mega +WiFi R3 ESP8266. No idea if it will work, but it seemed the simpler solution.

Viewing 11 posts - 1 through 11 (of 11 total)