4 Replies Latest reply on May 7, 2019 11:08 PM by airbornesurfer

    Raspberry Pi, creepy Zoltar Like Fortune Teller help

    realgeneralgrunt

      Hey everyone!

       

      I'm a puppet builder/composer/ jack of all trades working on my next project: My own original fortune teller machine.

       

      To get it out of the way right off the bat: I'm NOT a programmer. I can figure SOME stuff out but 99% of coding I'm not good at at all.

       

      Now onto my project:

       

       

       

      So thus far, I have gotten the entire automation done (not shown are the LED lights)

       

      I used a Mini Meastro 12 Servo Controller, 1 servo, and 3 LEDs (Monk RGB LEDs with built in resisters)

       

      The head is 3d printed from a model I did in Sculptris, and the music I composed myself.

       

      Now here are the remaining steps:

       

      Using a coin acceptor:

       

      https://www.adafruit.com/product/787?gclid=CjwKCAiAsoviBRAoEiwATm8OYB6kjzT62LsyP2nW9KEgcXrX4rUOxXm75hvwpg-ig9-FBbzy2ptia…

       

      to activate the sequence.

       

      To have the audio track play at the exact moment the sequence starts (the audio in the video is from my PC Speaker that I hit play to sync with the sequence)

       

      After the sequence plays, a random fortune is printed using a Thermal Printer:

       

      https://www.adafruit.com/product/597

       

      I'm using a Raspberry Pi 3 for this, but I also have an arduino uno.

       

      I was inspred by Matt's Mystic Seer build:

       

      Episode 365: Twilight Zone Fortune Telling Machine

       

      I'm hoping you all can help me finish the internals so I can start the build on the actual machine!

      Like I said, I'm NOT a programmer, so all help would be appreciated.

       

      Thanks!

        • Re: Raspberry Pi, creepy Zoltar Like Fortune Teller help
          shabaz

          Hi Chris,

           

          The usual way to get through projects like these is to do some programming or scripting, unless there is some similar project out there that can be copied closely.

          For doing it from scratch, some pseudocode needs to be written to approximately lay out how it could all work, and there you'd need to flesh out all your requirements, because some subtle things can change the code structure, for this type of project:

          The reason is, yours is not a trivial project, especially since although the requirements may at a high level sound simple, in reality as soon as you want to start doing things like slower/faster motion and more accurate syncing to music/effects, the coding will need a structure that can extend to this) so it's not a trivial bit of code anymore. You'll end up using concepts like threads or processes, and timers, and state machines. These are just some of the things you'd need to get up-to-speed on.

          Is there any project you've found via google that very closely meets your requirements? Then it could be easier to modify that.

          There are some people online that have a history in this type of animatronics, such as Lucy Rogers, there is a link to her video here:

          https://www.recantha.co.uk/blog/?p=15234

          Personally if I had to do this project, I'd try to follow her video (I've not watched it) or find another with this type of thing, and glean from there what hardware they used, and what programming language they found useful, and if they've shared any code.

           

          EDIT: One other thing, is to also explore stepper motors, since ungeared, they can make creepy-looking movements, plus they can be easily accelerated or slowed down, for better syncing, and they're quieter with no gears. It's just a suggestion, to rule in or out for your specific requirements for this project. Stepper motors however would require a driver board, they cannot directly connect to Pi/Arduino like hobby servos can. I don't know what Lucy Rogers used, but perhaps her presentations may discuss this.

          5 of 5 people found this helpful
          • Re: Raspberry Pi, creepy Zoltar Like Fortune Teller help
            realgeneralgrunt

            Hey Shabaz!

             

            Understand what your saying, believe me this isn't easy. There are a bunch of fortune tellers that people have made using the Pi and even an arduino. So the desired goal is achivable.

             

            So I'm trying out the Arduino right now. As of this point, I'm going to attempt to get my coin acceptor to activate the automation

             

            I used this code:

             

            https://channel9.msdn.com/Shows/themakershow/10

             

            for the coin acceptor, and now I need to figure out how to get it to play the automation I made with the mini maestro

             

            I'll figure out the music after that step, right now I just need to figure out the activation portion. I wired the coin acceptor and the mini meastro to the arduino but I need to figure out how to get it all to work.

             

            If this doesen't pan out I'll try the Pi as originally intended. I do like that uploading code to the arduino is just plug it in, open the software and upload. The pi is a bit finicky with Putty/SSH.

             

             

            If anyone wants to help me figure this out, or walk me through this on the arduino OR Pi, please don't hesitate to help.

            • Re: Raspberry Pi, creepy Zoltar Like Fortune Teller help
              airbornesurfer

              One quick note that you should be aware of: Unless they've updated them recently, the Adafruit drivers for this model printer DO NOT work with a PiB3, so you'll need a B2.

               

              Coin acceptor should just send a logic "HIGH" to a GPIO pin when activated. Use that as an interrupt on the Arduino to trigger your activation function.

               

              My best advice to get the electronics working is to make sure you're absolutely familiar with the code structures for each of the components that you're going to add. Get one thing (for example, the motor movement and synching it to the music) done first, then add the coin slot, the lights, etc. If you make the build an iterative process, it'll be that much easier to string everything together later!

              1 of 1 people found this helpful
              • Re: Raspberry Pi, creepy Zoltar Like Fortune Teller help
                airbornesurfer

                Hey, Chris! I was thinking about this project today and thought I would pop in to see how it's been coming along! Don't hesitate to reach out if you need help!