Sunday, May 10, 2015

Robot First Step out into the real world.





Look mom no wires!!!
ok Robot is no longer hardwire to my computer we gone wireless.
This is really becoming fun.



I looking at ROS networking and will try to get my ROS VM and RPi talking to have a distributed computing environment. This will also let me start using rqt. rqt is a software framework of ROS that implements the various GUI tools. This will let me do some more checking out of the robot.

Maybe even a few programs.
  • plot position of the robot
  • to drive straight
  • program to drive square

Saturday, May 9, 2015

ROS twist command







ok just a quick post but code looks to be working. ros arduino bridge. Teensy as the base controller and a raspberry 2 as the ROS master.


Monday, April 20, 2015

Quadrature encoder


A review of Quadrature encoder.

A quadrature encoder, also known as an incremental rotary encoder measures the speed and direction of a rotating shaft. Quadrature encoders can use different types of sensors, optical and hall effect are both commonly used. No matter what type of sensors are used the output is typically two square waveforms 90° out of phase as shown below.



If you only wish to monitor the speed of rotation then you can use either output and simply measure the frequency. The reason for having two outputs is that you can also determine the direction of shaft rotation by looking at the pattern of binary numbers generated by the two outputs. Depending on the direction of rotation you will get either

00 = 0
01 = 1
11 = 3
10 = 2

or

00 = 0
10 = 2
11 = 3
01 = 1

 By feeding both outputs into an XOR gate (exclusive OR) you will get a square wave with twice the frequency regardless of direction. This can be useful as it allows one interrupt pin to monitor both encoder inputs.




41 
42 static void rightISR()
43 {
44  bool newRightB = digitalRead(RIGHT_B);
45  bool newRightA = digitalRead(RIGHT_XOR)::^ newRightB;
46 
47  countRight += (newRightA ^ lastRightB) - (lastRightA ^ newRightB);
48 
49  if((lastRightA ^ newRightA) & (lastRightB ^ newRightB))
50  {
51  errorLeft = true;
52  }
53 
54  lastRightA = newRightA;
55  lastRightB = newRightB;
56 }
57 






Sunday, April 12, 2015

Some work on smaller robots for a Programming Robots Study Group basecontroller.

Worked on controller board today.



Did not get as far as I had hoped. Real life just gets in the way. Hopefully this will be finished up this week. Then back to coding for it.








Monday, April 6, 2015

Some work on smaller robots for a Programming Robots Study Group

 Programming Robots Study Group

Robots are coming! Let’s be ready to program them. 

   

       This study group is ROS centric. Class material will be based upon Ubuntu 14.04, ROS Indigo and Android. Other operating systems may work but we chose Ubuntu as it is ROS’ supported platform.

     We’re targeting a simple, inexpensive platform. The magician chassis is simple, inexpensive and easy to assemble. It’s sufficient for an initial platform.




This is what the motor look like.


I have replaced them with.

 


Note the extended back shaft. Now I got these motor out of a kit from servocity.
   Now i got Magnetic Encoder Kit for Micro Metal Gearmotors from Pololu. Now it is designed for their Micro Metal Gearmotors. Which are smaller then the above. After a modifying both the magnet and circuit board. The encoders provide a resolution of 12 counts per revolution of the motor shaft when counting both edges of both channels. To compute the counts per revolution of the drive sprockets, multiply the gearboxes’ gear ratio by 12



Currently I testing Teensy 2.0 microcontroller with a H-bridge (SN754410).

 

Quadrature encoder transitions are often detected by monitoring both encoder channels directly. However, since transitions on the encoders can occur at high frequencies (several thousand per second) when its motors are running, it is necessary to use the 32U4's pin change interrupts or external interrupts to read the encoders. To reduce the required number of interrupt pins, I have XORs together both channels of each encoder and connects the resulting signal to an interrupt pin, while channel B of each encoder is connected to a non-interrupt pin: The XORed signal and the channel B signal can be used to reconstruct the channel A signal by simply XORing them again: (A XOR B) XOR B = A. For both encoders, channel A leads channel B when the motor is rotating in the forward direction; that is, A rises before B rises and A falls before B falls.


Right most of the work is going into writing code for the Teensy. 


  • H-Bridge driver
  • Encoder driver



  


Wednesday, February 25, 2015

Design notes

Some Design notes information.

Base design info

 Drive Motor Sizing



To calculate the required torque, power, current and battery pack required by a wheeled mobile robot, there are several principles that must be understood.


  • Concept of vectors
  • 2D Force balance
  • Power
  • Current and Voltage.


