Howto turn a DGT3000 into a DGTPi

DGT-3000 directly connected to Raspberry-Pi

In this article i shortly describe how to turn your DGT3000 into a DGTPi. Please be aware that if you make a mistake in your cabling you can destroy your DGT3000 or/and your Raspberry Pi. This article is therefore without any guarantee of any kind. Use this on your OWN RISK. You have been warned!

What i describe here is how we developers setup a DGT-Pi during it was not available around November 2015. Perhaps nowadays you can even have a Raspberry Pi Zero inside the DGT-3000 directly. But that needs abit more technical experience. Lets make it easy first.

The advantage for DGTPi is that it directly communicates with the Raspberry over I2C instead of using the board. That makes it alot quicker. Also you can enjoy the full 11 digits of the chess clock.

Howto setup the I2C connection with the DGT-3000 chess clock

You can connect a Raspberry Pi directly to a DGT3000 by using a standard 3 wire jack plug and connecting it to 5 pins on the Raspberry. Do not plug the jack into an E-board as they work on 5V which the Pi can’t handle.

  • The base of the jack is ground and needs to be connected to one of the ground pins of the pi. For Example pin 14.
  • The second connection of the jack is SDA and needs to be connected to both the I2C master and I2C slave SDA. These are on pins 3 and 12.
  • The tip of the jack is SCL and needs to be connected to both the I2C master and I2C slave SCL. These are on pins 5 and 35
My own cable
Cables on the RaspberryPi Side

So far the cabling. Now the DGT3000 is directly connected over I2C to the Raspberry Pi. The board is connected like before (over USB or Bluetooth). For the picochess software, you need to tell it to use the “dgtpi” flag. This flag will let picochess communicate over I2C instead of using the board. Thats all you need to change from software – but if you don’t it won’t work. Please also be careful, if you change this in your picochess.ini file, you must be sure, you won’t use this image anymore for a standard DGT3000. If you return, you must also deactivate this dgtpi flag.

If you did all correctly, the next startup of picochess using the quick direct connection so you have something similar to a sold DGT-Pi. Enjoy!

