2011 August 14

Pressure sensor

I’ve been thinking about what other parts I need to buy for the high-school Robotics Club, so that they can finish their underwater vehicle.

Some I’ve known about for a while, but just haven’t gotten it together to buy the (expensive parts).  For example, they will need several IP-68 connectors for the tether power, for the tether CAT-5 cable (see Long USB cable problem solved), for the motors, and for whatever suite of tools they build for this year’s challenge.  I bought a 4-pin Buccaneer standard connector (made by Bulgin)  for the power tether, and am leaning toward 8-pin mini Buccaneer connectors for the motor and tools.  I’ve still  not decided whether to get another 8-pin mini Buccaneer for the Ethernet connection, or to try using their IP-68 ethernet connector.

One that I only just started thinking about is a pressure sensor for determining depth. The challenges for the past 2 years have involved going to a particular depth, so having a depth gauge is a good idea.

Pressure sensors are classified into 4 types: differential, absolute, gauge, and sealed gauge.  In truth they are all differential, measuring the difference in pressure.  The absolute gauges measure the difference to a vacuum chamber, the gauge-pressure sensors measure the difference to atmospheric pressure, and the sealed gauge sensors measure the difference to a sealed chamber that has a known pressure in it (probably around one atmosphere).

If the club members put the pressure sensor sticking through the wall of the dry box, we could use any of the types of pressure sensor, but absolute or sealed gauge would be best, since we don’t know how much the pressure inside the drybox changes as we submerge it.  The sidewalls will flex, so the pressure will go up, but we don’t know how much.

I spent some time today looking for pressure sensors at DigiKey. It looks like absolute pressure sensors are cheaper and easier to find than sealed-gauge, so we’ll go with them.  There are also price variations depending on whether the sensor has temperature compensation, and on whether the output is a low-voltage differential signal or an amplified one ready for input to a microprocessor A/D input.  I’m pretty sure that we need the simplest interface we can afford, so the ones that don’t need external amplifiers are the best bet.

I also spent some time reviewing how much pressure to expect at different depths, so that I could help the club select the appropriate part.  I found an on-line pressure calculator that can convert depth of water to pressure (in PSI, kPa, or atmospheres).  Each meter of depth adds 9.8 kPa (or 1.42 psi).  In a 20′-deep pool,  they could have up to 59.7 kPa, and in a 12m deep pool (like at NASA) they could have up to 117.6 kPa.  Of course, this is just the water pressure that is added to the atmospheric pressure, so the real range they need to cover is 100 kPa to 220kPa.

It looks like Freescale Semiconductor makes some absolute pressure sensors with a 20–250 kPa range (for example, the MPXH6250AC6T1), which is just about right for us.  They run on 5 v and provide a ratiometric output, that we should be able to read to 10 bits of precision, or about 0.25 kPa, which would be a depth resolution of 1 inch. The accuracy of the pressure sensors is only ±1.5% of 250kPA, which is ±3.75kPa, ±15in, or ±38cm.   They get full points if they are within 50cm, so this is accurate enough for us.  The could calibrate to higher accuracy, by lowering the machine at the side of a pool while looking at a ruler or tape measure along the side of the pool and taking measurements.  So, now that I know what is needed, I can have the robotics club try to solve the design problems.

I think I will have to do one more thing for them, though—the pressure sensor is a surface-mount component, so I think that they will need a breakout board for it.  I’ll design a breakout board that has room for some bypass capacitors and an output filter capacitor.  Although surface-mount, the part has 0.05″ pitch leads sticking out, and so should be hand solderable, though it might be worthwhile to get a heat gun and solder paste to try reflow soldering.

Come to think of it, since the pressure sensor will be glued to the side of the drybox, it might be a good idea to mount the 3-axis accelerometer on the same board.  That would reduce the amount of cabling they need to do.  But the ADXL335 chip has the SMD pads underneath the chip, which can’t be easily hand-soldered.  That brings up the question of whether we try soldering with a heat gun or toaster oven, or pay $12 more for the chip already on a breakout board. (The DigiKey breakout board is the same price and a similar design to the LadyAda  breakout board—both are copying the ridiculously overpriced breakout board from Analog Devices.)

I could play around with a few different designs and stick them on my next PC board run—I want to do a revised version of the HexMotor board anyway, and it won’t cost any more to toss in some sensor boards on the same fab run.

2011 July 12

Long USB cable problem solved

Filed under: Robotics,Underwater ROV — gasstationwithoutpumps @ 22:07
Tags: , , ,