Check out the Drive Motor Sizing Tutorial

Design inputs 

  • Total mass: 10 lb
  • Number of drive motors: 2 [#]
  • Radius of drive wheel: .04mm
  • Robot Velocity:  .2 m/sec
  • Maximum incline: 20 [deg]
  • Supply voltage: 12  [V]
  • Desired acceleration: .2 m/sec
  • Desired operating time: 120 minutes
  • Total efficiency: 65 [%]

Output (for each drive motor)

  • Angular Velocity: 47.771 rpm / 5 rad/s
  • Torque*: 70.257 ozf-in
  • Total Power: 2.4810 W
  • Maximum current: .20675 A
  • Battery Pack 0.8 Ah 

Motor

131:1 Metal Gearmotor 37Dx57L mm with 64 CPR Encoder

12V brushed DC motor with a 131.25:1 metal gearbox and an integrated quadrature encoder that provides a resolution of 64 counts per revolution of the motor shaft, which corresponds to 8400 counts per revolution of the gearbox’s output shaft.

Dimensions


  • Size:  37D x 69L mm
  • Weight: 8.1 oz
  • Shaft diameter: 6 mm

General specifications


  • Gear ratio: 131:1
  • Free-run speed @ 12V: 80 rpm
  • Free-run current @ 12V: 300 mA
  • Stall current @ 12V: 5000 mA
  • Stall torque @ 12V: 250 oz·in


Wheels

Pololu Wheel 80x10mm Pair - Black

The wheels have silicone tires and measure 80 mm (3.15″) in diameter.

Equation

Speed = (RPM (diameter * PI) / 60)

Speed = ( 80 rpm ( 80mm * pi / 60)
Top Speed = 335.1 mm/sec / .3351 m/sec/ 1.1 ft/s / 13.195 / in/sec

Tuesday, January 27, 2015

Robot Main Computer info


This is one of the first Mini-ITX boards that I have found made with Bay Trail cpu. It is the Intel Quad-Core Celeron Processor J1900 (Bay Trail) and it looks pretty interesting. For starters the boards embedded processor comes with a passive CPU cooler. Wanting a fanless on the robot. This can be done since the Intel Celeron Processor J1900 that runs up to 2.41GHz has a max TDP of just 10 Watts!

If you look a little closer you’ll notice that a 24-pin ATX power connector is missing from the board. That is because ASRock designed this board to fit in very compact Mini-ITX cases and ditched the traditional power supply and put a DC-in power jack on the rear I/O panel! Since this board runs on DC power it could also be useful to those wanting to build a PC for a car or anything else running on DC.Like a Robot....

ASRock Q1900DC-ITX Mini-ITX Motherboard Features:

  • Intel Quad-Core Celeron Processor J1900 + Mini-ITX Motherboard
  • All Solid Capacitor design
  • Supports DDR3/DDR3L 1333 memory, 2 SO-DIMM slots
  • 1 PCIe 2.0 x1, 1 mini-PCIe
  • Graphics Output Options : D-Sub, DVI-D, HDMI
  • Built-in Intel 7th generation (Gen 7) graphics, DirectX 11.0, Pixel Shader 5.0
  • 7.1 CH HD Audio with Content Protection (Realtek ALC892 Audio Codec)
  • 2 SATA3, 2 SATA2, 4 USB 3.0 (2 Front, 2 Rear), 4 USB 2.0 (2 Front, 2 Rear)
  • 1 x Print Port Header, 1 x COM Port Header, 1 x DC-In Jack (Compatible with the 9~19V power adapter)
  • Supports A-Tuning, XFast LAN, XFast RAM, USB Key



Monday, January 26, 2015

Robot update


Ok been awhile but i been busy with real work and family. I wish I had more time to work on my robot. But anyway I did get some time this weekend. The picture above is of the main brain on the left. and of the base on the right. The base firmware is working. The main computer is working and has ROS (Robot Operating System) Hydro. Note the computer has a fan right now but it is not needed. 

Main Computer 


  • ASRock Q1900DC-ITX Intel Celeron
  • 8GB RAM
  • 128GB Internal Solid State Drive (SSD)

Base controller


  • Arduino Mega2560
  • Pololu VNH5019 dual motor controller shield
  • Robogaia Mega Encoder shield 

Right now every looks good. Having a problem with one motor. Plan is to get Ping sonar and Sharp infrared sensors added to the base controller next.