AVRelay - Self Programming Pocket AVR Game Console

2,845

42

11

Introduction: AVRelay - Self Programming Pocket AVR Game Console

About: I am 20 years old Polish teen :D I play electric guitar, like programming and arduino :)

Hi!
I want to show you my project "AVRelay". It is a pocket mini AVR computer. It loads system on startup so you are able to load from SD card game or app. On video you can see older version of system, now it has GUI ;)

There are two Atmega328. First processor is called "SDLoader", second is main processor (it is connected to LCD and buttons). Both CPUs are connected via I2C (Wire Library) for communication and serial port to loading .HEX program from SD card through SDLoader to Main CPU. To code SDLoader I usedBootDrive project.

For example on startup SDLoader loads system program then user picks game. Name of this game is sending via I2C to SDLoader and it loads this game by serial :)

Video is in Polish (so you can translate it ;P).

Step 1: Part List:

  • double dip switch (power and sound on/off)
  • small potentiometer (for LCD backlight)
  • 6x tact switch
  • buzzer
  • 18650 cell (we need 4.2v - 3.6v)
  • SD card module
  • Nokia 5110 LCD
  • 2x 16Mhz crystal
  • 2x dip28 socket
  • 2x Atmega328P-PU
  • 2x universal plate (or make your own SMD ;))

  • male and female goldpin connectors (to construct console and optional external pinout)

And Arduino (UNO/MINI/LEO) to program CPUs of course (HOW to to this).
Hmm but if you want do this project on breadbord you can always use two Arduinos ;)

Step 2: Connection:

Buttons are connected using "Pull Up resistor" so we don't need external.

Main CPU:

  1. pin 0 - pin 1 SDLoader
  2. pin 1 - pin 0 SDLoader
  3. pin 2 - buzzer
  4. pin 3 - LCD CLK
  5. pin 4 - LCD DIN
  6. pin 5 - LCD DC
  7. pin 6 - LCD RST
  8. pin 7 - LCD CE
  9. pin 8 - A BUTTON
  10. pin 9 - B BUTTON
  11. pin 10 - UP BUTTON
  12. pin 11 - DOWN BUTTON
  13. pin 12 - RIGHT BUTTON
  14. pin 13 - LEFT BUTTON
  15. pin A4 - pin A4 SDLoader
  16. pin A5 - pin A5 SDLoader
  17. RESET - pin 6 SDLoader & by 470 resistor to 5v
  18. AND 16Mhz CRYSTAL!

Pins: A0, A1, A2, A3 are free (they can be used for external modules).

SDLoader CPU:

  1. pin 0 - pin 1 Main CPU
  2. pin 1 - pin 0 Main CPU
  3. pin 6 - RESET Main CPU
  4. pin 10 - SD CS
  5. pin 11 - SD MOSI
  6. pin 12 - SD MISO
  7. pin 13 - SD SCK
  8. AND 16Mhz CRYSTAL!
  9. RESET - by 470 resistor to 5v

LCD:

Backlight pin by potentiometer to 5v.

Buzzer:

Through dip switch to pin 2 Main CPU.

Optional: by led to RX or TX if you want hear booting ;)

Step 3: Thats All!

I am using THIS LCD library.

HEX files of yours programs are crated every time when you click "upload code to arduino". They are in temp folder. More about this HERE! :)

I hope that I helped in something and that you like my project :)

Thats my first bigger DIY, thanks for reading :)

Arduino All The Things! Contest

Participated in the
Arduino All The Things! Contest

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    11 Discussions

    0
    ramandeephora13o3
    ramandeephora13o3

    Question 8 months ago

    If I make some necessary changes in the code, can I replace the main cpu with an Arduino or even an esp32?

    0
    pokulan
    pokulan

    Answer 8 months ago

    Atmega328 is in Arduino UNO so it is the same :D
    Esp32 will not work out of the box.

    0
    ramandeephora13o3
    ramandeephora13o3

    Reply 8 months ago

    Thanks a ton! Btw, do you know the changes necessary to add an esp32?

    0
    pokulan
    pokulan

    Reply 8 months ago

    I am afraid I can't help you with esp32 :/ It is very old project and I don't have experience with ESP.

    0
    dunk8888
    dunk8888

    4 years ago

    WHY DIDNT YOU USE SPI FOR THE 5110,?

    0
    pokulan
    pokulan

    Reply 4 years ago

    Couse it is conflicting with SDcard reader :)

    0
    dunk8888
    dunk8888

    4 years ago

    NICE PROJECT PAL ;-)

    0
    redspl
    redspl

    5 years ago

    I waited a long time for a project like that. Shame for me i didn't did that :P

    pokulan++ za bycie polakiem. Geszyly geszyly geszyly gek.

    0
    acheide
    acheide

    5 years ago

    Nice.

    0
    seamster
    seamster

    5 years ago

    Very cool project!

    0
    pokulan
    pokulan

    Reply 5 years ago

    Thanks :)