Sunday, April 7, 2013

Robosapien V2 - HILED Chest Beam

Robosapien V2 - High Intensity LED Chest Beam

April 07 2013

While browsing "electronics street" here in Hong Kong I came across a really, really bright High Intensity BLUE LED.  You should see this thing when its shining...it's just amazing!




No data sheet is available for this item, but I do have a few facts from the store owner:

- High Intensity Light Emitting Diode (HILED)
- 3.6v
- 3 Watts
- 30 lumens
- 750mA

HKD20 / USD2.50

Thinking that it would be a wonderful addition to my Robosapien V2, I bought it and tossed it on top of the workbench for when I had an extra hour or so to install it.  Well, that was well over a month ago.  I finally found some time to work on this, so here we go!

Robosapien V2 - Stock Chest Plate

Here's a picture of a stock Robosapien V2.  note the chest plate:



I don't dig yellowed plastic, which is what this thing looked like before, so one evening I had a little fun with a black permanent marker and colored in all of the area that was not black with black.  Here's the result:



That there's a pretty silver "disk" in the very center of the chest, just about where the solar plexus would be on a person.  That would seem the natural place to put a chest beam, yes?

Taking a look at the inside of the chest plate, I got lucky.  For some reason, the silver "disk" was a separate piece of plastic, maybe because it's a different color.  Anyway, it was held in place by a plastic weld that looked pretty insubstantial and easy enough to cut out...



It was very easy to cut out.  Too easy.  WATCH OUT for very brittle, old plastic if you try to reproduce this project!  The "welded" plastic shattered when I compressed it just the slightest bit with my diagonal cutters.  It's a very good thing that I had thought to run a cutting knife blade around the circumference of the plastic weld prior to applying any pressure to it...pieces of plastic went flying!


After a little (very) light reaming to make the hole ever-so-slightly larger in diameter, along with some other housekeeping (mostly picking sharp shards of shattered plastic off the floor) the hole appeared to be good to go.  



As with the front of the chest plate, I used a little bit of Black Magic Marker on the back and the edge of the hole to hide any sign of yellowed plastic.  Here's a picture of the inside of the Robosapien V2 Chest Plate, ready for the HILED Chest Beam to be installed:




Voila!  Time for the High Intensity LED to be mounted.

I mounted the High Intensity LED onto the back of the chest plate using a piece of black adhesive foam I had hanging around on the workbench.  The foam I normally use as a soft surround "foam washer" for the rim of a speaker when it is mounted in its enclosure, to prevent air from "whooshing" around the edge when the cone does its thing.  This is equally applicable in a bass reflex or an air suspension configuration...but that's for another post entirely.

The short and sweet version?  


The "foam tape" worked.  It's black.  It's nice looking.  It can be easily removed.  Nuff said.  Here's a pic of the unit mounted in the back of the chest plate with the tape holding it in place:




Here's the a pic of the front of the Robosapien V2 Chest Plate with the HILED Chest Beam mounted, but not yet powered. Pretty innocuous looking.


BUT - Give it a little bit of juice and BOY does that thing throw out a LOT of light!  
Here's a pic of the LED connected (momentarily) to a 3.3v @ 600mA power source derived from a 5v @ 1000mA phone charger.



Here's another pic with the lens centered up:




So, the light is installed and CAN run when powered, but the power supply and logic to finish this project have yet to be figured out, so at best I can really only call it semi-finished.



Powering the Robosapien V2 HILED Chest Beam

I'm considering using a dedicated Lithium Ion battery pack to supply power to the Robosapien V2 HILED Chest beam.  At the moment the idea is to use either one battery or two batteries in parallel so as to give the Robosapien V2 HILED Chest Beam a really, really generous power reservoir to draw on.  

At 2000mAh or 4000mAh it probably won't get depleted all that fast (I hope).  Because it will be kept separate from anything else, if it does somehow get depleted it won't affect any of the other systems that rely on the already installed power system in the Robosapien V2 robot.  

The Lithium Ion battery I have in mind is the Samsung ICR18650-20F.  This is because I already have 9 of them salvaged from an old laptop battery.

Here's the specification sheet:



I have summarized the important bits here:

  • Current (nominal):  2000Mah
  • Voltage (nominal):  3.65v

The nice thing about this source voltage is that it (probably) falls quite naturally within the operating voltage of the HILED.  Furthermore, double (or triple) that voltage and you have a nice source voltage for an ARDUINO.

The only problem I can anticipate is limiting the current to the HILED to prevent it from gorging itself on the unrestricted current being supplied from these pretty powerful batteries.  Without a current limiting strategy, the HILED will probably blow itself away.

Robosapien V2 - Preventing HILED Chest Beam Self Destruction

Given the propensity for LEDs to destroy themselves in the absence of a limiting resistor (used to constrain current flow through these devices) I really think that I should put in some kind of current limiting device to protect the HILED from itself.

