Saturday, August 31, 2013

Robot Explorer Log 7 Stall Sensor

Mercury tilt switch makes a 1-axis accelerometer
ROBOT EXPLORER LOG 7
DEVELOPMENT OF THE STALL SENSOR

The robot build took on more expansions, from 2 drive wheels to 4, the chassis was extended, sensors were restructured, and getting stuck either on the ice or in the marsh of primordial mud soup on other planets and moons was considered. This has led to the development of the stall sensor.
Parallax wheel has ellipsoid holes for encoding

The question initially put forth on the Parallax Forum here has garnered many thoughtful ideas and very interesting responses. We've supplemented the information with some of our own, and a short analysis about what can work and what can go wrong - Murphy's Law and Yhprum's Law.

HORIZONTAL LIGHT SENSOR
The use of a high mounted horizontal light measuring sensor could detect if the robot is still capable of moving left to right. This may not work on planets with little or no visibility due to atmospheric pollution and various "white out" storms. For example, some planets have dust storms lasting many months while other moons have thick pollution consisting of a mix with visually blinding methane and hydrocarbons. The adjustable and programmable light sensor which can set sensitivity requires three pins.

ENCODED IDLER WHEEL
Also considered is the use of a free spinning idler wheel which has encoding and contacts the ground. If the robot is moving and not stalled, the wheel will turn as it moves along on the ground. The new Boe-Bot wheels have eight holes which can be used to construct a home-made encoder. The encoder consists of a simple IR transmitter receiver pair, one on each side of the wheel. The encoder, because it's made up of a light sensor, could by happenstance end up useless if it becomes covered in mud, dirt, dust or crud. The encoder takes up two pins, one for the transmitter and one for the receiver.

TWO AXIS ACCELEROMETER
A two axis accelerometer could determine the forces of the robot starting and accelerating forward along one axis, and confirm left to right movement along another axis, which would not appear if the robot was held in mud. The accelerometer could also have other functions like measuring terrain slopes and inclines, and preventing robot tipping due to tilt. Since these accelerometers work well in sensitive seismometers, they will undoubtedly work for this application. The accelerometer can perform within an enclosed environmental capsule to maintain proper functioning of its built in heater. The accelerometer takes up two pins.

MERCURY SWITCH
Perhaps the cheapest and most simple approach is to use a side to side (or forward/reverse...) sloshing mercury switch mounted on the robot. This acts as a cheap one axis accelerometer, and can determine if the robot craft is still capable of quick accelerations, i.e. movements left to right, thus proving "it's not stuck" with a returned signal. This would take up only one pin and a small program can poll the status during a short test. This sensor is not effected by dust, atmosphere, or being covered in mud. It can also reside within a temperature controlled enclosure, not exposed to the elements outside. Keep in mind, mercury freezes at -38 degrees F. and boils at +674.11 degrees F. This agrees well with other sensors with a -40 deg. F. operating temperature limit. The mercury switch is a cheap, inexpensive, poor man's accelerometer and takes up only one pin.

UNSTUCK PROGRAM
Ok, so now we know the robot is stalled. What can we do?

The "Unstuck" program will help take care of that. The program is designed to alternate the drive wheels back and forth to generate momentum that should free the robot. This is similar to a stuck car when the driver can alternate putting the car in reverse and forward drive, rocking the vehicle back and forth, and building up enough momentum to break free.

Still stuck? If the planet has changing weather, such as changes in surface conditions, it may be possible to wait and utilize these conditions to better facilitate the "pulling free" process. The unstuck program will be tailor made to the conditions on the planet or moon. Conditions may include a cycle of freezing and thawing, a dust storm, particle rain, wind, temperature changes and other effects.

The Unstuck program requires no pins, however, it will make use of several sensors which require pins. The Momentum Driver remains in software, making use of four wheels and timing.

FANTASY IDEAS
There are some fantasy rescue ideas too:

QUADCOPTER
A tethered quadcopter takes to the air and helps pull the robot free from the mud.

JUMPING
The robot, using spring loaded underside flaps, jumps out of the mud.

SHADOW BOE-BOT & GRAPPLING HOOK
A rescue shadow Boe-Bot flings forth a grappling hook and wenches the robot free.

