EmbeddedRelated.com
Forums

interfacing a H21A1,2,3 IR detector with a BX24

Started by carolkysela April 29, 2005
> ... many with a resolution from 3mm and below...

Sure. One beauty of laser distance measurements is the resolution,
which can approach optical wavelengths (~1um), and the distance, which
can be sub-millimeter, hundreds of feet or hundreds of thousands of
miles. None of these systems is inexpensive, though, and some are even
illegal to possess in the USA today without DOD permitting.

There is an absense of affordable laser ranging devices in the practical
ranges of inches to dozens of feet, it appears, but here are a few DIYs,
one vision-based and one time-of-flight, if anyone is inclined to pursue
it:

http://www.users.qwest.net/~kmaxon/page/side/art9_137.htm
http://repairfaq.ece.drexel.edu/sam/lr/ Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


I appreciate all the discussion. I haven't had time to check out
inexpensive laser range finders yet but something hacked is probably
what would have to be used I don't really understand laser range
finding and this would be a good topic for me to study as well. Is it
possible to build a laser range finder from readily available components?.

tombhandley wrote:

> Tom, I was in wrong about the Sears/Craftsman unit. It uses a LASER
> for pointing and a US sensor for measuring. I did a google search of
> LASER distance measuring devices and found many with a resolution
> from 3mm and below. In anycase, this is a 'dead horse'...
>
> - Tom
>
> --- In basicx@basi..., "Tom Becker" <gtbecker@r...> wrote:
> > > ... hack a Craftsman or Radio Shack unit...
> >
> > I'm not aware that a consumer laser rangefinder for short distances
> > exists, Tom; the short-range distance devices are usually
> ultrasonic, I
> > believe, and the laser devices that fill the shelves are just
> straight
> > line makers.
> >
> > Golf and hunting laser rangefinders can't see less than 30 feet or
> so -
> > and then with poor resolution of a yard or meter - but can range a
> > building at 1000 feet; they won't help with this app.
> >
> >
> > Tom
> >
> >
> >
> > Tom Becker
> > --... ...--
> > GTBecker@R... www.RighTime.com
> > The RighTime Clock Company, Inc., Cape Coral, Florida USA
> > +1239 540 5700 >
>
> *>. >
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.11.5 - Release Date: 5/4/2005




Has anyone stumbled across information on attempts to download code to a
BX24 via RF or IR. One could not verify a download in the usual manner
of course but still it would be a useful trick.



Carol, you can build a LASER range finder from scratch but it would
require a variety of engineering disciplines and a thorough knowledge
of optics. Tom Becker said he was able to reach a 1/4" accuracy and I
think you might want to take a look at his comments as far as a cable
and an idle wheel. If you can spend money, do a web search for very
accurate LASER sensors but they are expensive...

- Tom

--- In basicx@basi..., Carol <carolkysela@y...> wrote:
> I appreciate all the discussion. I haven't had time to check out
> inexpensive laser range finders yet but something hacked is
probably
> what would have to be used I don't really understand laser range
> finding and this would be a good topic for me to study as well. Is
it
> possible to build a laser range finder from readily available
components?.
>
> tombhandley wrote:
>
> > Tom, I was in wrong about the Sears/Craftsman unit. It uses a
LASER
> > for pointing and a US sensor for measuring. I did a google search
of
> > LASER distance measuring devices and found many with a resolution
> > from 3mm and below. In anycase, this is a 'dead horse'...
> >
> > - Tom
> >
> > --- In basicx@basi..., "Tom Becker" <gtbecker@r...> wrote:
> > > > ... hack a Craftsman or Radio Shack unit...
> > >
> > > I'm not aware that a consumer laser rangefinder for short
distances
> > > exists, Tom; the short-range distance devices are usually
> > ultrasonic, I
> > > believe, and the laser devices that fill the shelves are just
> > straight
> > > line makers.
> > >
> > > Golf and hunting laser rangefinders can't see less than 30 feet
or
> > so -
> > > and then with poor resolution of a yard or meter - but can
range a
> > > building at 1000 feet; they won't help with this app.
> > >
> > >
> > > Tom
> > >
> > >
> > >
> > > Tom Becker
> > > --... ...--
> > > GTBecker@R... www.RighTime.com
> > > The RighTime Clock Company, Inc., Cape Coral, Florida USA
> > > +1239 540 5700
> >
> >
> >
> > ------------------------------
------
> > *>.
> >
> >
> >-------------------------------
-----
> >
> >No virus found in this incoming message.
> >Checked by AVG Anti-Virus.
> >Version: 7.0.308 / Virus Database: 266.11.5 - Release Date:
5/4/2005
> >
> >


Carol,

The simple answer to your question is that you can only download a
program via the serial port or USB if you have a USB to RS232 converter.

The more complex answer is that there are some ways to do it, if you
want to invest in some effort:

