Electric Vehicles Smart Meter System Design

About the project

This system design implements the data display via LCD screen OLED12864.

Project info

Difficulty: Moderate

Estimated time: 1 day

License: Apache License 2.0 (Apache-2.0)

Story



Details

Intro:

This project was built with AB32VG1 microcontroller as the main controller, and the open-source RT-Thread IoT OS is adopted. This system design implements the data display via LCD screen OLED12864.

Code Open on: https://gitee.com/lk3/project/tree/master/

The project has been completed:

(1) Cruise control (speed limit is 25Km/h);

(2) OLED screen to display speed (0-36km/h);

(3) Support to display Year, Hour, Minute & Second, convenient for viewing the data;

(4) LED simulation alarm when the speed is too fast;

(5) Adjustable resistance as the electric vehicle throttle for speed control.

Hardware Specification

Kernel Part: Multithreading, multitasking scheduling, semaphores, mutexes, etc.

Component Part: Hardware ADC, analog IIC, RTC, etc.


Pin Distribution

VCC 5V;

GND

SCL: PE6

SDA: PE7

Sliding Varistor:

100K: (ADC function) (Both sides of the Tap connects 3.3~5V)

IO: PE5(adc0)

Acquisition voltage 0-3.3V, (acquisition accuracy: 10 bits)

LED:

PA1: (Blue)

Button:

F1: (Mark: S2)

Software Specification

  • The whole project was developed underRT-Thread Studio IDE
  • C programming language
  • The code adopts some part of semaphores and mutexes to ensure thread synchronization, and seamless switching is achieved through multithreading task scheduling.
  • OLED display execution function in display.c
  • OLED underlying driver function in oled.c
  • Key execution function in button.c
  • ADC function in adc_val.c

Presentation

图片

图片



Credits

Photo of RT-Thread

RT-Thread

An Open-Source Community-Powered Real-Time Operating System (RTOS) Project!

   

Leave your feedback...