RESCUE ROPE
A 10-foot rope is anchored to the ground. After Boe-Bot advances 10-feet, the rope/anchor connection is auto-released and the rope is retracted. The robot anchors the rope again, advances another 10-feet and the process is repeated. Should the robot become stuck, the rescue rope is rewound, helping to pull the robot to safety.

NO COMPASS
As the planet may have no magnetic field, a compass cannot be deployed alone.

MAGNETIC SOLUTION
Electromagnets will work in space and on planets without a magnetic field. The Boe-Bot drops a small tethered weighted electromagnet from the front, to the ground. As the robot moves forward over it, the tether unwinds and the rear hall effect sensor detects the magnet, proving the robot has moved and is not stuck. The small electromagnet is retracted and the process repeats.

WIND SOLUTION
If Boe-Bot is on a wind planet, deploying a sail and waiting for wind to help pull free could be a solution. Aligning the sail's force vector with the inline direction of wheel travel could be helpful. Choosing a forward or backward direction for turning wheels can be useful and offers more options. A wind sail program can code the wheels to drive in the direction of the wind sail's force vector. This may need a wind direction sensor. However, a static wind sail will push the vehicle either forward or reverse. Alternating the driving momentum, both forward and aft, can make a wind direction sensor unnecessary.

LINKS
Parallax Forum
http://forums.parallax.com/showthread.php/149909-Stuck-Boe-Bot 
The Element Mercury
http://en.wikipedia.org/wiki/Mercury_element
Yhprum's Law
http://humanoidolabs.blogspot.com/2013/04/yhprums-law.html
Propeller C Activity Bot
http://learn.parallax.com/activitybot

Friday, August 30, 2013

Brain Knitting

The first pre-brain knitting experiment
BRAIN KNITTING
The Big Brain Initiative is working on the creation of an evolutionary knitted electronic brain, made from impetus Parallax Propeller microelectronics, that can predetermine its own growth destiny.

In this remarkable one-of-a-kind experimental project, Predetermined Growth Destiny is basically putting together a structural outline of "primordial state" processors and letting the mix evolve into a brain.

Using PGDs, applications could include pre colonization of planets like Mars, growing brains automatically in the lab, evolving the growth of an existing brain, and growing parts for human bodies.

Initially parts grown could conjure a multitude of machines and machine parts as well. The patterns for PGDs would work well with three dimensional printers, knitting new brains in a relatively short period of time.

PGDs could result in armies of brained workers that could do mining on asteroids, explore the Solar System, and interface with conditions that humans would find inhospitable. PGDs could also result in appendage brain concatenations for humans to extend their functions.

Tuesday, August 27, 2013

Robot Explorer Log 6 Two Propellers

GOING TO TWO PROPELLERS
 ROBOT EXPLORER LOG SIX
The total number of sensors were fit to only one Propeller chip and a shortage of two pins resulted. Therefore, two props will be used for the robot (at this time). The first prop chip has eleven free GPIO and the second prop chip has 4 free.

The two chips are divided as follows.

Chip 1
The Mobility Chip
Includes on board prop to prop communications
Broadcast video and tv telemetry
Ping obstacle avoidance, navigation, mapping
Servos to drive wheels
Three battery packs for one heater and two processors
Accelerometer for inclination feedback
Camera
EEPROM for mapping
EEPROM for code storage/booting
Prop Plug TX and RX

Chip 2
The Sensor Chip
Includes on board prop to prop communications
Broadcast video and tv telemetry
Light to Frequency Chip
PIR for life sciences
Temperature humidity sensor
Timekeeping clock calendar
Battery pack 3 for 6V heater
Methane sensor
Microphone & Audio in
Headset audio mono out 
EEPROM store/run programs
Prop Plug TX & RX

Currently the design works with a two bit interface with the following truth table:

DUAL PROP 2-BIT INTERFACE TRUTH TABLE
on off
on on
off off
off on


Monday, August 26, 2013

Robot Explorer Log 5 Propeller Pins

DETERMINE FREE PROPELLER PINS
ROBOT EXPLORER LOG 5

CURRENT CHIP PINS FREE
PROPELLER 1: 11 PINS FREE
PROPELLER 2: 7 PINS FREE

We're taking this robot to the outer reaches of the Solar System! Follow along as we construct this little explorer craft that will go down to the surface of a new world that's alien to us.


