November 23, 2008, Sunday, 5:27
Shoutbox

Loki Off The Shelf Advanced Robotic Platform

From GizmoGarden

(Redirected from Loki)
Jump to: navigation, search

Contents

[edit] "Ideas Great and Half Baked"

[edit] How to build your own advanced robotic platform with off the shelf components

Loki - serving dinner
Loki - serving dinner
Loki - Large scale advanced robot platform built from a wheelchair
Loki - Large scale advanced robot platform built from a wheelchair

[edit] abstract - work in progress

We are on the edge of another technological revolution – Robotics. My goal is to build an advanced robotics platform with inexpensive, off the shelf components (Wheelchair base, PC, DIO card of some sort, and a multi-functional robotics software framework). If your robot software runs on common hardware (mac or pc) then it will have access to a vast amount of amazing software! There are open source packages for AI, vision recognition, speech recognition and navigation to name just a few.

A wheelchair base seemed to be a logical choice for my robot. Public doors and access ways are built to be accessible to the dimensions of a wheelchair. Many of the design considerations which have been integrated into a wheelchair, I would have not considered. For example, the wheelchair base I am using has a nice suspension system, which was lacking in other robot designs I have built from scratch (SwifferBot, Icebox_Robot).

Today, the computer hardware many companies are throwing or donating away, is more than sufficient to make a sophisticated robot. Many companies will "upgrade" their employees machines to new computers and put the older models on auction. Sometimes companies will donate these computers, you just need to ask. There is a organization in Portland, OR which has a program called FreeGeek where you can adopt a computer for 24 hours service.

[edit] original author

--GroG 10:32, 26 March 2008 (PDT)

[edit] license type

[edit] steps

[edit] wheelchair - removing uneccessary parts

These motors resistance measured about 2.4 Ohms - There are 2 deep cycle marine batteries in series feeding the motors 24 Volts. Through Ohms Law I = V/R - this rates the motors at about 10 Amps.

[edit] those pesky brakes!

Hello? What's this at the end of the high current motor?
There is the root of at least some of my problems - a 24 volt brake, not energizing it will cause it the brake to engage and my circuitry to heat-up
We'll have to remove it. Don't throw it away, we can use it for another project! I'll add it to that huge pile of junk hiding in my basement.  ;P

[edit] create your own h-bridges

What not to do. "use little orange wires", now "little black wires" ... the magic smoke has left....
What not to do. "use little orange wires", now "little black wires" ... the magic smoke has left....
I created my own H-bridge circuits with 4 mosfets to deal with the high current of the wheelchair motors. What I didn't do is create overload protection. Another fatal flaw: It did not dawn on me, the high pitched whine of the pre-existing circuitry was pulse width modulation PWM. My control circuitry just simply turned the bridge on and off. Turning the bridge from on to off created a large spike in current and voltage. This fried the gate of the mosfet. Of course it fries in a state that the platform goes full speed forward with one wheel. It smashed a small cabinet and hit a concrete wall in my basement. After hitting the wall, the motors stalled and this dumped lots of current into my H-bridge (ala flambé).

[edit] how to power a computer on a mobile bot

The little Pico 12V to ATX power converter. Very clever little design, used in car manufacturers now to put MicroATX sized computers and smaller in your vehicle.
Here is the little Pico working with Der Werker :)

[edit] power log

2 marine batteries wheelchair wired in series for 24 V, 1 onboard recharger for the marine batteries, 1 12 V AGM battery for electronics (currently wired in parallel with one of the marine batteries to get the benefit of being recharged), recharger currently is plugged in.

