Hackaday.io Hackaday.io
Projects
Discover Contests Courses Stack
More
Courses Tutorials Events Hackerspaces Hackaday.com Tindie Marketplace
Sign up Log in
Close
0%
0%

Inverted pendulum on a cart

Building an inverted pendulum system with PID control. Trying to achieve swing-up.

dharshan-bashkaran-lathaDharshan Bashkaran Latha
Following Follow project
Liked Like project

Become a Hackaday.io member

Not a member? You should Sign up.

Already have an account? Log in.

Sign up with Github
Sign up with Twitter
OR
Forgot your password?

Just one more thing

To make the experience fit your profile, pick a username and tell us what interests you.

Pick an awesome username
hackaday.io/
Your profile's URL: hackaday.io/username. Max 25 alphanumeric characters.
Pick a few interests
Projects that share your interests
People that share your interests

We found and based on your interests.

Choose more interests.

OK, I'm done! Skip
Join this project
Similar projects worth following
3.7k views
1 comments
2 followers
1 likes
  • Description
  • Details
  • Files 0
  • Components 10
    • View all
  • Logs 9
    • View all
  • Instructions 0
  • Discussion 1
View Gallery
3.7k
1
2
1

Team (1)

  • dharshan-bashkaran-lathaDharshan Bashkaran Latha

Join this project's team
MISC
ongoing project
Inverted Pendulum control Robotics

This project was created on 09/22/2021 and last updated 4 years ago.

Components

  • 2 × 470mm 2020 Aluminum profile
  • 4 × 90mm 2020 Aluminum profile
  • 4 × 100mm 2020 Aluminum profile
  • 12 × 2020 aluminum corner L-clamp
  • 3 × 8mm steel rod (500 mm length) 2 for guide, 1 for pendulum

View all 10 components

Project Logs
Collapse

  • Test #3: Ultrasonic sensor HC-SR04

    Dharshan Bashkaran Latha • 05/01/2022 at 09:20 • 0 comments

    Using a HC-SR04 ultrasonic sensor to track the position of the cart. 

    Limiting the minima to 10cm and maxima to 45cm (~10mm clearance)

    I used a cardboard cut-out to mount the sensor, and also as a rebound surface, 

    Although the least count is 1cm here, the reading seems to be pretty precise.  

  • Test #2: Seeed magnetic encoder

    Dharshan Bashkaran Latha • 04/12/2022 at 14:36 • 0 comments

    Testing the magnetic encoder sensor from seeed with my Inverted pendulum system.

    Magnet used: 5mm NdFeB cube Magnet 

    Used a basic code of I2C comm. 

    The sensor was very accurate and consistent. 

    Looking forward to integrate the Ultrasounic range sensor next. 

  • Test #1: Stepper motor test

    Dharshan Bashkaran Latha • 04/11/2022 at 15:31 • 0 comments

    Inverted pendulum system using a Nema17 stepper motor, driven by Microstep driver

    Controlled by a Rotary encoder interfaced using arduino uno.

    inferences:

    • Better control achieved.
    • Pulsed motion.

    Further developments: 

    • Program modification for smoother motion
    • Need to verify structure integrity.
       

  • Test #0: Motor and mechanism trial.

    Dharshan Bashkaran Latha • 10/27/2021 at 16:48 • 0 comments

    Inverted pendulum system using 12V 775 DC motor, driven by L298N motor driver.
    Controlled by a joystick interfaced using an arduino uno.

    observations:
    - Irregular and abrupt motions.
    - Motor unable to provide enough torque
    - difficulty in precise controlling of the motor

    inferences:
    - Driver limitations 2A output per channel. Hence, could not provide enough torque for smooth            transmission.
    - Mechanism is smooth without the motor involved.

  • Final assembly

    Dharshan Bashkaran Latha • 10/27/2021 at 16:13 • 0 comments

    Complete assembly - belt, pulleys and electronics

  • 3D printing

    Dharshan Bashkaran Latha • 10/27/2021 at 16:10 • 0 comments

    PETG - 3D printed parts:

    1. Pendulum rod holder
    2. Motor holder
    3. Idler pulley holder
    4. Sensor holder

  • Assembly

    Dharshan Bashkaran Latha • 10/03/2021 at 14:22 • 0 comments

  • CAD model

    Dharshan Bashkaran Latha • 10/03/2021 at 11:38 • 0 comments

    Black parts are 3D printed parts. STL files to be uploaded soon. 

  • Materials

    Dharshan Bashkaran Latha • 09/24/2021 at 06:19 • 0 comments

    Attaching images of items procured. 

    Meanwhile designing models that need to be 3D printed - motor mount, base plate, etc.

    Soon to upload CAD models of the setup 

View all 9 project logs

Enjoy this project?

Share

Discussions

Log In/Sign up to comment

Become a Hackaday.io Member

Create an account to leave a comment. Already have an account? Log In.

Sign up with Github
Sign up with X
OR
adarshgovi wrote 05/03/2023 at 22:04 • point

I saw that you used a cube magnet with the Seeed magnetic encoder, but my understanding is that the AS5600 chip requires a diametrically polarized magnet which I am having trouble finding. Did you find that it worked well with the cube magnet? Is there anything special about the magnet in terms of polarization?

  Are you sure? yes | no

Similar Projects

A compact motor for home automation control of small roller blinds
Project Owner Contributor

A compact roller blind motor

paul-wallacePaul Wallace

The objective of the project is to create a precision linear motor by using an diy optical encoder similar to those used in printers.
Project Owner Contributor

Precision linear motor with diy photo encoder

mrozomrozo

Cheap 3d printed hi torque robot actuator with electronics
Project Owner Contributor

Hi torque 3d printed cheap robot actuator

pavel-gPavel G.

WiFi connected mini-blinds opener using ESP8266 microcontroller.
Project Owner Contributor

WiFi Blinds - ESP8266 IoT Device

paul-fjarePaul Fjare

Does this project spark your interest?

Become a member to follow this project and never miss any updates

Going up?

About Us Contact Hackaday.io Give Feedback Terms of Use Privacy Policy Hackaday API Do not sell or share my personal information

© 2026 Hackaday

Yes, delete it Cancel

Report project as inappropriate

You are about to report the project "Inverted pendulum on a cart", please tell us the reason.

Send message

Your application has been submitted.

Remove Member

Are you sure you want to remove yourself as a member for this project?

Project owner will be notified upon removal.