34 Comments

  1. Very good description, thx – worked for me,I did not know that the solution was that simple. The Next week I try to integrate a Pi nano w into a DGT 3000 clock.

    • Hi Marion,
      thats great. If you done with your nano-W, perhaps y can send me some (inside) pictures for updating this side?!? Good Luck.

  2. Thanks for this hint, Jürgen! I’d like to try and turn my DGT3000 into a DGTPi, too. What kind of cable should I order? I’m not at all familiar with the world of cables and connectors…

    • Hi DirkJan,
      I dont know the names either (esp. not in english). I took them from a local electronic selling shop and connect it with this white “Lüsterklemme”. Sorry.

  3. Hallo, can you send me a pictures with Detail of Cabel-Connection.
    After this i put CD-Card with Picochess 0.83 to have no Problems with .ini.

  4. Hi Chess-Fans,
    the modification to a DGTPI-Clock works fine.
    The Clock is now faster, and i have now 11 Digits on the Display.
    Very nice to play with the “new” Clock.
    And i think it is not so difficult to made for everyone.
    But watch out which Color of the Cable belongs to the Tip of the Jack-Plug for example.
    Use preferably a Electronic measurement to find the right cable.

    Here 3 Pictures:
    http://www.bilder-upload.eu/show.php?file=f66293-1499878976.jpg
    http://www.bilder-upload.eu/show.php?file=36d045-1499879021.jpg
    http://www.bilder-upload.eu/show.php?file=3569ac-1499879043.jpg

    Thx to Jürgen for the Documentation.

    Greets Stefan

  5. Hey Jurgen,

    Do you have the communication detail to DGT 3000? I know about I2C communication, but I don’t have the e-board. Would like to try to connect to DGT clock via an embedded demo boards etc just to experiment.

    Thanks.
    WH

    • Hi WH,
      you can take a look in the “dgt” folder for various files esp. pi.py , board.py and in the “test” folder for the H-file.
      The I2C communication is done from the dgt so-lib in “etc”. The sources you can find under jromang/dgtpi in github.
      Hope that helps,
      Jürgen

  6. Juergen

    Can you please help. My DGT PI board went out. When I took the PI apart the six wires from the clock to the board came out. Do you know the pin out. There is a yellow, white, red, green, blue and black wire. The come from the 1/4 jack and need to plug in to raspberry board.

    • Hi Tom,
      im not sure, i understand you correctly. You opened your (buyed!) DGTPi, and found 6 cables, not connected?
      Mainly DGT can answer this. Well, i can ask them, if i get a chance…Can take abit time (right now).

  7. Hi Jürgen,

    this is a nice and easy DIY indeed (and again makes me wonder about the type of collaboration between picochess and DGT 😉 ) I’m gonna do this with a PicoZero, I wanna see if the I2C type communication fixes my issues. I think(!) the space should be sufficient to fit the Zero board into the clock. Power has be to external I guess (no room for bats), but this is not an issue. For now, I plan to just turn the mini circuit board with the 3.5 jack by 180deg. This should allow a USB power cable to pass through the hole already present in the clock case and connect the 3.5 jack “internally”. One additional hole on the other side of the clock for the USB-to-board cable and I should be set — damn, I should have scraped the cash for the BT board, than I would not need an extra hole in the case 😉 Anyways, later I might go for some nice plugs instead of dangling cables once I got this to work.

    I have a question concerning a “final design” if indeed the Zero board fits inside the clock case: Looking into the interior of my clock I think the simplest way of connecting Pi and clock might be directly via the 5 point mini-plug directly next to the 3.5 jack leading to the clock-board as this can simply be unplugged (left hand side in the above pic). Do you by any chance know the pinout of this plug and/or the according sequence for the I2C pins? Because then the 5 wires from the GPIO pins could directly be connected to the clock via this (compared to a 3.5 jack much smaller) connector.

    And yet again: thanks for your time and efforts you put into PicoChess!

    cheers,

    Jack

  8. Hi Jürgen,

    while waiting for my PI zero to arrive, I soldered together a cable to use with my current PI3 to test the general setup. The I2C interface is really great compared to the ‘via-board’ communication, nice speed – much snappier!

    I just have one issue/question: I had a small touchscreen attached to my PI up to now, but this also used the GPIOs, so I had to remove it and now enabled the picochess services to control the PI.
    My question is: What is the right “combination” of services with this DIY DGTPI? Using the DGTPI services hangs picochess already at startup. Using the picochess service ONLY will not shut down the pi and copying the dgtpi-ones in addition makes shutdown with two queens work, but the PI seems to reboot several times before it really shuts down: I see the “PICOCHESS version 0.9d” and “Goodby” message several times, until the pi finally is really down.

    How to do this properly?

  9. Hi Jürgen,

    it does not crash at all, it just reboots twice before finally shutting down. But thats only a minor issue! I’ll look into the service files once I’m done with the hardware.

    I just finished my first game against Stockfish 8 on my brand-new RasPi Zero using the DgtPi setup. Now the zero has only to find its place inside the clock…

  10. update from my side: I got my Zero inside the clock working.

    I’m using the 5pin plug on the mainboard of the clock for the connection to the Zero and actually removed the small board-piece with the 3.5 jack completely to gain some space for wires.

    The pinout of the plug is actually very simple:
    PIN 1 (red): Ground
    PIN 2 : GPIO 5/35
    PIN 3 : GPIO 3/12
    PIN 4 : Ground
    PIN 5 : Ground

    Just some further thoughts on this:
    – one might think of powering the clock via the PI. Using the 3V GPIOs “kinda” works, but these do not provide enough power. The “low bat” sign of the clock is on all the time and the display is quite dim => this would require a step-down connected to the 5V pins, which could be easily done.

    – the reverse, powering the PI from a bat would also be an idea, but stepping-up the 3V from the clock bats would probably not last very long. Putting a LiPo inside the case might be a really tight fit and probably a stupid idea, anyways.

    – I’m working on a MARKII of my setup involving my original Pi3. I’m gonna report back in case I get this working as well.

    • Hi Jack,
      i talked shortly to DGT and they replied as following:

      When you supply using 3v on the jack the battery icon always turns on ( if you take out the batteries)
      The pi can easily supply power enough power for the clock.
      The clock has an boost regulator, so it can work on any voltage between 2v and 3v on the battery terminals or supplied through the jack. you can also directly supply 3v3 to the right pins
      In any case power should not be low, you can however have the battery icon turned on if you don’t supply to the battery terminals

      Hope that helps.

  11. hm, thanks for the info – that sounds interesting. For my tests I removed the clock bats and attached the 3V of the Pi GPIOs to the terminals on the back of the bat housing. If DGT says this is OK, then I might do it this way. The max power these pins provide is difficult to find on the web explicitly – many, many different opinions…
    I will do some further testing as I’m still waiting for a part for my “MARK II” project to arrive before I fix my final design.
    But in fact I am quite happy with my current “PicoPi” – even though the difference in speed between the zero and the Pi3 is quite massive.

      • Hi Eric,

        yes, no problem. I’ll upload the stl or I’ll post the tinkercad-link. But be warned, the model has two small bugs: the holes for the rear plugs are 1-2mm too far to the side of the USB plugs and the wall is too thin for ABS, it is actually flexible. But the rest is OK.

        • OK, here is the tinkercad link:

          https://www.tinkercad.com/things/26EQFegGT5e-picopi-base/editv2?sharecode=huHbEI-QEAbUQ1KWuU-RICJqXJ45sm7LHUcQ5F6eHPs=

          Disclaimer: This was my very first 3D model ever. I am providing the model as is, fit for nothing and without any guarantee that it is useful for anything. So you have been warned: It may eat any DGT3000 or PI it gets in touch with.

          And just in case this still did not scare you away, here are some notes if you plan to use the model as is:

          1. Make the BACKSIDE thicker! The rest is OK, just the backside with the power/display/headphone is TOO THIN => Make it as thick as the front/left/right part.
          2. There is a small shift in the backside holes for the plugs, nothing you could not fix by a rasp.
          3. The four tube-like holes fit the outer screw-holes of the clock case.
          4. The four larger holes were made for the rubber feet of the original base of the clock case. They are a tight fit, so some polishing is needed here after printing, but I would not really make them larger.
          5. Mainly due to its size I guess, this model is not really cheap to print. I had it printed in ABS (see pic above) and this shipped for approx. 40€.

          6. Just in case you fix the above issues: please share the update, I might re-print mine with some further add-ons later, once I decided on how to power the whole thing (internal LiPo vs. external power bank?).

          cheers

          Jack

          P.S: my Raspi3 died on me – well not entirely, the Wifi is dead (hardware wise as it seems, although Bluetooth is stull operational – strange). I’m therefore using my Zero inside the case atm.

          • Thanks a lot Jack 🙂
            A friend of mine have a 3D Printer and we’re going do try printing it.
            Ok for the advice on the thin backside, i hope my friend can modify the scheme on Tinkercad.
            Sorry for my short answer, english is not so easy for me lol 😉
            Cheers,
            Eric

  12. OK guys, I finally completed my PicoPi.

    I’m now using the 5-pin plug to power and drive the clock via the Raspi3 which is sitting in the case I showed above. It nicely fits underneath the clock so that the whole thing looks much like the original DGTPI.

    Concerning the wire-up I now can complete what I wrote above,
    the 5-pin plug can indeed also power the clock:

    RED
    —————————–
    | 1 2 3 4 5 | 5-pin connector from the 3.5 jack
    —————————–
    6 5/35 3/12 1 6 RASPI GPIO pins
    3.3V

    This way I can remove the bats from the clock with just one downside as Jürgen wrote above: the low bat sign is now ON all the time (but so what).

    So this is now more or less my final design, I think I’ll just add a LiPo to power the whole thing as I have now the space for the LiPo and the charger/booster board in the base.

1 Trackback / Pingback

  1. DGTPi Advantages (Part 1) - Picochess.com by LocutusOfPenguin

Leave a Reply

Your email address will not be published.


*