In this update, we've removed the left and right IR navigation and replaced it with Ping ultrasonic navigation. The IR took up 4 pins so now the robot has 4 extra pins on the first propeller chip.

The ambient light level detectors are removed and replaced with the more sensitive TLS230R programmable chip.

On the second Propeller chip, two light to frequency converter chips (TLS230R) are added. Each chip uses 3 pins. Propeller two will have six more pins used.

On the second Propeller, the QTI sensor will be removed due to its limited range in the specs. This will free up 3 pins.

Also removed from the Propeller 2 are two CDS ambient light sensor cells freeing up two more pins.

The reason two light to frequency chips will be used is because one is pointed up to establish a baseline reference for calibration and the second chip will point down at the ground to help estimate the type of ground surface material, based on an average of light reflectivity.

Another reason for selecting the chip: the chip is much more sensitive compared to other sensors and it can be programmed for great sensitivity level or modified. This is a desired feature for exploring the outer planets and moons which have no more lighting than Earth's twilight.

The chip is also programmable to compensate for window dust and degradation, by increasing the light level sensitivity as needed.

Again, we attempted to combine both Propeller boards into one but there was a shortage of two pins.

Sunday, August 25, 2013

Robot Explorer Log 4 Light Sensor

Parallax Penguin Robot light system. Credit: Parallax
VERY SENSITIVE ROBOT EYE
ROBOT EXPLORER LOG 4

 

USING THE TLS230 LIGHT TO FREQUENCY SENSOR

A study of interplanetary and moon conditions shows that specific locations will have much less lighting than on the Earth. Even a robot explorer on the Earth can experience dawn to dusk like conditions of less intensive lighting. How does one effectively measure sub lighting conditions?

In the left schematic, the phototransistor or CaS cell will measure the intensity of reflected light. This is good for determining the surface reflectivity of the ground. The top cell can be turned skyward to create a baseline reference. The system uses only 2 pins and is based on ambient planetary or moon light levels.

The schematic at right shows a system that provides the light source, to be shown on objects. The reflected light is detected. This system can be used for obstacle detection and avoidance in dark conditions.

The interest here is in measuring the ground material based on the lighting conditions. The typical IR combo transmitter receiver pair could do detection by transmitting IR light like a flashlight and looking for its reflective signature.

Perhaps a better approach is to read the signature from available light if the probe is operating in known minimal dawn or dusk conditions, and use a more sensitive programmable light to frequency chip manufactured by TI.


TSL 230 R
The program sets the sensitivity level, while two sensor chips, one a reference chip and the other chip viewing the unknown ground material takes readings for analysis. Such great sensitiviy and programming convenience comes at a price, by using more pins. Two chips use six pins. A transmitter receiver obstacle avoidance/detection IR system will typically use three pins.

One good, tried and true, method is that system used by the Parallax Penguin Robot. The schematic shows two systems utilized by this beloved little robot. It's a very powerful walking robot with many applications. The circuit uses RC methods to determine resistance which in turn is based on the level of light.

The Propeller program below is a snippet from the Parallax demo coded by Paul Baker and can be found at the link.




CON
  _clkmode = xtal1 + pll16x
  _XinFREQ = 5_000_000
  pin = 0 'pin connected to tsl230 output
  cbase = 1 'pin connected to S0 (S1 connected to cbase + 1)
  scale = %10 'scale value for tsl230 (=off,%01=x1,%10=x10,%11=x100)
  ctrmode = $28000000 'mode value for counter to operate as a frequency counter
OBJ
  term : "tv_text"
PUB go | old
  dira := %11 << cbase 'set scale pins to output
  outa := scale << cbase 'set scale value
  term.start(12) 'start terminal
  frqa := 1 'set counter to increment by one
  ctra := ctrmode + pin 'start counter
  repeat
   waitcnt(80_000_000 / 10 + cnt) 'wait for 100ms
   term.dec(phsa) 'output counter value
   term.out($0D) 'line feed
   phsa := 0 'reset counter value

Another program variation may be useful, as seen below. This depends on two objects, tv_text and tsl230.

tsl230 DEMO.spin
CON
_clkmode = xtal1 + pll16x
_XinFREQ = 5_000_000
OBJ
term : "tv_text"
lfs : "tsl230"
PUB Go
term.Start(12)
lfs.Start(0,1,10,true)
repeat
waitcnt(80_000_000 / 10 + cnt)
term.dec(lfs.GetSample)
term.out($0D)

