New Sonar Range Sensor

I would rather have reliability.

I just got mine and now have to be very careful not to lose it. This is much smaller than I was expecting.

-- D. Jay Newman

formatting link

Reply to
D. Jay Newman
Loading thread data ...

Thank You : )

Reply to
Jason S. Mantor

: Right now the product is set up to be compatible with serial LCD : displays and most micro controllers. (The 8051 variants I use require

I'm not sure about this, onlyt because tghe serial LCDs I've interfaced to the TTL input my mny AVR were both "inverted" from PC levels. Either one could be hooked directly to a MAX232 to connect to a PC. I'm not all that familier with other controllers.

The one drawback I see with this RS232 interface would me it mkaes it somewhat difficult to connect multiple units. If you used a mcu to fire indiviual units and assumed only that one responded, you could wired-or them I guess to the same serial line. The one benefit of i2c is that it allows multiple units to share a port on a mcu, and have each be addressable.

Reply to
Christopher X. Candreva

I would rather have a multi-drop interface, such as SPI, I2C, or RS485. Of these, SPI is easiest to implement from scratch and many microcontrolers come complete with I2C.

TTL-level RS232 is a compromise that works for me, somewhat. The problem is that most non-trivial robots will want more than one of these. Therefore, a way to use more than one easily.

The proportional voltage is the closest to being useable, but I've never liked using ADCs for this sort of thing when the digital information was available.

The pulse-width signal might be a useable way to deal with muliple sonar units, but I can't try this for a while.

Frankly I don't care about interfacing this to my PC. I would rather interface it to a microcontroller. IMNSHO, of course.

However, that being said, you seem to make a great product.

-- D. Jay Newman

formatting link

Reply to
D. Jay Newman

Posted two code examples. Scroll to the bottom.

formatting link
example for BX-24 and for the BasicAtom. (Code the BasicAtom and Basic Stamp very similar, but not exact.)

The BasicAtom code reads the sensor very fast, and would work well for reading more than one sensor in a row. Sorry, takes two pins per sensor.

Reply to
Bob (Robot Wars Thumper 1997)

This is because all RS232 level shifters invert. An active RS232 signal is a positive voltage, and the inactive level is negative, 3V or more below ground. Ground is an invalid RS232 level. So on the TTL side of the shifter, serial signals are inverted - so a TTL low corresponds to the RS232 active/asserted.

A serial interface which does not use RS232 voltage levels, is, by definition *not* "RS232" but could correctly be called "TTL-level asynchronous serial" or something like that. Such a TTL interface does not have RS232 voltage levels and its signal sense is inverted from RS232, so it is important to use the correct terminology or you will confuse customers and make it more difficult for them to properly connect devices up.

Regards Bruce

Reply to
bboyes

All, Wrong or right, the MaxSonar-EZ1 was designed to interface with micro controllers, especially the basic stamp type micro controllers where there are multiple virtual serial ports, but no built in level shifters. I believe that the MaxSonar-EZ1 data sheet makes it clear that the MaxSonar-EZ1 talks using 0 and 5 volts. Again, wrong or right, the MaxSonar-EZ1 can talk to most micro controllers using this method. I did not want to answer this RS232C question, but I feel compelled, because the 0 and 5 volt levels works so well when communicating to basic stamp type micro controllers. These micro controllers have all the commands built in to handle this type of communication, as do the various microchip compilers that I use.

In addition, I can find many references where the 0 and 5V voltage levels are used to communicate using RS232 timing. I have in general found that these devices call themselves RS232C. Below is just one reference to using the 0 and 5 volt levels. Yes it is "fudged", but it works well for short runs, and not requiring the user to use a level shifter, was a design decision to make it easy for most hobbyists to connect to the hobbyist type micro controllers. If I have confused or misled anyone in this please forgive me.

Practical Tips on Serial Communications

formatting link
I pulled this out of this doc above.

RS-232 and Variations

RS-232 is a standard that describes a common method of serial signalling using a voltage that switches between a positive level for logic "0" and a negative level for logic "1". Per the standard,

  • +2.5 to +15V =3D logic 0 * -2.5 to -15V =3D logic 1

Many products fudge on the standard. For example, a system without a negative power supply may define it this way:

  • +5V =3D logic 0 * 0V =3D logic 1

Serial outputs generated by the BASIC Stamp=AE and non-UART-equipped microcontrollers often use this approach, since it saves the cost of a serial line-driver IC.

You can read the complete datasheet at the above url.

Bob

Reply to
Bob (Robot Wars Thumper 1997)

Bruce, You mentioned, "so it is important to use the correct terminology or you will confuse customers and make it more difficult for them to properly connect devices up."

Agreed!

I have considered what you said. I will be updating the datasheet to reflect the asyncronus serial instead of RS232. I may still mention the timing format is compatable with RS232 so the BasicStamp type users can use it right out of the box, but I will call it what it is.

I am currently working 11 hr days on my day job 7 days a week, so I will have to do this in my spare time! But I still want to get it done by the end of Jan... Good thing MaxSonar-EZ1 sales are handled by another company!

This has been a very good group!

Thanks so much for flushing out so many things.

Bob

Reply to
Bob (Robot Wars Thumper 1997)

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.