I posted a couple of days ago about determining that the USB cable-length limit is real, and needing to get a USB-CAT5-USB converter. I found a couple for only $8 (and free shipping) from “bargain cable” sold through Amazon.  I ordered one of each, and they came today (order on Sunday, delivered on Tuesday is pretty good turnaround!).

Although the two parts I ordered had different prices:

HDE USB over Cat5/5e/6 Extension Cable RJ45 Adapter Set    Sold by: bargain cable    $8.60 each
USB over Cat5/5e/6 Extension Cable RJ45 Adapter Set    Sold by: bargain cable    $7.99 each

they were identical.  The prices seem to be different today also, but within a few cents.

There is one minor problem:  there is not a USB type-B connector on the slave end, but a USB female type-A.  This is easily fixed (just plug in a standard USB A-to-B cable), but it does indicate sloppy engineering.

50' CAT5 patch cable

I tried hooking one set up with a 50′ CAT-5 patch cable (under $5 from Parts Express) that we are likely to use as part of the ROVtether. I had no trouble downloading Arduino programs or getting data back at 115200 baud—even powering the Arduino over the cable worked fine. So that seems to be one big problem solved very cheaply! I love it when off-the-shelf cheap parts do exactly what I need.

2011 July 11

Long USB cables

Filed under: Robotics,Underwater ROV — gasstationwithoutpumps @ 01:20
Tags: , , ,

One of my Arduino projects is not really mine: I’m coaching a high-school robotics club that is building an underwater remotely operated vehicle for the MATE contest.

They had barely gotten a vehicle assembled (and not yet tested) for last year’s competition, so they decided to work on it over the summer.  Their goal is to have an Arduino and  motor controller in a dry box on the vehicle, and have digital signals sent to the Arduino over low-power cable, with just one power cable for their 12v motor power.

One of the first concerns I had was communication with the Arduino.  The USB standard limits cable length to 5m, and the tether for the ROV needs to be at least 10 and probably 15m.  (The best explanation of the reason I’ve found is on a USB developers’ FAQ.)  I was hoping we could stretch that a bit, as we do not need high-speed communication.  So today, the students chopped up a cheap USB cable (after first making sure it worked) then soldered in 33 feet of cable in the middle.  We tested the cable for continuity and shorts, and everything looked fine from a DC standpoint.  When we plugged it into the laptop, the Arduino power light lit up and the TX and RX lights blinked in the normal way for startup.  That meant that the laptop was probing the Arduino and it was responding.  Unfortunately, the laptop did not recognize that there was a USB slave device present, probably because the ringing in the long cable was causing too much signal interference (the reason for the cable length limitation).  So it looks like the USB standard really is pretty strict about the cable length, even if you only need low-speed communication.

Since we don’t want to put boosters in the tether every 5m (sealing underwater electronics is a pain), we’re going to need a different method.  The USB developers’ FAQ says:

Q:  I really need to put a USB device more than 30 meters away from my PC. What should I do?

A:   Build a USB bridge that acts as a USB device on one side and has a USB host controller at the other end. Use a long-haul signaling protocol like Ethernet or RS-485 in the middle. Using cables or short-haul fiber, you can get ranges upwards of a kilometer, though there’s no reason why the long-haul link in the middle of the bridge couldn’t be a pair of radio transceivers or satellite modems. Embedded host solutions capable of doing this already exist. Also, two PCs connected via USB Ethernet adapters are essentially a slave/slave version of this master/slave bridge.

The RS-485 or RS-422 standards are simple low-speed connections, and it is easy to get a USB-to-RS-485 or USB-RS-422 converter. The RS-485 is a 3-wire half-duplex system (differential signal and ground), while the RS-422 is a 5-wire, full-duplex system (2 differential pairs and ground). Unfortunately, these are all designed to plug into a computer as the master.  I’ve not found one designed to hook up a USB slave device (like the Arduino) to an RS-485 bus.

Converting to Cat5 cable seems like the more popular choice.  For about $8 I can get a USB-Cat5-USB end-to-end solution that is supposed to work for up to 150 feet.  That looks like it may be my best bet, as I already was planning  for them to use a cheap CAT5 patch cable as the digital part of the tether.  There are a few different converters on the market in the $8 price range (here’s another USB-CAT5-USB adapter pair), and the main limitations seem to be  speed (USB 1.1 speeds only) that they need for the USB slave device to have its own power.  Both of those are fine for this application, so we’ll try them out.

Blog at WordPress.com.