AND yet here is another even more simplified demo. These programs were not found in the OBEX but rather on the Parallax Forum along with other code, including an object update by Mr. Degn. (see links)

CON
        _clkmode = xtal1 + pll16x
        _XinFREQ = 5_000_000
OBJ
  term : "tv_text"
  lfs  : "tsl230"
PUB Go
  term.start(12)
  lfs.Start(0,1,10,true)
  repeat
    waitcnt(80_000_000 / 10 + cnt)
    term.dec(lfs.GetSample)
    term.out($0D)


LINKS
Penguin Robot Society PRS 
http://www.p-robot.com/

Penguin Parallax Forum
http://forums.parallax.com/showthrea...061#post977061

Penguin Sticky
http://forums.parallax.com/showthread.php/97288-Penguin-Resources

Penguin Manual with Schematics
http://www.parallax.com/Portals/0/Downloads/docs/prod/robo/27313-6PenguinDoc-v1.0.pdf

Parallax Manual for TSL 230 R
http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/27924-TSL230R-v1.0.pdf

TSL 230 R Chip Apps
http://www.thereminworld.com/Forums/T/26460/a-one-chip-theremin

TSL 230 R Sparkfun Source
https://www.sparkfun.com/products/retired/8940

TSL 230 R Data Sheet 
http://www.sparkfun.com/datasheets/Sensors/TSL230R-LF-e3.pdf

Forum Downloads for tsl230.spin & sts230 DEMO.spin
http://forums.parallax.com/showthread.php/117955-TSL230-Program-Question

Bug Fixes to tsl230 Object by Duane Degn
http://forums.parallax.com/showthread.php/148769-Bug-Fixes-to-TSL230-Object-in-Propeller-Tool-Library 

Friday, August 23, 2013

Robot Explorer Log 3 First Assembly

The rough and approximate design of the interplanetary robot explorer. Note, a second processor chip (Propeller chip) is setting on the top second breadboard, and a possible third is awaiting the design outcome. Various parts are scattered around waiting for positional tryout.

Still undecided is the exact battery pack position for the heater. It's believed engineering polymer will line the top and hold a total of four breadboards. One breadboard may mount in the front for sensors. Also note, the wheels are not completed nor in place.

What is seen is the wheel base plate. These final wheels will have drive mobility and traction on ice, slippery "oil" type surfaces and frozen slush conditions. Where is this robot explorer going? Stay tuned and find out!
ROBOT EXPLORER LOG 3 - FIRST ASSEMBLY

Work continues at a rapid pace. As things are designed, the physical locations are tried on the mock robot. Last night, the pins filled up on the Propeller chip! A total of 32 pins were loaded with functions and sensors and more GPIO were needed. So the inevitable happened, a second Parallax Propeller chip was added to the board for 32 more pins.

We're standing by with a third chip. It's possible this one could have a small neural net with more cores for a higher level of decision making. The BIg Brain will create a high level of autonomy although the intelligence level is unknown at this time.

NAVIGATION & LIFE SCIENCES
Two Pings are shown for navigation, and one pyroelectric infrared device will be adapted for the life sciences section. Programming will be unique as the robot will position itself which will determine the Ping positions.

INTERFACE & RADIO CHANNELS
A small parallel interface is designed to handle the chip-to-chip communications and the robot now has two radio channels that will allow it to phone home. A small truth table was completed and the command roster was created.

RESEARCH & DEVELOPMENT
R&D continues with ongoing atmospheric studies, and a number of open studies regarding sensors, navigation, radio, power, and temperature.

SENSOR APPORTIONING
The sensors and functions were apportioned, and this left eight pins free on each chip. The extra sensors and functions, with the extra prop chip, called for another two breadboards. However, when sizing up space requirements for added sensors, it was clear the top carriage required four breadboards.

BATTERY POWER CHAMBER
There is a move to place the battery power chamber at mid level along with a frontal breadboard to hold forward and ground viewing sensors. This will require moving the front spacers back about half inch.

POWER SUPPLIES
The decision was made to have three power supplies and go with four AA batteries at 6-volts to drive the heater. Already we're we have our eye on a more powerful dynamo to deliver a more hefty charge.

