Subject:
|
Sonar question
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Sat, 24 Oct 1998 09:13:56 GMT
|
Original-From:
|
Eric Noyau <noyau@apple.com/IHateSpam/>
|
Viewed:
|
1246 times
|
| |
| |
Hi all,
I'd like to install sonar capabilities in my robot and I went to the FAQ to check how it was "recommended" to do it with the Polaroid OEM kit (It's at http://el.www.media.mit.edu/groups/el/projects/handy-board/software/sonar.html). this seems pretty straightforward to do but I'd like to use 2 sonars, not just one, to give my robot a more stereoscopic view of the world.
By making the assumption that I'm never going to fire both sonars at the same time but one after the other I did convince myself that I can share a lot of connections between the two sonars board: basically there is only the need for one additional pin.
There is 5 things necessary to connect a sonar board with the HB:
- ground (unregulated motor power): can be shared
- Vcc (unregulated motor power): can be shared
- timer input (A0, timer input 3): can be shared with the addition of two diodes to avoid a return current on the unused sonar (is the diode really necessary?)
- BINH (port D4): to inhibit the blanking. Can be shared too.
The only one that cannot be shared is the INIT line, connected to the port D5.
Can I connect my second board INIT to D3 for this purpose? Here is a crude diagram of what I'm thinking about:
+ : connections
->|- : diode
/\/\ : resistor
---- : wire
Board1 Board2
GND -------+-------- Motor power ground
GND --+
V++ -------+-------- Motor power +
V++ --+
ECHO --->|-------+---- Sensor 7 (A0)
ECHO -->|--+
BINH --------+-/\/\--- Pord D4
BINH --+
INIT ----------------- Port D5
INIT ----------- Port D3
I can modify the code in the sonar.c to do bit_set(0x1009, 0x38) in sonar_init and having a sample_right and sample_left functions with the only difference being the bit_set(0x1008, 0x20) replaced by bit_set(0x1008, 0x08). As long as I don't use both sonar at the same time I'm fine right?
Does it make sense? Am I missing something crucial somewhere? The part I'm not sure about is the use of D3. If I understand the MC68HC11 reference manual correctly I can just use it the same way D4 and D5 are. D2 is apparently unusable as an output in the mode the SPI is in, but D3 should be possible to setup (I guess I'm going to reinstall monsterscope on my NeXTCube tomorrow to check my assumption!).
Otherwise is there a way to use a single Polaroid board for two transducer? This will reduce the cost (and the size) of this whole setup! And talking about cost, does anybody knows a cheap supplier for these sonars? Wirz Electronics want $50 for one and $94 for two... And it's $99 for 2 direct from Polaroid. Anybody cheaper (and no, I don't have a hackable Polaroid camera at home ;^)?
Thanks in advance,
-- Eric
|
|
Message has 1 Reply: | | Re: Sonar question
|
| Eric Noyau wrote: <snip> (...) <snip> (...) <snip> (...) <snip> I asked about this a few months back, and Fred Martin himself suggested I might try the very same connection scheme that you mention. Here's what he suggested: <snip> (...) According to (...) (26 years ago, 24-Oct-98, to lugnet.robotics.handyboard)
|
Message is in Reply To:
| | data capture
|
| hello, i am trying to send a data array to my PC from the handyboard thru the serial cable. a couple months ago, i was advised to use a terminal emulator to capture the data. this has not worked, however. i was told about using a null modem cable (...) (26 years ago, 20-Oct-98, to lugnet.robotics.handyboard)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|