date voltage recharger temperature notes
04/16 8:00 PM 11.7 4 Amps! Low after 3 days of running the fan constantly!
04/17 12:00 AM 11.9 3.75 Amps! Low unplugged the fan - cpu hopefully has overheat protection (don't try this at home)
04/17 8:00 AM 12.1 3.75 Amps! High 54 C running motion 49 C idle unplugged the fan - cpu hopefully has overheat protection (don't try this at home)
04/24 10:14 PM 11.57 0.0 Amps! High 30 C / 86 F running motion fan is on - somehow its determined the end of a charging cycle - don't know how - hooked up small neck motor
04/25 7:00 AM 11.3 connected to marine batter#2 disconnected 7.0 v YIKES! 0.0 Amps! 42 C 107.6 F and climbing ! Loki was brain dead this morning. I disconnected the fan ,however , the drive would still not spin up completely. The mainboard would power on. This would show within the brain system the drive is the biggest power draw - at least on boot up. I put the fan back on. I could not get the system to boot - the drive appeared not to be getting enough power at 7 volts (the measured Werker voltage - duh), at yet the recharger failed to kick in. After taking several voltage test, I came to the conclusion that the recharge checks to see if battery #1 and battery #2 in series are about 24 v. What had happened is I connected the computer, fan, and drive to battery #2. Occasionally, the system would recharge - but recharge both batteries at the same rate. Since battery #2 was the only one sustaining a load, this caused the batteries to get charged unevenly. Battery #2 is @ 10.8 volts and Battery #1 is @ 13.56 volts. I since switched the computer, drive and fan to battery #1, but not without incident! It turns out I had some H-bridges still connected and the difference in voltage between the computer ground and battery #1 ground was 13.56 volts ! That could have messed things up in a big smoky way. All the more reason to isolate the 2 systems electronics / mechanical through opto-isolators etc.
10/27 11:00 PM Battery #1 13.2 V Battery #2 15.4 V 2.5 Amps! Loki's computer was not working for a while. I was busy working on a sliding eye. Fan ran continuously, uneven charge - and refusal to boot. Set Werker on 15.4 main battery. Boots after 15.4 main is connected to worker.


Celsius to Fahrenheit: (1.8*deg C)+32

[edit] following needs to be organized

  • first attempt was to integrate with the existing circuitry - i identified some mosfets however - there was a substantial number of "safety" circuitry which would shutdown the mosfet.
  • i attempted to remove this unfortunately, i destroyed all the mosfets in the process
  • next i made my own high powered h bridge with <<part numbers>>
  • starting and stopping the large motors was something of a challenge - there was no pwm initially and stops & starts would destroy the mosfets - i should have realized that the chair had a pwm circuit for control.
  • smaller motors are much more forgiving
  • you don't want to change a large motor direction
  • i searched the web for motor controller circuits, until i ran across osmc - which was inspirational !
  • its important that you document!
    • here i mapped out the control and power lines for the wheelchair
      wheelchair power circuit
      wheelchair power circuit
  • another thing i had to deal with, was electric brakes on the motors, again one of the safety features of the wheelchair. I ended up removing them.
  • I thought I would just need the 12v to power the drive (I was wrong)

[edit] modularity modularity modularity

If your robot is modular, it will give you plenty of freedom in changing its design and purpose. When you want to turn your 4 wheeling ATV bot into a submersible, modularity will help you get there. Common motor interfaces, standard driver circuits, modular software all help in providing basic building blocks for your grand design. If your basic blocks are common or standard, it allows you to quickly build what you want. Here, Frits Lyneborg uses the omni-purpose paint stick to whip together a robot in record breaking time (Skiwalker).

[edit] parts list

<<todo get picts - table>>

[edit] hardware

item function source cost
Jelly Extra Large Wheel Chair base Mobile Base Craigslist $200
12v 18Ah AGM Battery Power supply for all electronics Batteries Plus $50
Pentium III 730 Mhz Brain Dumpster $0 donated
National Instruments PCI-DIO 96 digital input output card Controller Ebay $50
Airlink MIMO extended range PCI network card Communications Frys $30
2 X H-Bridge Motor Controller Controller RobotPower $160
pico PSU 120 120 watt 12v input DC - DC ATX Power supply iTuner Networks Corporation $49.95
DIY LIDAR Distance Sensor Open Source LIDAR $5

[edit] software

item function source cost
Linux Kernel 2.6.20 Kernel http://www.kernel.org $0
Fedora Core 8 OS Distro http://fedoraproject.org/ $0
Comedi Driver DIO Driver http://www.comedi.org $0
Festival Speech Synthesis http://festvox.org/festival/ $0
OSROS Open Source Robotic Operating System

Robotic cerebellum
$0

[edit] comedi

Comedi is a set

  • whenever comedi_dio_config is used to config - it reset that bit COMEDI_OUTPUT/COMEDI_INPUT
 
modprobe ni_pcidio
comedi_config /dev/comedi0 ni_pcidio


/dev/comedi0
block 1

block 2


2 (0.10)
1 (1.11)

27 (2.10)
26 (3.11)
4 (0.9)
3 (1.10)

29 (2.9)
28 (3.10)
6 (0.8)
5 (1.9)

31 (2.8)
30 (3.9)
8 (0.7)
7 (1.8)

33 (2.7)
32 (3.8)
10 (0.6)
9 (1.7)

35 (2.6)
34 (3.7)
12 (0.5)
11 (1.6)

37 (2.5)
36 (3.6)
14 (0.4)
13 (1.5)

39 (2.4)
38 (3.5)
16 (0.3)
15 (1.4)

41 (2.3)
40 (3.4)
18 (0.2)
17 (1.3)

43 (2.2)
42 (3.3)
neck cw 20 (0.1)
19 (1.2)

45 (2.1)
44 (3.2)
neck ccw 22 (0.0)
21 (1.1)

47 (2.0)
46 (3.1)
24 +5V
23 (1.0)

49  ?
48 (3.0)
NC GND?
25 GND?

NC ?
50


2 (1.23)
1 (0.23)

27 (3.23)
26 (2.23)
4 (1.22)
3 (0.22)

29 (3.22)
28 (2.22)
6 (1.21)
5 (0.21)

31 (3.21)
30 (2.21)
8 (1.20)
7 (0.20)

33 (3.20)
32 (2.20)
10 (1.19)
9 (0.19)

35 (3.19)
34 (2.19)
12 (1.18)
11 (0.18)

37 (3.18)
36 (2.18)
14 (1.17)
13 (0.17)

39 (3.17)
38 (2.17)
16 (1.16)
15 (0.16)

41 (3.16)
40 (2.16)
18 (1.15)
17 (0.15)

43 (3.15)
42 (2.15)
20 (1.14)
19 (0.14)

45 (3.14)
44 (2.14)
22 (1.13)
21 (0.13)

47 (3.13)
46 (2.13)
24 (1.12)
23 (0.12)

49 (3.12)
48 (2.12)
NC 25 (0.11)

NC 50 (2.11)






[edit] block diagram

[edit] hardware

The hardware diagram shows a discarded pc or mac at its core. A DIO card is used to interface with various hardware. Image:blockDiagram.jpg

[edit] software

Basic block diagram. Java was chosen as the core language to support as wide a range of operating systems as possible. A simple JNI interface is created which allows direct hardware and memory reading and writing. The Web 2.0 interface allows any HTTP client an opportunity to interface with the robot. Image:softwareBlock.jpg


[edit] comedi initialization

modprobe ni_pcidio
comedi_config /dev/comedi0 ni_pcidio
cd /garden/trunk/cpp/comedi
./check

[edit] parallel port initialization

  • module makefile reference
  • unloading and loading
rmmod parport_pc
rmmod parport
cd /garden/trunk/cpp/captain/
insmod ./skeleton.ko
mknod -m 666 /dev/skeleton c 32 0
modprobe ppdev

[edit] motion initialization

 motion -n
 motion -c /usr/local/etc/motion_01.conf -n

[edit] code drop

chown -R tomcat:tomcat /usr/share/tomcat5

[edit] open cv

/usr/local/share/opencv/

[edit] 3com homeconnect

raw = 320 x 240 
channel = 3 
interleaved
8 bits

[edit] WCS

./webcam_server -d /dev/video1 -c "%Y-%m-%d %H:%M:%S %%v %%f %%V"
./webcam_server -d /dev/video0 -p 8889 -c "%Y-%m-%d %H:%M:%S %%v %%f %%V"

[edit] microsoft camera on linux

changelog  cutlog.py  Etoms        gspca_core.c  license   Makefile.kld  Pixart            Sonix    Sunplus-jpeg  utils
Conexant   decoder    gspca_build  gspca.h       Makefile  Mars-Semi     READ_AND_INSTALL  Sunplus  Transvision   Vimicro
[root@loki gspcav1-20071224]# ./configure
-bash: ./configure: No such file or directory
[root@loki gspcav1-20071224]# make
make -C /lib/modules/`uname -r`/build SUBDIRS=/download/gspcav1-20071224 CC=cc modules
make[1]: Entering directory `/usr/src/kernels/2.6.23.1-42.fc8-i686'
  CC [M]  /download/gspcav1-20071224/gspca_core.o
  CC [M]  /download/gspcav1-20071224/decoder/gspcadecoder.o
  LD [M]  /download/gspcav1-20071224/gspca.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /download/gspcav1-20071224/gspca.mod.o
  LD [M]  /download/gspcav1-20071224/gspca.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.23.1-42.fc8-i686'
[root@loki gspcav1-20071224]# make install
mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb/media/
rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/spca5xx.ko
rm -f /lib/modules/`uname -r`/kernel/drivers/media/video/gspca.ko
install -c -m 0644 gspca.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/
/sbin/depmod -ae
[root@loki gspcav1-20071224]# ls /dev/vid*
/dev/video  /dev/video0  /dev/video1
[root@loki gspcav1-20071224]# modprobe -v gspca
insmod /lib/modules/2.6.23.1-42.fc8/kernel/drivers/usb/media/gspca.ko 
[root@loki gspcav1-20071224]# ls /dev/vid*
/dev/video  /dev/video0  /dev/video1  /dev/video2
[root@loki gspcav1-20071224]# 

[edit] gwt messages

Object Values Frequency
Status active | inactive | unauthenticated often
PilotRoster list of names and stati often
Sensors data unknown
Heading unknown
PolledSensorData unknown
MappingDisplayAread unknown
SystemMessages unknown
StepperLocation often
CommandConfirmation often

[edit] todo

  • splice cpu fan in with 12 v system so it does not pull its power off the board (and through the ATX Pico)
  • put in an emergency stop / kill switch following DARPA designs (rc and physical)
  • integrate electronics battery with onboard recharger - parallel with one of the marine batteries



Leave a Comment