JBalancePI

JBalancePI Robot

1.- Project Description

JBalancePI is a two-wheeled, self-balancing robot using Raspberry Pi 3 Model B with GPIO and I2C interfaces and Java 8. To control the robot's movement and balance, it uses three modules: a sensor that contains a three-axis gyroscope and an accelerometer (MPU-6050), a pulse width modulation (PWM) servo driver (PCA9685), and a motor driver (L298N). These modules create a feedback control loop that balances the robot and automatically corrects its position.

Balancing a robot is an example of the classic inverted pendulum problem, in which a large mass is placed at the end of a pole.

The robot is prevented from falling by giving acceleration to the wheels according to the robot's inclination from the vertical axis. If the robot tilts at an angle, then in the frame of the wheels, the center of mass of the robot will experience a pseudo force that will apply a torque opposite to the direction of tilt.


2.- JavaTech

PC with Ubuntu 16.04 LTE

Oracle Java ME SDK 8.3 for Ubuntu Linux
NetBeans IDE 8.1  -- JDK 1.8
Oracle Java ME SDK 8.3 Plugins for NetBeans 8.1

Raspberry Pi 3 model B

Raspbian Jessie Kernel 4.4
Oracle Java ME Embedded 8.3 for Raspberry Pi Model B (ARM11/Linux) 

Oracle Java ME 8.3 API

Device I/O API 1.1
Access and Control
General Purpose input Output (GPIO)  -- jdk.dio.gpio
Inter-integrated circuit bus (I2C) --  jdk.dio.i2cbus
Serial Peripheral interface bus (SPI) -- jdk.dio.spibus
Generic connection framework 1.8


Oracle Java(TM) Platform Micro Edition SDK 8.3

java.util.logging
java.nio


New API

com.jcruz.demos.gpio.driver.L298Device -- L298 Interface driver
com.jcruz.demos.i2c.GfxLibI2C -- Graphic OLED interface
com.jcruz.demos.i2c.driver.MPU6050Device -- MPU6050 interface driver
com.jcruz.demos.log.LoggingHandler -- Log manager
com.jcruz.demos.spi.driver.MCP3008Device -- MCP3008 interface driver 


3.1.- Control Board

3.2.- Battery and DC Motor Driver