1. Write a bootloader program in BasicX that communicates via IR and
overwrites some or all of itself. I have attempted some self-modifying
BasicX code before and it is not easy to get right. Knowing about the
internals of BasicX certainly help (see
http://home.austin.rr.com/perks/basicx/Articles/)

2. Invest in a second BX-24 (loader) that communicates with the first
one (master). When a new program is ready to be downloaded, the master
one gets into an idle condition, the loader receives the code and writes
it to the EEPROM attached to the master using the SPI port. The loader
should probably keep the master RESET low, and uses says pin 20 as the
CS for the master EEPROM. Obviously you will need to connect the
corresponding MOSI, MISO and SCK pins together as well. The loader can
verify that the EEPROM is stored and release the RESET line. The master
should now execute the new program.

Mike

> Has anyone stumbled across information on attempts to download code to a
> BX24 via RF or IR. One could not verify a download in the usual manner
> of course but still it would be a useful trick.
>



Thanks Mike, this will get me started at least. It will probably turn
out that I will teach myself why I don't want to do it but one never
knows until one tries.

Mike Perks wrote:

> Carol,
>
> The simple answer to your question is that you can only download a
> program via the serial port or USB if you have a USB to RS232 converter.
>
> The more complex answer is that there are some ways to do it, if you
> want to invest in some effort:
>
> 1. Write a bootloader program in BasicX that communicates via IR and
> overwrites some or all of itself. I have attempted some self-modifying
> BasicX code before and it is not easy to get right. Knowing about the
> internals of BasicX certainly help (see
> http://home.austin.rr.com/perks/basicx/Articles/)
> <http://home.austin.rr.com/perks/basicx/Articles/%29>
>
> 2. Invest in a second BX-24 (loader) that communicates with the first
> one (master). When a new program is ready to be downloaded, the master
> one gets into an idle condition, the loader receives the code and writes
> it to the EEPROM attached to the master using the SPI port. The loader
> should probably keep the master RESET low, and uses says pin 20 as the
> CS for the master EEPROM. Obviously you will need to connect the
> corresponding MOSI, MISO and SCK pins together as well. The loader can
> verify that the EEPROM is stored and release the RESET line. The master
> should now execute the new program.
>
> Mike
>
> > Has anyone stumbled across information on attempts to download code to a
> > BX24 via RF or IR. One could not verify a download in the usual manner
> > of course but still it would be a useful trick.
> >
>
> *>. >
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.11.5 - Release Date: 5/4/2005




> ... BX24 via RF...

My rotating project platform carries a TDK Blu2i transceiver module in
cable-replacement mode that is great for application data both ways at
115200 (very cool to control it with a Bluetoothed PDA, from 300 feet),
but it is slow in toggling DTR/ATN. Sometimes I can get a successful
download through it, but more often not. Other Bluetooth solutions
might work better.

Now that I think about it, I haven't tried the BX-24p in that socket;
it's ATN signaling is simpler. I'll give it a shot tomorrow. Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


HAVE YOU LOOKED INTO THE RS-232 BLUETOOTH DEVICES FROM HTTP://WWW.AIRCABLE.COM

I USE THEM BETWEEN 2 PC'S AND ALSO BETWEEN A PC AND A TERMINAL NODE
CONTROLLER(TNC) YOU CAN GET THEM WITH MALE OR FEMALE CONNECTORS. BEST COMBO I
HAVE FOUND IS ONE MALE/ONE FEMALE AND USE GENDER CHANGER IF NEEDED.

73
SPENCE
K4KEP


> HAVE YOU LOOKED INTO THE RS-232 BLUETOOTH DEVICES FROM

Probably you mean http://www.aircable.net but have you tried these
modules specifically with the BX-24 IDE and achieved reliable downloads
through them, Jim? Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


BOYD S.(SPENCE) MINER wrote:

> HAVE YOU LOOKED INTO THE RS-232 BLUETOOTH DEVICES FROM
> HTTP://WWW.AIRCABLE.COM
>
> I USE THEM BETWEEN 2 PC'S AND ALSO BETWEEN A PC AND A TERMINAL NODE
> CONTROLLER(TNC) YOU CAN GET THEM WITH MALE OR FEMALE CONNECTORS. BEST
> COMBO I
> HAVE FOUND IS ONE MALE/ONE FEMALE AND USE GENDER CHANGER IF NEEDED.
>
> 73
> SPENCE
> K4KEP >
> *>. >
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.11.6 - Release Date: 5/6/2005
I had not looked at them before but these seem to be pretty nifty
devices. I have a project in which an rf receiver is already attached
to a BX24 so as to control other devices via the BX24. The thing is the
rf/BX24 objects are in a sealed box so if I wish to reprogram I need to
break into the box which is a real pain. I suppose that I COULD stick
yet another component in the box but it seems a shame being that one
receiver is already in there. The receiver is connected to pin 12 and I
will continue to brainstorm somehow downloading code through this link.
A second eeprom maybe???