PARTS POSITIONING
Photos so far just show positioning of parts which are temp only. Note the green propeller and dynamo is robbed from the spinning quadcopter project. The position of the Windmill is being tested at the center of the chassis but this negates the 4-cell power supply position. More work on this is needed.

Build Tiny Stamp BOE

BUILD A TINY STAMP BS2 BOE
How to Build a Tiny BOE Board of Education

Article adapted from Penguin Tech Magazine PT1

Maybe smaller is better when it comes to tiny robots, little machines, and experimenting with projects on a budget. How about making a tiny BOE at a fraction of the cost of a full blown version? This project is ideal for hobbyists, students, schools and anyone on a budget, or project in the small space league.


BOE is the Board of Education, from Parallax Inc. It’s a development board on which to build many interesting basic stamp projects and it can be used over and over again, due to its convenient solderless breadboard and pin-out connectors. BOE is also the board driving the popular BOEBOT robot.

BOE’s uses are many, from controlling servos to offering convenient power regulation, a reset switch, and various well labeled connectors. BOE is the instrument by which you can get your projects running quickly and effectively. However, BOE is small but not tiny. It would be nice to have a tiny boe for robots smaller than BoeBot, such as Penguin Robot, and other projects with limited space requirements. This article examines a way to create a tiny BOE. This tiny BOE is portable and convenient, operating off the well known OEM Basic Stamp 2. Buy the kit (see links), collect the parts, and assemble the BOE. It's loads of fun!

Mainly, we connected an edge board connector and added a tiny solderless breadboard using double stick tape (the 3M kind to connect picture frames to the wall). Wiring is accomplished by leading wires from the edge connector to the breadboard. There are many applications for Tiny Boe. You can even make a Tiny BoeBot. It’s recommended to first make some standard connections for reset, and power.

LINKS
http://www.parallax.com/
Penguin Robot Society
BASIC Stamp 2 OEM Kit
Solderless Breadboard

Wednesday, August 21, 2013

Robot Explorer Log 2 First Considerations

Proto test robot processor stack experiment
REMOTE PLANETARY MOON AUTONOMOUS EXPLORATION ROBOT PROJECT LOG 2

Photo: Look closely - two Propeller chip processors are stacked in this multi-processor experiment. While the stacking arrangement is possible, a miss firing of the pin states caused by some off-planet anomaly at the remote reaches of the Solar System could lead to an unprotected condition and thus cause a premature processor anomaly. The stacked processor design was scrapped for this mission.

Two processor chips can be safely used in a side by side parallel design mode that safely offers pin protection from one chip to the other. Coupled with hard protection, an occurring glitch could be squelched with the autonomous reset function if properly interpreted.

Currently, the robot has a single Propeller chip with all 32 pins filled. If more sensors are required, a second processor chip may be added to form a collective, the pins may be rearranged, or multiplexing may be introduced.

If two chips are used, in theory, the Big Brain could loan its technology, thus creating a total of over 2,000 processors. A high number of processors are often required for operating AI neural nets. It would also offer a sum of 64 pins for added sensors and functions such as multiple ADCs for specific monitoring of each power supply.

FIRST CONSIDERATIONS: The project is taking on interested members to serve as science team advisers for the Remote Solar System Moon Autonomous Exploration Robot Project. We now have a new member for the microbiology team and life sciences division.  As a result of the influx of questions about the project, a short Q & A section is added below. 

Q - Will the chassis crack at -289 deg. F.?

A - The robot must have a coat of insulation to keep the heater's warmth inside. The coat will cover the conductive and heat distributive aluminum chassis.

Q - How will you test the materials and mechanics?

A - Testing in a conventional food freezer is a good idea. The sensors can be operated at their lower temperature ratings below the freezing point to simulate operation inside the insulated container. More elaborate tests may involve chambers of dry ice at -109 degrees or a vessel of liquid nitrogen at -320 to -346 deg. F.

Q - What is particulate matter content of the atmosphere and will this effect the wind dynamo?

A - No one knows the speed or particulate matter content of the air on the surface. Roughly speaking, the robot could function on the current conventional batteries a day with no wind or a much longer time with wind. Either way, it will work and gather science.

Q - Will the components function at -289 degrees?

