This page describes the project named Accelerometer Based Self balanced Horizontal Platform, which is a part of the Embedded Systems-1 course. The aim of this project is to build a Self balanced Horizontal Platform that makes always zero elevation angle irrespective to the elevation angle of the base.
Introduction
A vehicle moving on slop having a chance of falling the objects in it. Sometimes dedicated objects may damage or that may be damage or spoiled other items in the vehicle. In hospital when a person on wheel chair or stretcher moving on ramp, it feels problem or sometimes it may fallen. To avoid these circumstances this project “Self Balanced Horizontal Platform” has been designed. This project provide a platform that remains always horizontal irrespective to the elevation angle of the vehicle.
This project operate on the principle of detecting the elevation angle of the platform by using an accelerometer whose output goes to controller that drives the motor to reduce the elevation angle of the platform. Hence it is a closed loop system that gives a platform that makes always zero elevation angle.
Component
- STM32L Discovery Board Details
- LSM303DLM Accelerometer
- Motor driver
- DC gear motor
STM32L Discovery Board Details
The STM32L Discovery board is based on an STM32L152RBT6 and includes on-board ST-Link/V2 debug interface. The main features of the board which were used in this project are:
- The external 3V supply pin which can be used to provide power to Accelerometer add-on board.
- The GPIO ports brought out to sides of the board.
- Built-in I2C module
The programming of this board can be done on the open-source tool chain as described in the article – Getting Started with STM32L-Discovery Board.
LSM303DLM accelerometer Add-On board
The LSM303DLM is a system-in-package featuring a 3D digital linear acceleration sensor and a 3D digital magnetic sensor. Features Used
- Analog supply voltage: 2.16V to 3.6V
- One axis acceleration channel (X, Y or Z axis)
- ±2g/±4g/±8g dynamically selectable full-scale
- I2C serial interface. I2C is used in burst-read mode with STM32L as master and LSM303DLM as slave. Address for the accelerometer is 0x32h. Other register used are as follows:
Data sheets can be referred for detailed definitions of each register bit.[2]
The schematic of the add-on board can be found here : LSM303DLMTR
Motor driver L293D
It is a push-pull four channel driver with diodes.
Features
- 600mA output current capability per channel
- 1.2A peak output current (non repetitive) per channel
- Enable facility
- Internal clamp diodes
Description
The Device is a monolithic integrated high voltage, high current four channel driver , accept standard DTL or TTL logic levels and drive inductive loads (such as relays solenoids, DC and stepping motors) and switching power transistors. Datasheet can be found here ([4])
DC Geared Motor
Specification:
- RPM 100
- Torque: 1.5 kg.cm
- Shaft Diameter: 6mm
Interconnection Details
The following are the connections to be made between the STM32 Board, accelerometer and motor driver IC L293D:
Circuit diagram of the project is shown below.
Working description
Flow Chart
Power Supply Design
As shown in circuit diagram 5V power supply is given to the STM32 board that is generated by regulator power supply designed with IC 7805. For driving DC motor a regulated power supply designed with IC LM317. As shown in circuit diagram accelerometer Ad-on board get 3V supply from STM32 board.
Point to be noted
This Self balanced Horizontal Platform can be design with precise mechanism such as hydraulic or pneumatic pump or gear drive, to reduce the response time with minimum error and required load capacity.
Applications
This self balanced Horizontal Platform can be used-
- In cars to keep dedicated items or foods.
- In vehicle carrying chemicals of other sophisticated items.
- In wheelchair to make the person always comfort and avoid the condition of falling on ramp.
- In stretchers to make patient comfort while moving on ramp.
Video
Source Code
The source code can be found on moodle.
Prepared By:
Harish Kumar Sharma
Recent Comments