Skip to content

ronberenstein/TouchScreenRelayPanel

Repository files navigation

Touch Screen Relay Panel

In this project, I've designed and built a relay control panel based on the raspberryPi board and 3.5" touchscreen.
The project is designated for 12v systems such as cars and small trucks. Using the touchscreen, the user can define what are the accessories he wishes to control and also decide on the representation on the display screen.
To implement this project the user should be lightly familiar with Python and Linux OS, and have basic knowledge of electronics.
In this work, I've used 8ch relay board and actually controlling 6ch (due to wire selection). The design also supports manual control using dip switch.

main img_20181213_161247-2

Materials and equipment

The materials that was used in this project are:

  1. RaspberryPi 3b+
  2. 5v 8ch relay board
  3. DIP Switch - 8 Position
  4. 12v step-down converter (12v --> 5v) (for example)
  5. 3D printer to print the case and cover
  6. 8 or more cord cable
  7. soldering and isolating equipment

Preparing the raspberryPi

  1. Before starting using the raspberryPi please follow the instructions here. In this work we will use the NOOBS installer with Raspbian.

  2. Prepare the touchscreen using it's own instructions.
    I used 3.5" TFT touchscreen from Kuman. To install that touch screen I needed to run the following command in the terminal:

    git clone https://github.com/goodtft/LCD-show.git
    chmod -R 755 LCD-show    
    cd LCD-show/
    sudo ./LCD35-show
    

    After rebooting the touchscreen will start functioning.

  3. Create new folder named TouchScreenRelayPanel and copy all the files from the git repo to the folder.
    Alternative method is to use git:

    git clone https://github.com/ronberenstein/TouchScreenRelayPanel.git
    
  4. Install guizero. Open new terminal (Ctrl+t) and enter:

    sudo pip3 install guizero
    
  5. After Raspbian is installed we will need to add the main program (main.py) to the raspberryPi autostart using crontab (tip).
    Open new terminal (Ctrl+t) and enter the following command:

    sudo crontab -e
    

    Select to open using nano. Add the following line to the end of the file:

    @reboot python3 /home/pi/Desktop/main.py &
    

    close and save using Ctrl+x and enter Y.

At this point the program should run every time the raspberryPi is starts.

Building the case

The raspberryPi+touchscreen case was created using 3D printing. CAD+STL files of the can be found here Alternative cases can be built using traditional techniques or using off the shelf electrical boxes.

4-4 1-1 2-2 3-3

Electrical diagram

We use the raspberryPi GPIO pins to control the relay board.
I used 8 cord cable (Ethernet CAT6 cable). 2 cords are dedicated to the 5v and ground inputs, leaving 6 cords for controlling the relay. By using 10 cord cable, all 8 relay channel can be utilized. The electrical connections are as follows:

electric connections diagram img_20181213_140627-2

Possible modifications

By replacing the images of the button, new type of button can be created.

Points for discussion

  1. I believe that the project can also be implemented using the raspberryPi zero.

Authors

Ron Berenstein - website

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

s - img_20181213_153851 s - img_20181213_153906 s - img_20181213_154007

Releases

No releases published

Packages

No packages published

Languages