A - Yes, electronic components are designed to function because the insulated probe, covered with insulation and heated with a heater, will not reach -289 deg. F. Components will undoubtedly run at their lower limits so the probe will not be heated to room temperatures. Cold environments are actually beneficial for the processor, making it more efficient with less power and less noise.

Q - Will particulate matter get stuck in the Dynamo due to lesser gravity?

A - There's enough gravity on this moon to cause rain to fall from the sky. The rain is double the size of Earth rain droplets and falls much slower, more like Earth snow flakes. There's frozen hydrocarbon sand so it does fall to the ground. The windmill should not contaminate quickly but if it did, it would shorten the life of the probe. It's more likely the particles are so tiny and hard frozen, they won't affect performance.

Q - Is there enough wind to turn the turbine?

A - If the wind is too slow, it will be a problem for the windmill to recharge several battery packs. However, the air is over twice as thick as the Earth's air, so it's likely it will have good wind for driving the rotor. Observations of changing clouds indicate the presence of wind too. For periods of no wind, the probe can rest and sleep and wake up periodically to look and see if the batteries have recharged.

Robot Explorer Log 1 the Chronicles

Interplanetary Exploratory Robot
ROBOT EXPLORER - THE CHRONICLES
EVERYONE KNOWS the Big Brain Electronic Machine is exploring outer space for some unknown reason. This exploration includes not only manned missions into Near Space, but has now expanded to robotic probes designed for trips to far away worlds located at the remote edge of the Solar System. 

We now have a directive from the Big Brain to design and construct an exploratory intelligent life form robot that can autonomously traverse strange new worlds in the quest for ultimate knowledge! 

This is a build of a different type of robot, with some intelligence, designed to mobility explore places in the outer reaches of the Solar System where no man has ever tread!

The places of interest have an atmosphere and can support protected life, provide water to drink, and can serve as a world to explore rich natural resources worth mega trillions and trillions of dollars.

We're talking about going to "Life Moons!" Life Moons are likely to contain developed alien life or life in the making, and encompass spectacular surrealistic vistas and moonscapes. They hold wealth and riches far beyond our Earthly imaginations!


Early design work and the robot proto begins to take shape. The explorer robot probe currently has designs for three power supplies. Initial parts are from a Parallax Boe-Bot kit. The BS2 board is removed and a replacement Propeller board will be installed. The initial prototype is designed to run from a breadboard. In this view, component and module placement tryouts are in effect. Many of the sensors are yet to be installed. The combined position is critical to the operation of the robot. The Propeller chip has 32 pins. In this design, all 32 pins are used up. If more GPIO are needed, another P8X32A-D40 will need to be added to the circuit.

The Advanced Explorer Robot will have autonomy, sensors to detect life and study the environment, and will map out the new world (actually creating maps and sending data back to home base by radio). It will carry its own life environment for survival. This mainly involves protection from cosmic rays during the journey, and a heated capsule to ensure component reliability in extreme temperatures. All parts for the interplanetary probe are off-the-shelf and commonly available. As always, the objective is the advanced prototype at lowest cost and highest technology.
PERSONAL LOG EARTH DATE WED. AUG. 21, 2013
It's hot and raining here today. This will be the most complicated and most expensive autonomous robot ever designed in the Humanoido Labs. It's for a reason - the little guy will trek to the farthest reaches of the solar system to embrace the unknown.

Today, I designed a heater for the robot, to keep it warm in -289 F. temp. I'm using a reserved power battery pack and electrical resistors calculated to emit the required amount of wattage heat to keep the electronics at their minimum operating temperatures. The processor will automatically turn the heater on and off according to a temperature analysis program.

To recharge the batteries, a small wind turbine, or windmill, will be used. This is because there is wind on this moon's surface and pretty much no direct sunlight. The planet's list of 20 moons are up to 1,037,690 miles from the Earth, so the sun looks like a tiny dot and all the hydrocarbons in the air make a very polluted foggy viewing from the surface. The actual sunlight never exceeds Earth twilight level.

Today, I'm raising the electronics package up on spacers for a third power supply to be located underneath - this will power the heater. So far, the robot explorer has 3 power supplies, one for the motors and sensors , one for the computer, and one for the heater. The heater has run through the numbers for six designs so far. Today, it was discovered that the approach with the 9-volt battery would fail, because it can deliver only a measly 0.55 Ah. So now the newer numbers will look at designs with a varied number of small 1.5 volt batteries.

