Skip to content

teknologisk-institut/S367_made_esp32_display

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Screen

This repo contains code that uses an ESP32 Screen to show the angle and controls a stepper motor. It has a main menu to choose between the two operational modes and in each you have different controls and visuals.

Hardware and wiring

ESP Display Hardware:

  • Board: ESP32-2432S028
  • ESP type: ESP-WROOM-32
  • Stepper: 17HS4401 (somehow the version we have in hand has an angle step of 0.45° = 360/0.45 = 800 steps/rev)
  • Stepper driver: MicrostepDriver, TB6600

Wiring

ESP32-screen - Motor Driver:

  • Screen: Use CN1 port (the other will not work, as GPIO35 is only input and 21 is used for backlight screen)
    • Red: Not used (3.3V)
    • Yellow: Step (GPIO 27)
    • Blue: Dir (GPIO 22)
    • Black: GND
  • Motor Driver
    • EN: active_low (Should be GND)

Motor Driver - Stepper Motor:

Blue & Yellow: phase 1 Red & Green: phase 2

Development:

Custom libs

Som custom libraries has been made. Even though they are not necessarily reusable they are used to maintain a fairly short main.cpp file. These are placed in the /lib folder.

Setup using VSCode

For the first test use: this tutorial for the display and this tutorial for VSCode setup

Use the following:

  • Board: upesy_wroom
  • Framework: Arduino
  • Update libdeps (is already added to the platformio.ini file)
  • Replace the generated .pio/libdeps/uepsy_wroom/TFT_eSPI/user_setup.h with the setup_files_backup/User_Setup.h file (#define TFT_RGB_ORDER TFT_BGR and #define TFT_INVERSION_ON uncommented)

USB permission from computer

  1. Test if board is recognised
    ls /dev/ttyUSB*
  2. Make sure user is in dialout group
    groups
    sudo usermod -aG dialout $USER
    Log out and in to make the change

TODOs

Need:

  • Displays how the angle continously is simulated and shown on the screen
  • Can control a stepper motor
  • Connecs inputs and stepper motor with presaved distances, simple calibration and regular control (back and forth)

Nice:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 55.9%
  • C 44.1%