Building a Puzzle Box

sundial.com

New Website!

The process for building your Reverse Geocache™ Puzzle box just got a lot easier with the unveiling of The Sundial Group’s new website http://sundial.com, which promises to be a “community” site for all things relating to the fascinating device.

Builders

Builders will be especially interested in Sundial’s new Notes for Builders section, which offers kits and instructions to make the build process simpler than ever.

Buyers

People who want to buy Quest Boxes can now do so directly at the Sundial Shop.

Page last updated on March 1, 2013 at 8:55 pm
148 Responses → “Building a Puzzle Box”

  1. Derek

    13 years ago

    I think I speak for everyone when I say we are eagerly awaiting the secrets of the box. I’ve had the parts sitting around for month’s trying to build one! I’ll be checking back soon for the code!


  2. will

    13 years ago

    Will using a traditional on/off switch disturb the attempt counter in the arduino code?


  3. Mikal

    13 years ago

    @Will,

    Nope. The attempt counter is stored in non-volatile memory (EEPROM).


  4. will

    13 years ago

    Thank you! I am making my first arduino clone to use in this project! It is very exciting to create a programmable gift I don’t need to disassemble afterwards. Now, to solder the lcd screen! Thanks again for all the documentation!

    Will


  5. will

    13 years ago

    I am using a 16 by 2 character lcd. When I write lines longer than 8 characters I get an error saying : invalid conversion from ‘int’ to ‘const char*’

    After looking at the LiquidCrystal library I noticed that your sketch appears to use an 8 by 2 display with 16 by 2 code. What am I missing in order to write across the entire display?
    Thank you for the help!

    Will


  6. Mikal

    13 years ago

    Will,

    If you’re getting a compiler error, that means that something else is going wrong. The sketch is designed for 8×2 displays, but merely lengthening the messages won’t give you a compiler error. Can you share the code that’s causing the problem?

    M


  7. will

    13 years ago

    I normally operate within the 8 by 2 limit but here I have changed the welcome text in a failed attempt to display “Welcome to your”, “puzzle box” each phrase on its own line. I am trying to use the whole 16 by 2 screen in this manner. In the lcd example library simply stating the 16 by 2 screen with lcdbegin (like you do in the sketch) allows me to write these phrases without a problem

    NOTE: i am using a relay auto turnoff circuit instead of the pololu switch. this is noted in the comments but the switch pin still reads “pololu switch off” Other modifications include servo angles and radius.


  8. Mikal

    13 years ago

    Will, can we continue this discussion in email? I don’t see any reason why you should get a compiler error, but WordPress sometimes munges code. Also, I’m interested to learn more about your relay switch design.

    mikal at arduiniana.org

    Mikal


  9. will

    13 years ago

    Sure! how about we discuss it using the brand new arduino forum! I will send you a message there with my code.


  10. will

    13 years ago

    I sent you the code on both the new and old arduino forums. The new messenger did not seem to respond, but it should show up in your box on the old forum.


  11. Cody

    13 years ago

    Hi Mikal,

    Thanks for the instructions. I love your work on this. I am about to make my own box and since I have prior knowledge using the arduino from building a robot I hope I can make this happen. I will be using it to propose to my girlfriend(I’ll keep you update). One quick question. After reading through this parts list and the following soldering instructions I noticed that I may need more quantities of some things than just 1 of each. I was wondering if you could add quantities next to each item in the list?

    Again thanks so much.

    Cody


  12. Mikal

    13 years ago

    Fair point, Cody. The only things you really need in multiple quantities are the capacitors (2) and of course lots of header pins.

    Thanks, and please do keep us up to date with your story!

    Mikal


  13. James

    13 years ago

    Hi Mikal,

    You mention your custom shield, is this something that you are selling upon request, or is the artwork available on the site? I couldn’t find it anywhere.

    I’m really keen to make my own box, though I must admit I’m not too hot on the electronics. Are you able to make an ‘electronics only’ box on commission, that just needs a good box being built around it?


  14. Cody

    13 years ago

    Hi Mikal,

    Thanks for the shield. I have everything soldered to it but I am having trouble with the GPS. The thing is my friend had a spare gps module with a better reception (it works indoors). It still uses NMEA but for some reason I can’t get a reading from it. I suppose this would have something to do with the code. Its a Ublox GS407 gps module. Any ideas?

    Thanks,

    Cody


  15. Mikal

    13 years ago

    Cody, there are two steps to debugging a GPS problem. First, examine (print out) the stream of data from the chip. Is there any data? Is it binary? (hopefully not). Are there missing characters?
    Once you’ve established that the data is made of good, solid, NMEA statistics, query the TinyGPS statistics. Are characters being received? Sentences? What’s the failed checksum count? If the latter is high, that may be a sign that characters are being dropped.

    Mikal


  16. Ken

    13 years ago

    I tried to download the skeleton code but it seems like the link is broken. I know it used to work before so something must have happened recently. Would you be able to fix it?


  17. Mikal

    13 years ago

    Hmm… it seems to be browser specific. Try again…

    Mikal


  18. Ken

    13 years ago

    Well, it’s working now and I’m using the same browser. That was odd.


  19. Eric

    13 years ago

    Hey Mikal,
    Thank you for sharing such a cool project. I have a troubleshooting problem I hope you can direct me on. My unit functions correctly when the usb cable is plugged in, but not when powered by the 4 AA battery box. It displays text OK (I’m using that to debug) and the GPS is powered and blinking, but the if (nss.available()) test never succeeds. If I leave it running and attach the usb cable, I get an immediate position read – leading me to believe the gps is working and ready to deliver a position. Both 3.3v & 5v traces read apx the correct voltage (~3.4 & ~5.65)


  20. Mikal

    13 years ago

    Eric, are you using my shield? It’s designed to take 2AA batteries. (The voltage regulator module is a *boost* regulator; I wouldn’t expect goodness from 4AA batteries.) On the other hand, if you are not using my shield, I don’t know. 5.65 V seems too high for a 5V bus though.

    Mikal


  21. Randy

    13 years ago

    Hello Mikal,
    It’s Randy Thornton. I spoke with you via email in early February about building a box with minimal experience. I’ve purchased all of my parts now and after being away on business for all of March am now ready to start building! After reading all of the comments here to date it would appear that I am indeed the most basic beginner with electronics attempting this project and I am STILL very ambitious and excited. I hope there are other beginners that can benefit from my painfully simple questions.

    1. I assume I place the components (ie switch) on the printed side of your shield
    2. It seems as though I would solder the pins to the shield from the back side but to the components (ie switch) on the top side of the components.
    3. Do I just “snap” the switch button onto the switch board or do I also solder it into place?
    4. Do I lay the 6-pin GPS JST connector on it’s “back” that the 6 little pins are facing into the center of the shield while the plug opening is near the each of the shield? (It will cover up the printed letter “H” in this configuration) You don’t solder all of the 6 little pins do you? Do you solder it at the two bottom corners of the female opening?
    5. The two 8-pin headers are soldered in the inner rows (printed rectangle around them) not the “twin” matching rows at the edge of the shield PCB. Correct?

    Please forgive my very elementary questions! As a very beginning novice these questions are not obvious to me. Thanks so much for your support and making such a fun project available to all levels of enthusiasts!

    Randy


  22. Mikal

    13 years ago

    Randy, thanks for posting your questions. They are all great…!

    1. Yes. Everything goes on the printed side, though with the 1.1x shield the 2×8 display pins extrude downwards.
    2. Right. (I think.) First thing is to put the 2 6-pin and 2 8-pin banks of pins long-side downward into the Arduino female sockets. Then place the shield on top of the pins and start soldering!
    3. If you have that little switch button PCB you should solder it to the pins as well.
    4. Yes, exactly right. The connector covers the “H”. (They make two varieties of the connector: a “horizontal” one and a “vertical” one. Either could fit here, but the one I recommend is the horizontal variety.) But yes, you should solder all six pins carefully and individually. And yes you should solder the two big pads near the opening as well. They are crucial for support. (It’s quite annoying to painstakingly solder those 6 tiny pins only to have the connector rip away and ruin your board!)
    5. No, the pins to the Arduino go in the outer rows. (You’ll see that they line up that way when you do step 2.) Here’s a picture of the 1.0 shield fully populated. The inner rows of holes are just there in case you want to add some other gizmo to your design.

    Thanks!

    Mikal


  23. Rex Thomen

    13 years ago

    Mikal,
    I am a huge fan of old wooden boxes, and also a geocacher. I would love a box to be able to send my wife of 24 years back to our hometown where I proposed. Could you please contact me about selling me one, or assisting an old dog doing a new trick?

    Rex


  24. Cody

    13 years ago

    Is there any way I could have the schematics for your 1.1 shield. I have ran into lcd screen problems.


  25. Randy

    13 years ago

    Mikal, your responses were exceptionally helpful!

    Some questions of clarification…

    1. From item (1) above you mention the at “the 2×8 display pins extrude downwards.” That means that the long side of the straight header pins go down? This is because the display cable will connect from the bottom side of the shield assembly? It actually looks (now that I’m studying the photo) that the long side of the pins extend upward and you are simply saying that these header pins are being soldered (extruded) from the bottom side of the shield PCB.

    2. To clarify my previous item #2 above. The header pins must be soldered to the shield PCB from the bottom but the must also be soldered on the top side of the Pololu switch module as well. Correct? Further, I’ll want to snip off the extra length from the longer side of the header pins after soldering will I not?

    3. From item (3) above… I do have the switch button PCB. But they also supplied a very small button with a pin of sorts on each end. I thought, at first, that this “snapped” into the switch PCB. On further observation of the photo I don’t see this part on your assemble shield. I’m assuming this is NOT used as the switch “pins” from the switch PCB go to the metal button on the box via the printed circuitry on the shield PCB.

    It’s coming along! The photo you provided is turning out to be an awesome help! Thanks again.

    Randy


  26. Craig

    13 years ago

    Mikal,
    I’ve started to recieve parts for my puzzle box and am very excited to begin construction! I saw the picture of the 1.0 shield and was wondering if you could post pictures of a fully populated 1.1 Reverse Geocache Shield?


  27. Mikal

    13 years ago

    Rex, I’m pretty fond of old boxes myself. Wonderful idea! I see you have also sent an email. Let’s talk!

    Mikal


  28. Mikal

    13 years ago

    Hi Randy–

    1. Yes, in the 1.1 shield the “long” side of the straight header pins does go down so that the ribbon cable connects to the underside of the shield. (This makes for a somewhat thinner assembly than the earlier shields.) That means, if you think about it, that the actual soldering occurs on the top of the shield.
    2. Yes, yes, and yes (probably). I always snip off a little excess on the pins that float the two Pololu modules.
    3. Ah, yes, I see. You can discard the tiny pushbutton that comes with the Pololu switch. The pins that it jumpers are indeed routed through the PCB to the external button.

    Have fun…!


  29. Mikal

    13 years ago

    @Craig–

    Isn’t it fun when all those parts roll in? Good idea on posting a nice photo. I’ll get one.

    Mikal


  30. Rex Thomen

    13 years ago

    Hi everyone, just to shout out that I have ordered all the pieces and parts for the puzzle box. This is my first foray into electronics and arduino so it will be interesting. I have Mikal has already voiced his support, any advice you guys have with tricks or tips to make this a smoother transition would be great. Now, come on USPS!

    Rex


  31. Craig

    13 years ago

    @ Rex

    This is my first foray as well! Mikal isn’t lying when he says that JST connector for the GPS is tricky, took me a couple tries but I got it! Not sure if this is the “right” way to solder but what I ended up doing was placing a very small amount of solder on each connection point prior to placing the connector. Then I simply held the JST connector to the shield with one hand and reheated the solder with the other. Seemed to work out, guess we’ll find out when the Arduino goes to retrieve GPS data!

    Good Luck!


  32. Mikal

    13 years ago

    Here’s what I do to solder that little GPS connector. First, melt a tiny bit of solder to ONE of the small pads. Second, press the connector down into place while remelting that single dollop of solder. Now the connector is fixed in place, solder each of the other legs. You might make a solder bridge. That’s ok. Use a little solder wick to clean up the mess.

    Don’t forget to solder the two support areas towards the opening of the connector, otherwise you’ll easily rip the connector right off and lose all that painstaking work!


  33. Randy

    13 years ago

    Greetings All! Just to add my first go ’round with soldering the JST connector… I’ve done something similar to what Craig and Mikal have done, however, I put a small amount of solder on the fine tip of the soldering iron then touched it to the little pad on the shield PCB while holding the connector done in place. If you use this method don’t put too much solder on the tip as the “pad” will only hold so much solder and the rest will follow the tip back off the PCB leaving a solder “spike” sticking up from the board.

    Using a very fine gauge (0.022″) of solder seems to be helping me as well. Maybe even a bit too small. Can take quite a length of solder for some connections.

    Having a blast but a little fearful when it comes time to power it up!


  34. Jens

    13 years ago

    Mikal – it is coming together also here.
    Do you have pin assignments for the 1.1 Shield?
    I already changed RX from 2 to 4 to make it work, and LED pin from 12 to 2. But how about the LCD assignments?

    static const int GPSrx = 4, GPStx = 3;
    static const int LCD_Enable = 11, LCD_RS = 10, LCD_RW = 7;
    static const int LCD_DB4 = 19, LCD_DB5 = 17, LCD_DB6 = 18, LCD_DB7 = 16;
    static const int pololu_switch_off = 15; // Pololu switch control
    static const int servo_control = 9;
    static const int LED_pin = 2;

    Jens


  35. Eric

    13 years ago

    Thanks for your feedback, Mikal.

    It works! Here’s a link to my variation: http://dustrude365.blogspot.com/2011/03/twenty.html

    It was, and continues to be, a hit…


  36. Mikal

    13 years ago

    Jens, I should make this clearer, but the sample code above already includes the pin assignments for the 1.1x shield.

    Mikal


  37. Mikal

    13 years ago

    Eric, I can certainly understand why that is a hit. It’s beautiful, mysterious, whimsical, heartfelt, and tender all at the same time. And the video is nice too. Congratulations! Thanks for sharing!


  38. Cody

    12 years ago

    I AM ENGAGED!!! And the box performed amazingly! If any body wants to see my variation of the box visit http://www.codystamps.com Thanks Mikal for all your help and your shield. That really made things easier.


  39. craig

    12 years ago

    This may be a silly question, but as I said I’m fairly new to this. I can’t tell from the markings in the shield which way the capacitors are supposed to go. Does it matter? Thanks!


  40. Mikal

    12 years ago

    Hey, congratulations, Cody! Thanks for sharing!


  41. Mikal

    12 years ago

    @craig–

    Good question. No, those little ceramic capacitors are symmetric. Put them in either way round.


  42. Craig

    12 years ago

    Thanks for the help! one more polarity question though. In your picture you have the hot wire from the battery pack going to the left terminal on your shield (when looking at it with the pololu switch up) but it seems that you have the positive marking on the shield on the right side. which is it?


  43. Mikal

    12 years ago

    @Craig — There’s a little hidden twist there. The + wire goes to the hole closest to the “+” on the silkscreen.


  44. Noj

    12 years ago

    This project rocks. Mine is working like a charm, unfortunately I either burned the button or it was defective and I’m just waiting for a new one from Singapore ::Sigh:: I found that two batteries don’t work for me, I’m using an older Decimelia board from Arduino.

    In terms of voltage, the arduino Uno page (and others also) state that they designed to work up to 20 volts, and that’s no problem. They have a voltage regulator for the 5v bus and in fact they state they might not work right with less than 7 volts!

    “The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.”

    http://arduino.cc/en/Main/ArduinoBoardUno


  45. Mikal

    12 years ago

    Hey, thanks Noj.

    I’m surprised that the button doesn’t work and that the 2 AA solution doesn’t work. If you want to test the circuit without the button, simply short the middle two pins of the 4-pin header briefly.

    To address the voltage, yes, the normal way things work is to supply 6+ volts to the Vin line, which the on-board regulator reduces to +5V. But my shield circuit bypasses the Vin and the on-board regulator, supplying the +5V signal directly from the boost regulator module. I would expect the shield to work on a Diecimila. It’s been tested on both a Duemilanove and a Uno.


  46. Noj

    12 years ago

    Thank you Mikal! That’s good information about the voltage, I was wondering if the voltage regulator was being bypassed. I don’t know what’s up with 2 batteries, but the LCD doesn’t light up. I will try to diagnose further.

    In the meantime I’ve been shorting the black and yellow and testing with great results. All I need is the button and hopefully it will be all done.

    Thank you again for making such a fun project possible.


  47. Mikal

    12 years ago

    Noj, does the LCD light when you power from the USB cable? If not, something else is going on. Here are some general diagnostic suggestions:

    1. Make sure the software matches the shield version. The posted software works with the 1.1x shields, but if you have a 1.0 shield, you simply change the #if 0 to #if 1 near the top.
    2. On the 1.0 shield the display pins extend upwards from the shield. The ribbon cable connects to the top of the shield. On the 1.1 shield, the pins are reversed and extend downward. The ribbon cable attaches to the underside of the shield.
    3. Make sure that pin 1 on the shield is connected to pin 1 on the display.


  48. Ryan

    12 years ago

    Mikal,

    Just received the final order from SEEED—sure is exciting getting all these little parts boxes and putting it together. It works wonderfully except I was having the same (I think) problem with my pushbutton LED as @Noj The button function works, but the LED did not light. Testing the LED with a simple blink sketch it worked fine. Solution::: LED_pin is defined in the first part of the sample code, but not implemented later on, so all one has to do is add the following to the void setup section:
    /*Turn on switch LED*/
    pinMode(LED_pin, OUTPUT);
    digitalWrite(LED_pin,HIGH);
    and the coorosponding digitalWrite(LED_pin,LOW); in the void poweroff section.

    Also made the same mistake with the display…tip for future makers–make sure the ribbon connector is oriented correctly.

    I’ll be sure to upload pictures of my box when its finished.


  49. James

    12 years ago

    I have everything working except the switch LED. If I put 3v to the switch (1st and last pins) the blue LED lights fine but not when I connect to the shield, push the button, etc. What should the voltage be across the first (#1) and last (#4) header pin connected to the switch? I’ve tried to trace the wire on the pcb but it disappears behind the header. Any hints as to which of my solder joints I’ve messed up?


  50. James

    12 years ago

    I tried to comment yesterday but it has not appeared. I am having trouble getting the LED in the switch to light. I am seeing only 0.2v on the +ve pin of the 4 leading to the switch and I believe this is the problem. The switch works ok when the battery is used so it is ‘working’ but it will not light when the LCD lights. Do you have any ideas? Thank you.

1 Trackbacks For This Post
  1. Interessante Arduino-Setups | wer bastelt mit

    [...] the-reverse-geo-cache-puzzle [...]

Leave a Reply