Sunday, August 18, 2013

Robot Mechanics - Downsize Your Big Hole

Static Ping Boe-Bot attachment using a skirt clip
ROBOT MECHANICS - DOWNSIZE YOUR BIG HOLE

In working with a chassis with pre-punched big holes, and when recycling projects, it's common sometimes to need extra components for parts mounting.

Sometimes the mounting hole is too large and little holes are in the wrong place. A big loose hole is a sloppy thing to have when mounting it with your small nuts. There's a small tip to downsizing your big holes.

In the photo, the bracket covers a large hole on the top of a Boe-Bot robot and holds the Ping bracket. This setup uses the existing battery bolt that retains the battery holder. It also allows easy adjustment of the Ping bracket. The side of the skirt clip has a connection tab for other hardware. Bend this tab to make it 90-degrees to the bracket.

Buy a bag of dress clips, the kind that mesh/clip together for wearing a woman's dress or skirt. These have two metal components, one of which is larger. The larger one has a prong which can be formed outward 90 degrees and serve as an extra mounting plate. Near the center is a small tight hole, perfect for a smaller bolt. The clip actually serves as a kind of washer covering the large hole, but with the added function.

The actual use example is for a static attachment of a Ping mount to the top of a Boe-Bot chassis, as shown in the photo. Go to the dollar store and pick up a package of twenty clip sets for, well, about a dollar.

Talking Cogs

Parallax code award to Jim Coleman
DESIGNING WITH THE PROPELLER CHIP
COG LOADER: LOADING COGS IN A PROPELLER CHIP

ONE of the most important functions in the Parallax Propeller chip is the ability to talk between various processors. There are numerous ways to write programs to do this, some which use a fractional number of the chip's eight cores and some programs which use the full load of cores. Some examples are spartan and some are more comprehensive and involved, and some will contain embedded comments while others have none. In these examples, cores are called Cogs, the naming convention conceived by the Propeller designer, Charles "Chip" Gracey III, who is also the founder of Parallax Company.

Let's take a look at these programming examples that can talk with Cogs. First up, we honor and spotlight Jim Coleman's award, Object of the Week, issued by Parallax this week. The program is found at the Obex and can be downloaded here. The program is fantastic in documentation and includes the use of PBASIC style language for the Propeller chip. Next up is this sample found at QuickStart 5: Multiple Cogs. It loads up three cogs with tasks that all run at the same time. The code is provided below.

CON
  _clkmode = xtal1 + pll16x         'Establish speed
  _xinfreq = 5_000_000              '80Mhz
OBJ
  led: "E555_LEDEngine.spin"        'Include LED methods object
VAR
  byte Counter                      'Establish Counter Variable                                   
  long stack[90]                    'Establish working space
PUB Main
  cognew(Twinkle(16,clkfreq/50), @stack[0])    'start Twinkle cog 1
  cognew(Twinkle(19,clkfreq/150), @stack[30])  'start Twinkle cog 2
  cognew(Twinkle(22,clkfreq/100), @stack[60])  'start Twinkle cog 3
PUB Twinkle(PIN,RATE)                  'Method declaration
  repeat                               'Initiate a master loop 
    repeat Counter from 0 to 100       'Repeat loop Counter
      led.LEDBrightness(Counter, PIN)  'Adjust LED brightness
      waitcnt(RATE + cnt)              'Wait a moment     
    repeat Counter from 100 to 0       'Repeat loop Counter
      led.LEDBrightness(Counter,PIN)   'Adjust LED brightness
      waitcnt(RATE + cnt)              'Wait a moment


Next, move onto Methods & Cogs and follow the details of the Spin code shown below.

'' File: CogStartStopWithButton.spin
'' Launches methods into cogs and stops the cogs within loop structures that
'' are advanced by pushbuttons.
VAR
  long stack[60]
PUB ButtonBlinkTime | time, index, cog[6]
 repeat
   repeat index from 0 to 5
     time := ButtonTime(23)
     cog[index] := cognew(Blink(index + 4, time, 1_000_000), @stack[index * 10])
   repeat index from 5 to 0
     ButtonTime(23)
     cogstop(cog[index])