As a side note, I also want to be able to turn the HILED on and off by way of a semiconducting device, not a physical switch or by manually disconnecting / reconnecting the HILED, which can be hard to do on a robot that is autonomously walking around.  So the preference is to use a discrete, solid state electronic device to turn the HILED on and off, not  a mechanical one.


Enter the transistor.

Initially, I thought the design of this solution would revolve around the creation of a solid-state transistor "switch", probably a member of the PN2222 family, which I can buy for HKD1.00 / USD0.13.

Here's one circuit I was considering using...


BUT - it looks like we may have a problem here.  Looking more closely, I see that the PN2222 family of transistors are only capable of handling a maximum current (Ic) of 600mA.

This HILED can draw as much as 750mA at peak current, which is 20% outside the operating specifications of the transistor, were it to be allowed to operate at at full power.  

Moving 750mA across a transistor rated for 600mA is generally not a good idea, especially when the plan is to use the transistor as a "solid state switch", which means that it's not being ramped up gradually or gently.  In this type of implementation, when the circuit is turned on it gets turned on ALL THE WAY, as in full blast.  

Doing any less would be a bit of a waste.  Don't we want the brightest HILED output safely possible?  Why else do we buy these HIGH INTENSITY lights?  

But if we really let go with a PN2222A based circuit we run a very real risk of smoking out our little "switch" by passing too much current through it - like 120% of what it is rated to handle.  If it doesn't burn out it will probably run extra HOT, which is also bad news in a plastic (read:  flammable) enclosure.

Still, I noticed some nice things about the PN2222A while looking at the specification sheet.  The PN2222A is a "logic level" NPN transistor, meaning that while it can handle up to 30v flowing across it, the control of that flow is controlled by a relatively low control voltage, 5v. which is exactly the Transistor to Transistor (TTL) voltage levels used in most CPU and Micro-Controller situations.  So it's going to figure in circuits in the future - for sure.

All great - but my problem is not handling high voltage - it is handling high CURRENT.

My problem is other way around.  The voltage requirement of the HILED is quite low, 3.6 volts to be exact.  The voltage supplied by the batteries is 3.65 volts.  This means I want to drop the voltage by just half a volt and also keep the current below 750mA.  Truly, this is a  negligible voltage drop.  But without some kind of resistor limiting the current to 750mA, the current available to the HILED could be suicidal, for it or any other member of the LED family.  

Let's look at regular LED technology for a second.  Regular LEDs normally pull 10ma to 20ma at 1.5v.  They put out a very small amount of light, really wimpy by comparison to what we're implementing here.  This HILED is basically designed to be part of a Light Bulb  and it pulls somewhere between 50x and 75X that of a conventional LED when operated at full throttle.


So, I'm thinking of approaching this problem from the other way around.  

  • I want the supplied voltage to be as close a match to the HILED as possible
  • I want to limit the current being supplied to the HILED as little as possible
  • I want to use a "logic level" solid state switch to turn it on and off
  • I want to generate as little heat as possible when it is on
  • I want to generate the most light possible when it is on

So, from a design point of view, I to balance the voltage supply as close as possible to that of the HILED and not mess around too much from there.  I don't want to be generating a bunch of heat.  I don't want my resistor to take up a lot of room, like a honking big chunk-o-ceramic (like 10W) resistor at some miniscule resistance (like .01 Ohm).  Time for a re-think 

Enter the Pencil Graphite Resistor

We will probably have to go with a beefier transistor type here.

We could go with a member of the FET, like a power MOSFET...

Here's a handy tutorial on MOSFET technology from Fairchild Semiconductor, one of the high tech companies that I admire most:  http://www.fairchildsemi.com/an/AN/AN-558.pdf

Here is another really useful document I found regarding How to Choose a MOSFET

Another option is to try to find a slightly more beefy NPN transistor than the PN2222A - maybe there's a CHUNKY version of that particular transistor is out there?

These are the characteristics we are looking for:

- Can be controlled by a low reference voltage (like 0v - 5v)
- Can handle a voltage drop equal to that of the HILED (3.6v)
- Can handle current of at least 750mA 

Applying a safety factor of "The Golden Ratio", I would look for a transistor or Power MOSFET capable of the following:

Trigger Voltage:     5v   (or "logic level")
Carrying Voltage:  12v (minimum)
Carrying Current:   2A  (minimum)

Sooooo...is there a Transistor/Power Transistor/MOSFET out there with anything close to the above characteristics that I can buy at my local electronics store for cheap?

YES THERE IS

Ladies and Gentlemen, please allow me to introduce the NPN Silicon Epitaxial Hitachi 2C1162, which cost me a grand total of HKD8.00 / USD1.00



Here's the important bits:


Trigger Voltage:     5v
Carrying Voltage:   35v
Carrying Current:   2.5A


OK - looks like we've found our "solid state" switch!

Robosapien V2 - HILED Chest Beam Triggers

