Close
0%
0%

GEOGame

An electronic geography game

Similar projects worth following

The project will be an IRL version of Guess the country. There will be a spinning globe with LEDs behind to light up a specific country, the user will then have to guess the country out of 4 propositions on a screen.

IT part : We will be using an AML-S905X-CC microcomputer with the Raspberry Pi OS in order to have a simple database of all the countries we would like to include in our game. It also allows us to manipulate the motor to make the globe spin. We'll also add an interface where the propositions for the 4 given countries will appear, the player will be able to select an answer with a touchscreen.

Mechanical part : We will be using an encoder motor in order to know what position the globe is currently in and have a coordinate system.

Electrical Part : The microcomputer and the motor require different supply voltage. That is why a buck converter will be used to convert a 12V signal into a 5V one. We'll be able to connect the motor in parallel with the 12V supply, and then connect the microcontroller to the new 5V signal.

We will also be using adressable LEDs in order. They will be installed behind the globe and won't move. The globe will be transparent to allow the light emitted by the LEDs to be visible.

UPDATE : After multiple tests and issues, the final build used a Raspberry Pi 3. Instead of an encoder motor, we decided to use a regular 5V DC motor (ref : 28BYJ-48) and track the position using the number of steps directly in the code, making things easier for us in the end. Thus, the buck converter was no longer needed.

GeoGame Code.py

Main Python code which includes the motor Code, the calculations as well as the interface

x-python - 7.28 kB - 06/15/2023 at 20:39

Download

Code Motor.py

Code for turning the motor in any directions when given a specific value (in degree)

x-python - 3.03 kB - 06/15/2023 at 20:39

Download

countries.csv

Excel containing all the countries as well as their GPS coordinates

Comma-Separated Values - 4.27 kB - 06/15/2023 at 20:39

Download

Code LED.py

Code for making a specific LED light up when given a number

x-python - 1.25 kB - 06/15/2023 at 20:39

Download

countries.py

Code making the calculation from GPS coordinates to degrees matching the scale of our globe

x-python - 555.00 bytes - 06/15/2023 at 20:39

Download

  • 1 × Globe cut in half Obviously we needed a globe with openings at the bottom and the top in order to let the arch for the LEDs to go through at the bottom and the motor at the top
  • 1 × Raspberry Pi 3 Model B This card contains all of the coding part and we can code in python which allows us to make interfaces for the Game
  • 1 × Stepper motor (ref: 28BYJ-48) This component is a key component as it makes the globe turn to get to the x axis of the country (latitude). This stepper has a decent torque so that it doesn't damage and/or become inaccurate
  • 1 × Driver (ref: ULN2003A) This allows us to control the motor and make it turn in clockwise and counter-clockwise directions
  • 1 × LED band (ref: WS2812B) These LEDs are used to pin point the country chosen in the y axis (longitude)

View all 12 components

  • Final version

    come.meyer06/15/2023 at 22:36 0 comments

    We've taken some extra time to add improvements to the project. We took a new driver (it was the reason why the motor was stuttering and not working previously) for the stepper and finally changed the card to a Raspberry Pi 3 Model B. That allowed us to use the RPi.GPIO library which is much simpler and well optimized. The code for the Motor works flawlessly and we can now turn in both ways (backward and forward), we've also added a command to turn off the driver completely after the code ends so that the stepper doesn't overheat and bug. We have a working code for the LEDs but they just won't light up, we're afraid we burnt them and we don't have an extra band at disposal. We also made a couple tweaks so that it's easier to troubleshoot issues, part are much more easier to disassemble. Here's a working video of the final project : Final Project.

  • Motor Problems

    come.meyer06/15/2023 at 22:22 0 comments

    Unfortunately the code not being well optimized because of the gpiod library, the card and the stepper overheating overtime, it created some problems. The motor that was spinning over 512 steps per revolution was stuttering and was spinning over a random number of step which made the x-axis completely inaccurate: Stuttering motor.

  • It spins!

    come.meyer06/15/2023 at 21:51 0 comments

    We made quite some progress, we worked in parallel on the code and on the wiring. We encountered serious difficulties when using the Libre Le Potato card as it doesn't accept common Raspi libraries for the GPIOs so beware when you're using the gpiod library as it is not well optimised and uses lib libraries which are not always updated. But we finally managed to make the motor spin after a long night : Spinning Motor Video (don't mind us whispering, it was very late)

     

  • First Steps

    come.meyer06/15/2023 at 21:34 0 comments

    In the end, we stayed with the idea of making the globe spin from above. We started to work on the physical parts of our project. Using a couple planks, we made a sturdy wooden structure that will hold the motor from above. We've also manually bent a metallic bar in order to make an arch that will hold the LEDs inside the globe.

  • PyQt5 Interface (probably the final version)

    thibault.douillet06/15/2023 at 21:21 0 comments

    The tkinter library is great for positionong each component where you just need to specify at which pixel you would like to place a button or a label. However, functionality-wise, it's quite bad, we discovered that there was a problem with the button functions as they are executed without the buttons being even clicked. We tried a lot of solutions found on the Internet but nothing worked. Our last resort is to change libraries and go with PyQt5. Now this library isn't great for placing components as the only way to do so is through layouts. However the buttons work perfectly. After a bit of work, we found the perfect layout for our interface. We decided to remove the score as our main priority was to finish more important things such as the rotation of the LEDs or the motor spinning.

  • Motor issues/extra ideas

    thibault.douillet06/15/2023 at 21:14 0 comments

    After further reflection, we noticed that our major issue would probably be the rotation, we are delaying the building part of our project because we're trying to anticipate on other issues. We've had new ideas like making the globe spin horizontally which would remove the risk of the globe falling if it is held from the top, plus who said that the North was up and  not on the side. Another idea was given by one of our supervisors, advising us to use a wheel brushing the side of the globe to make it spin and a potentiometer to track the position. Correcting positional error caused by the wheel wouldn't be a huge issue. 

  • First interface

    thibault.douillet06/15/2023 at 21:07 0 comments

    The first iteration of our interface using the tkinter library. For now the only functionality is changing the button labels when clicking on them but we'll add the other functionalities later on.

  • First project ideas

    thibault.douillet06/15/2023 at 20:46 0 comments

    For now we've just made a few drawings, to have a general idea of what we want to do. We still don't know wether the globe will be spinning from the bottom or the top. We had a few other ideas as you can see below :

View all 8 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates