Build a BAT Penguin (Bat Mon) using your Parallax Penguin Robot. Considered by some as another Penguin superhero, the Bat Penguin has one amazing super power and its own super suit.
Bat Penguin by Humanoido
Resources/Code: PT3.pdf, Penguin_bat.bpx, penguin_ bat_suit.jpg, Materials etc: Bat Suit, tape, meter, printer, paper, scissors, etc.
History
This article is adapted from Humanoido's Penguin Tech Magazine issue number 3, pages 1, 2, and 3, copyright 10-08-08. The original posting on the Parallax Forum is now found. The backup article and code posted at the PRS website was deleted along with the website. This material is pooled together from Humanoido's Penguin Robot archives.
RIGHT - BAT Penguin in action with battery monitor and fully functional Bat Suit. Utilize the jpg template to create this outfit. The original DIA file is also available.
Build the Bat Penguin!
Did you know the stock Parallax Penguin Robot has a built in battery monitor? In this article, we’ll show how to find the hidden and perhaps the most useful stock feature on your robot! Humanoido code for Bat Penguin or "Bat Mon" can monitor the battery level.
LEFT & BELOW LEFT: Printed black & white designs for the Bat Penguin hood and cape are stencil traced and cut out from paper or cardboard. DIA program was used for the overall design and both a native file and JPG were originally provided at the PRS website. For now, all included photos can act as guidelines to create the hood and cape.
Battery Monitor Introduction
How can you make a battery monitor for your Penguin Robot without using any add-on parts and not spending a penny? Another impossibility? Don’t fret because this exclusive PTech article will show you how to accomplish this wondrous feat. Stock Penguins have the guts for a battery monitor. This circuit
uses the LED and light sensor – both exist on Penguin’s CPU board, and it’s a cinch to add the same on other robots.
uses the LED and light sensor – both exist on Penguin’s CPU board, and it’s a cinch to add the same on other robots.
The Power LED is the Key
The tiny blue power LED on Penguin’s motherboard is the mother-load of help when it comes to taking care of onboard batteries! It’s shows battery level power. Notice, when batteries are new, the LED is bright? When batteries need replacing, the LED is significantly dim. A more quantitative method of brightness level, compared to visual inspection by human eyes, is needed. Meet Bat Penguin!
Left Photos - the CPU board awaits a tiny modification. Below - the CaS light level sensor is manually bent back 180 degrees towards the power LED. Now the right photo sensor can read the LED brightness level and determine the battery condition.
Below - to measure voltage, connect positive (red +) and negative (black -) leads to the two metal tabs on the bottom of the CR123A holder. The measurement shown is the combined voltage of two batteries in series.
This is Battery Eye that watches the power LED. When activated it can determine light level of the power LED using one CaS light level sensor (see photos p.3). The CaS sensor is a cadmium sulfide photocell. Each Penguin has two at the front of the top board. This cell is sensitive to light, and is built into a resistor-capacitor circuit. RC Time is a measurement of how long it takes for a capacitor to lose a certain amount of its stored charge as it supplies current to a resistor. See What’s a Micro, Parallax. The discharge time is measured and becomes a function of the light level. Previously calibrated data helps determine battery voltage. As the battery voltage decreases, the LED intensity will change. Measuring this amount of change will approximate the battery voltage. Knowing battery voltage and having a condition indicator can avoid many pitfalls before they happen. Knowing when to replace batteries is one of the best things ever to happen to Penguin!
Photo Notes: This is the assembled BAT Penguin, complete with functional Bat outfit. The cape supplements the hood which has a tiny shroud that helps light shield the active power LED and photoresistor. After printing the suit on paper, cut out the outline and cut the tabs. The Bat suit is available in the original drawing DIA file, and as a jpg file.
Left- Calibrate in darkness - a light sensitive cell sees light from the LED. The sensor determines resistance based on observed light brightness. Note: the light sensor is very sensitive to reflections and this may affect readings.
The Bat Suit
The Bat outfit consists of two pieces: the hood and the cape. This is a functional suit, i.e. it consists of the sensor flap (as marked on the hood) which will actively shroud the motherboard CaS light detector and power LED. To duplicate the “power” suit, refer to the suit guide. At the bottom, 12.5 cm length is indicated. Copy and enlarge this stencil until the size is exact and print out. Cut out the paper making sure to carefully cut the two slips at the Sensor Flap location. Fit the suit by folding over the bottom tabs. The tabs fit under the motherboard. Fold out the Sensor Flap and form it to rest over the LED and CaS light detector. Apply a piece of black tape to completely seal the pair from outside light, making sure not to obstruct the blue LED. Note the positions of the hood and cape in the photos. The hood is held end to end by a small piece of black or clear Tape. The cape is also taped, this time to the sides of the battery compartment. Make certain the CaS light detector will be fully shielded from all room light, and that no light can get through the black tape or black shroud.
Seal and Eliminate Light Leaks
This is no easy task. Aside from the LED, absolutely no other light, including reflections, must reach the photodetector. There’s several ways to seal up the sensor from outside light. 1) the Bat-Shroud, 2) Tape, 3) Clay, and 4) Paper Mache, or any combination of the above. With the shroud in place and Penguin Robot under medium light from a lamp, run the main program. Continue to put flat black paper and then layers of tape across the CaS cell and LED, until the reading is stabilized to one number that does not change. The first layer of flat black construction paper will help eliminate reflections near the sensor under the tape. Because tape does not always stay in position, more ideally use a small lump of non-conductive moldable dark art clay as it more firmly anchors its position. (Do not obstruct the line of sight from the LED to the CaS cell.) If this is not available, try mixing water, small newspaper strips and flour into a moldable paper Mache mix. Press in place when batteries are removed from the robot. Paper Mache is quite messy – try not to spread material to other places on the circuit board. Smooth over the shroud as much as possible and when dry, paint it black with a marking pen to prevent light from going through.
How to Activate the Device
Now for the amazing stuff. Referring to the photos, fold over the right hand CaS light level detector 180 degrees. Do this only once so as not to stress the wire leads. Adjust the sensor to face the power LED as close as possible. Be careful not to stress the base of the light sensor leads where they enter the board -- fold the leads and don’t pry the leads where they enter the board. When adjusted, the sensor should make contact with the board and directly face the LED.
Left - Penguin’s built-in battery monitor circuit. The circuit can be duplicated for Boebot or Scribbler.
Regaining Power LED Function
After the shroud is installed, the power LED light is invisible. Aside from the power switch position, on/ off status is unknown. To regain the function, code has a simulated power LED, from a graphic character on the segment display. Note - with the LED blocked, RC will be extremely high, possibly above 4,000 and less than 1,000 when the LED is on and not blocked.
Left: use this template for creating the bat suit. The jpg file is easily printed and cut out of printer stock or enlarge and print this image. Note the innovative built in sensor shield flap. All designs © by Humanoido August 1, 2008.
Calibrating
Bat Penguin must be calibrated or it will not work properly. Calibrate by using a meter that can read voltages called a voltage ohmmeter or VOM, and batteries for at 5 to 4.9 volts. A variable bench power supply regulated in increments would make calibration easier. The combined battery set voltage is measured, not the voltage across single batteries. The Lithium Photo CR123A is a 3-volt battery. New batteries may read slightly higher. Penguin operates from a 6-volt battery supply. Calibrate batteries under load/drain with Penguin on. Depleted batteries may erroneously read high voltages when not loaded. Maintain room temp. In summary, the code is used as a calibration program. RC values for 5 & 4.9 volts are noted and placed into the program. This becomes upper/lower limits, above 5-v and below 5-v. Five volts can be considered the lowest safe operating v- level. Anything lower trips audible/visual alarms. This value may be changed to fit differences of each penguin robot and calibrations.
Code
Bat code adds a battery related monitor function. This is a step by step summary of the program’s accomplishments: 1-RC time raw measurement, 2-Generate Power LED Substitute (PLS), 3-Report Raw RC, 4- PLS Status on Debug Screen, 5-Battery Test, 6-Battery Report, 7-Determine Alarm Condition, 8-Activate Alarm Function if Needed, 9-Recycle. Status is on the Debug screen. In summary, when the batteries begin to deplete, the blue power led will lose brightness. The CaS photo cell is bent backwards facing the LED. RC measurements are taken and compared with voltage calibration values. If the number is too low or too high, the battery condition is reported as good or bad. If bad, alarms will go off and it's time to replace the batteries.
The Alarm
The alarm is very unique as it comprises both alternating display of 2 graphics and audible alarm. This loops in the program until the batteries are removed or Penguin is powered down. The alarm also reports to the Debug screen when a computer is attached. It’s all about avoiding the Throes of Death! For the first time, Penguin can avoid an untimely death. Not letting batteries deplete too much is very important. Robots go through a death routine often involving random behaviors, some of which can over- stress the servos. The more complex the robot, the more complex the process. Some humanoids will fall down to the floor flailing arms in some unnatural manner, and go through a final writhing or twitching process. Penguin biped is balanced – power on or off, so the action is typically that as described elsewhere.
Download the magazine with the Bat Penguin article, full index, along with the original DIA design file and a jpg to make the bat suit, plus code to drive the Penguin Bat Mon persona. Bat Mon is a play upon words for Batman and Bat Monitor.
Now you have another item from your wish list and improved your robot 100%. With a little extra code, memories can be saved before the batteries fail. ●