My ultimate plan is to have the Robosapien V2 High Intensity Chest Beam triggered under two different circumstances:


  1. Turn on automatically should ambient light levels fall below a certain threshold
  2. Turn on (or off) for an arbitrary amount of time if the onboard ARDUINO says so


Robosapien V2 - HILED Chest Beam Light Level Trigger



Here's a reference about light levels that may help to start out this section a little bit:





Automatic Mode:

It would be nice if the Robosapien V2 HILED Chest Beam was activated whenever it entered or encountered a darkened environment (say 20 lux) for an "extended" amount of time (say 2 to 5 seconds).  I think the best way to accomplish this is to use a photo sensor circuit that reports on instantaneous light intensity levels.  

If the light level falls (and remains) below the light threshold for the specified duration, the HILED Chest Beam gets activated.  To prevent "strobing" the HILED Chest Beam should be activated for a reasonable minimum amount of time (say 15 seconds).

So, there's a few important questions to be answered when it comes to this circuit:



  1. At what light level threshold should we trigger the HILED?
  2. How long should the light level threshold condition be maintained to trigger the HILED?
  3. Once we decide to turn it on, for how long should we activate the HILED?
I also need to think about the design and installation of the light level sensor  circuit.  

I already have a light level sensor - but where to put it?  I've been considering locating it in the Robosapien V2's mouth [ED:  No go - there's something in there already], but that may not be the right place as when the beam goes on the light level may defeat the sensor.  Maybe it should be integrated into an area where the light isn't shining (pointing backwards as part of the Expansion Backpack?  Pointing up?  Pointing down?)

Manual Mode:
The other design goal I have is for the Robosapien V2 HILED Chest Beam to have a manual over-ride feature via an ARDUINO "wedge" control.  This would enable an operator to manually turn the HILED Chest Beam on off indefinitely whenever they desire.  Of course, this implies that I am going to be installing an ARDUINO in the Robosapien V2, which comes with its own power requirements:




    So, for the moment, this project is going to go ON HOLD because the above control environment requires a bunch of other project to be implemented and I am only just started  thinking about them. 


    • Robosapien V2 - Expansion Backpack Project
    • Robosapien V2 - Power Elevator Shoes Project (maybe)
    ...to be continued...


    Incremental Development

    How about taking an incremental development approach to the HILED Chest Beam project?

    So, why not approach it that way, develop a stand alone Robosapien V2 HILED Chest Beam?  


    I would approach it like this:


    Autonomous Mode:


    1.  When it is dark Instantly turn on.  When it is light, instantly turn off.


    • This is an "instantaneous" Photo Switch

    2.  If it has been dark for A seconds, turn on.  Once it is light, instantly turn off.

    • This is a "delay on" Photo Switch

    3.  If it has been dark for A seconds, turn on.  If it has been light for B seconds, turn off.

    • This is a "delay on, delay off" Photo Switch

    Everything in the above is great for autonomous mode, but how about when I want to take control of the robot?

    Command Mode:

    4.  Turn on when an ARDUINO says YES

    5.  Turn off when an ARDUINO says NO


    Once the above circuit is fully proven outside the Robosapien V2 I will integrate it from the perspective of placement and power. 

    Some of the design considerations for this project are:

    1.  We should design this circuit so it doesn't introduce a new voltage into the Robosapien V2 operating environment if at all possible.  if we do choose to introduce a new voltage into the operating environment, it should be a standard voltage that is widely applicable to the other projects in the pipeline (other LED projects, ARDUINO, etc...) so the voltage introduced should be one of:

    • 1.5v
    • 3.3v*
    • 3.6v**
    • 5v***
    • 6v*
    • 7.2v**
    • 9v*
    • 12v***

    * Already present (or potentially present) in the Robosapien V2 power environment
    ** These are popular Li-Ion voltages
    *** These are popular TTL and motor voltages

    So today I returned to Ap Liu Street to go looking around for components for my various little projects (this one included) as well as just to relax...I know, most people don't find placing themselves in the middle of an open air market swarming with thousands of people relaxing, but I do.

    Anyway, I got my hands on some interesting things for this particular project, and I also returned to the store where I bought the HILED and got more information on it, which I used to update the information at the beginning of this posting (price, watts, mA, etc...).

    Here's a photo of the parts bin:

    <pic here>

    The other few things I picked up were a cheap multimeter with an NPN/PNP transistor tester, a photo diode, some resistors, some transistors,  rubber feet for the Power Shoes Project, a remote control light switch, some 2.54 DuPont connectors and various other other little bits and pieces.

    Now, with respect to the photo diode, I have some definite ideas about where to put that, after some small adjustments and the purchase of more resistors, a surface mount 100K variable potentiometer, and a CA3140 Op Amp, a type of component that I've never really discussed before, but which I plan to use as a signal comparator.


    My thanks to www.electroschematics.com for the above circuit!

    So the plan now is to drive the HILED power transistor by mentioned above.


    No comments:

    Post a Comment