PUB Blink( pin, rate, reps)
  dira[pin]~~
  outa[pin]~
  repeat reps * 2
    waitcnt(rate/2 + cnt)
    !outa[pin]
PUB ButtonTime(pin) : delta | time1, time2
  repeat until ina[pin] == 1
  time1 := cnt
  repeat until ina[pin] == 0
  time2 := cnt
  delta := time2 - time1


PROPELLER LINK TREASURY
Parallax Inc.
http://www.parallax.com/
OBEX
http://obex.parallax.com/object/61
QuickStart 5: Multiple Cogs
http://www.parallaxsemiconductor.com/quickstart5
Propeller Education Kit Labs
http://www.parallax.com/go/pekit
Comstock's
https://www.comstocksmag.com/batteries-not-included 
Propeller <-> PC Terminal Communication (forums)
http://forums.parallaxinc.com/forums/?f=25&m=341494&g=341494#m341494
Debug LITE for the Parallax Serial Terminal (forums)
http://forums.parallaxinc.com/forums/default.aspx?f=25&m=348893
Measure Resistance and Capacitance (forums)
http://forums.parallaxinc.com/forums/default.aspx?f=25&m=335407
Transmit Square Wave Frequencies (forums)
http://forums.parallaxinc.com/forums/default.aspx?f=25&m=343747
EEPROM Datalogging and I2C (forums)
http://forums.parallaxinc.com/forums/default.aspx?f=25&m=219237
Servo Control (forums)
http://forums.parallaxinc.com/forums/?f=25&m=197069&g=197069#m197069
PEKbot (forums)
http://forums.parallaxinc.com/forums/default.aspx?f=25&p=1&m=174962
Methods & Cogs
http://nagasm.org/ASL/Propeller/printedPDF/MethodsAndCogs-v10.pdf

Sunday, August 11, 2013

Bats - Global Warming

LARGER THAN A DOG - AS BIG AS A SMALL HUMAN
Example of the giant Golden Capped Bat in the familiar photo purportedly taken in the deep jungles of the Philippines, apparently held by the only rebel squad willing to touch it and tie it to an elevated stretch of moldy bamboo, sectioned off by a fresh roll of barbed razor wire. One commando is clearing a section of the jungle while two others are using cell phones, possible to inform the command base of the surreal situation.

Are more of these creatures attacking, hence the military commando readiness? Another commando stands at attention, on guard watch duty as if other giant bats may swoop in for the opportunity, while another is in motion to execute a command. The closest commando appears in shock, just looking on and stunned by the unbelievable nightmarish apparition. In the center background, there's a collection of some ghoulish things clinging on a fence post.
New breed: hordes of the dreaded vampire bats know exactly where to bite humans. Unfortunately, the rating of this blog does not allow us to specify more details. In the hot jungle, or new regions with hot climate due to global warming, it's natural to lay there at night, sleeping scantily clad. It's these opportunistic times that bats and infrared heat seeking creatures of the night move in to cut your skin and suck your blood.
TALES CACULATED TO DRIVE YOU BATS
"Bats - you either love em or hate em..."

Movie bats for fun
BATS - Global Warming, the Real Story

This is not a movie review. This is real life. The facts are real. It finally happened, as a constant stretch of very hot temperatures lasting over 2 months has caused the birds to disappear, only to be replaced by a number of specific dark flying bats during the subversive bowels of the deepest night. This brings dire questions to bear.

Will global warming change the world in dark subversive ways that no one had ever expected? Will hordes and wildly productive nests of horrendous vampire bats feast on humans in the night as global temperature swells continually spiral upwards?

While it's claimed to eat only fruit, an angry GCB bat could in theory swoop down and carry away human babies and other small animals. However, not all is negative as small bats are your friends, controlling the population of small insects, eating large swarms of malaria disease carrying mosquitoes and consuming other large quantities of nuisance bugs.

However, even small mammal bats can carry the deadly rabies virus and terminally infect humans and wipe out entire food chains of livestock. Global warming - do we really need it?

LINKS
Giant Bat
http://en.wikipedia.org/wiki/Giant_golden-crowned_flying_fox

Bats, Where Do You Hide?
http://www.dvdsdirect.ie/moviedetails.php?movie_id=12045

Bats Respond to Global Warming
http://www.huffingtonpost.com/dr-reese-halter/bats-climate-change_b_1822865.html