Skip to content

This project is designed for the STM8L051F3 microcontroller. It drives two TRIAC thyristors using GPIO outputs and reads input from a current sensor connected to the ADC. The operation of the TRIACs is controlled based on the state of a tilt switch connected to a GPIO input.

License

Notifications You must be signed in to change notification settings

okemal/STM8L051-switching

Repository files navigation

STM8L051-switching

Description

This project is designed for the STM8L051F3 microcontroller. It drives two TRIAC thyristors using GPIO outputs and reads input from a current sensor connected to the ADC. The operation of the TRIACs is controlled based on the state of a tilt switch connected to a GPIO input.

Features

  • TRIAC Control: Drives two TRIAC thyristors using GPIO pins.
  • Current Sensing: Reads current values from an ADC-connected sensor.
  • Tilt Switch Input: Monitors a tilt switch to determine whether to turn TRIACs on or off.
  • Efficient MCU Utilization: Designed specifically for the STM8L051F3 microcontroller.

Pins Configuration

Pin Nb PINs FUNCTIONs LABELs
3 PA0 SYS_SWIM SWIM
9 PD0 GPIO_Output LED_RED
10 PB0 GPIO_Output LED_GREEN
12 PB2 GPIO_Output BUZZER
14 PB4 ADC1_IN14 CURRENT_SENSOR
16 PB6 GPIO_Input TILT_SWITCH
17 PB7 GPIO_Output TRIAC_1
18 PC0 GPIO_Output TRIAC_0

Installation

To get started with this project, you will need:

  1. STM8L051F3 Microcontroller: Ensure you have the STM8S001J3 microcontroller available.
  2. Development Environment: Install the Cosmic IdeaSTM8 or a compatible IDE for STM8 development.

Steps:

  1. Clone the Repository:

    git clone https://github.com/okemal/STM8L051-switching.git
  2. Load the project file in IdeaSTM8: Use the .prjsm8 file in the root folder. In IdeaSTM8 it's Project-->Load-->STM8L051-switching.prjsm8

About

This project is designed for the STM8L051F3 microcontroller. It drives two TRIAC thyristors using GPIO outputs and reads input from a current sensor connected to the ADC. The operation of the TRIACs is controlled based on the state of a tilt switch connected to a GPIO input.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published