Category Archives: Robot

Robots and Electronics

Arduino Timer and Interrupt Tutorial

Arduino Timer and Interrupt Tutorial

This tutorial shows the use of timers and interrupts for Arduino boards. As Arduino programmer you have probably used timers and interrupts without even knowing it’s there, because all the low level hardware stuff is hidden by the Arduino API. Many Arduino functions uses timers, for example the time functions: delay(), millis() and micros(), the PWM functions analogWrite(), the tone() and the noTone() function, even the Servo library uses timers and interrupts.

Read More

Wall E Robot (object/sound recognition, AI)

Wall E Robot

This project is aimed to bring the Wall E robot from the movie into life! it will have a camera in one of his eyes, the information will be passed and processed in the computer, and commands are then sent via bluetooth back the Wall E robot. It can also recognised sounds, and can be controlled manually as a spy robot.

The source code you see in this project are written in C++ and with Qt Framework and OpenCV library.

=============================================
Flow chart

commands
PC ——–>——–>——–> Robot (Arduino)
PC < ——<——– Bluetooth ——> Air —–> Bluetooth —–> Arduino
Serial
communication

Read More

C++ Fast Trigonometric Functions

Introduction

To improve algorithm performance, one direct way is to shorten calculation time. The part that consumes the most computation power would be the trig functions.

The built-in trig functions are generally very good in terms of accuracy. But we don’t need that level of precision, so we can sacrifice accuracy to achieve faster speed.

We only use SIN, COS, ACOS and ATAN in our algorithm, so this post will describe only these functions.

Read More

Arduino 六足机器人 六足昆虫 六爪兽 及 源代码

介绍

此文章是对 Arduino Hexapod Robot 的总结及中文翻译。针对于六足机器人的算法,可以先看看:https://oscarliang.com/inverse-kinematics-implementation-for-hexapod-robot/  如果你还不知道什么是 IK,可以先看看 IK 基础:https://oscarliang.com/inverse-kinematics-and-trigonometry-basics/

因为我网上买了一套六足机器人的框架,但还没到,所以决定先用塑胶做一个小尺寸的用来验证算法。我从上一个版本(2DOF 六爪昆虫)回收了不少材料,除了身体。

Read More

Inverse Kinematics for Hexapod and Quadruped Robots

Inverse Kinematics Implementation for Hexapod Robots and Quadruped Robots Introduction

In my hexapod robot, I don’t normally control the leg directly, I only control the position of the body. Changes to the position of the body should be translated into changes to leg position. By using Inverse Kinematics, we can work out the angles of each servos, and the robot moves the way we wish.

Read More

Inverse Kinematics Basics Tutorial

Inverse Kinematics Tutorial Introduction

What is Inverse kinematics in robotics? With your robot having legs the position of those legs dictates where its feet are. Where its feet are dictate its point of balance.

As you might know “balance” can be defined as the robot’s centre of mass (affectionately referred to as its centre of gravity) being between its centre of pivots (i.e. the edges of where its feet contact the ground). If the centre of mass is above the centre of pivots and between them the robot will balance (almost an unstable equilibrium, if you’re an applied mathematician. If the centre of mass is above but outside the centre of pivots (i.e. beyond the edges of his feet) the robot will overbalance and fall.

If you feel confident about the Inverse Kinematics basics, you can jump to 

Implementation of IK on Hexapod robot:

https://oscarliang.com/inverse-kinematics-ik-implementation-for-3dof-hexapod-robot/

here is an implementation of a 3 DOF hexapod robot which I built using IK: 

https://oscarliang.com/hexapod-robot-with-3-dof-legs-degree-of-freedom/

Read More

Simple Hexapod Robot Using Arduino


This Simple Hexapod Robot is more like a downgrade from my last robot. The quadruped robot I was trying to build didn’t actually quite work though I spent quite a lot of time, but I have unfortunately underestimated the difficulty. So I am stepping back, and start from something easier, a Simple Hexapod Robot that uses Arduino.

I originally thought Hexapod Robot are not easier, as they have 6 legs and therefore more complicated in the programming. It turned out to be wrong because it’s much easier to balance as there are 6 legs. When it’s walking, we don’t need to worry about the center of mass and so on in order to balance, we just need to think about where to place the next leg in order to move.

Read More

Visual Basic Arduino Controlled Through USB

Visual Basic Arduino. So, Why?

When we are debugging and testing our circuits and codings, most of the times we reset the Arduino board and upload the new program. But the thing is everything has a finite lifetime, and by doing harmful things to the body would even reduce life quicker. Visual Basic Arduino.

Just like smoking could kill you, repetitively uploading could kill your arduino too! I still remember I read from somewhere, and someone said an Arduino board has an average uploading limit of about 1000 times… I don’t know if this is true, but if we could avoid doing something that could harm the arduino, then why not?

So here we are, I was looking for a way to test and develop new moves and gaits for my hexapod robot. But frequently uploading new codes really cost me time and risking killing the arduino, so I thought it would be nice to test it just by sending the arduino a command through USB connection (Serial communication), therefore the possibility of program uploading could be minimized.

This is also useful when we use bluetooth to control arduino.

And, How?

Arduino has already provided a serial communication class, and there are built in examples of how to use them. Here is the official doc:
http://arduino.cc/en/Reference/Serial

I will first try to establish a basic class and working Arduino program in the Arduino development IDE, and then move on to write a VB program to provide better and more user friendly interface. I will also publish my source code in the near future.

Read More