High Altitude Sensing Board

Hello,

Im trying to set up a system on arduino. I would like to use the High Altitude Sensing Board (http://www.sparkfun.com/products/9944) connected to an Arduino Pro and also have a logomatic v2 (http://www.sparkfun.com/products/10216) connected to the Ardunio Pro. I want it to just take all the information sent from the altitude board and save it on the logomatic. im having difficulty getting it all to communicate. I have been hooking the altitude board up to the serial ports (tx to tx, rx to rx) on the arduino (arduino has some simple Serial.read() code) and when i check the serial monitor i get one line of jumbled characters and then -1 repeating. I have discovered that when i hold the reset button on the arduino pro i get consistent lines of data from the altitude board.

The high altitude board was only available for a short time and has very limited information about it. Does anyone have any solutions to setting this up?

Thank you

Can you tell us specifically what pins you have the HASB connected to ? Also am I correct in understanding that at this moment you don’t have the logomatic connected to anything ? That you are trying to read the HASB and send that data over a USB cable to a PC ? How are you connecting the Arduino to the USB … via some FTDI board+cable ? Are you sharing the Arduino’s Tx/Rx pins (for serial communication) between the FTDI and the HASB ? If so, that’s probably your problem.

For the initial problem of having to hold the reset button to get the correct results i didnt have the logomatic connected to anything yet, eventually i want to be able to run the information to the logomatic but thats another step.

I had the HASB connected to the RX0 and TX1 pins on the arduino pro (which are separate from those used for serial communication).

I am using a FTDI basic breakout board to connect the arduino pro to my computer, so the arduino-computer connection has seperate RX and TX pins than the HASB. (HASB has RX0 and TX1, FTDI has RX1 and TX0)

njbraskey:
I am using a FTDI basic breakout board to connect the arduino pro to my computer, so the arduino-computer connection has seperate RX and TX pins than the HASB. (HASB has RX0 and TX1, FTDI has RX1 and TX0)

I think you might want to double check that. Look at the schematic below. I think you’ll find that the general purpose I/O pins, 0 and 1, labelled Rx and TX, that I believe you have connected to the HASB are in fact the same serial port as used by the Arduino Pro to talk to the FTDI chip. These pins are “isolated” via 1K resistors but go to the ATmega MCU’s only hardware serial port (UART). Those MCU pins, Port D pins 0 and 1, then also go (w/o any resistors) the JP5/COM connector, where I think you have your FTDI cable attached, where they are labelled RX-I and TX-O (perhaps mislabelled as TX-0, TX-zero). So what happens is whenever the FTDI is transmitting or the MCU is transmitting the HASB I/O gets swamped due to those 1K resistors. This is why people use software (NewSoftSerial seems to be common) to make a serial port out of other general purpose I/O pins. You can timeshare this serial port/pins but you do have to make sure that the FTDI and HASB aren’t trying to communicate at the same time and realize that all comm to the ATmega will also be seen by the HASB.

http://arduino.cc/en/uploads/Main/Ardui … ematic.pdf

Sensing board+Arduino+Logomatic = 3 microcontrollers = 3 software which must work together :shock: :roll: :mrgreen:

Arduino is able to do all the work alone with some additional shields and sensors breakout boards.

Or connect a SD breakout board to the sensing board and modify the code.

Or transform the sensor boards as an Arduino board by programming the Arduno bootloader, and add a SD socket.

Or connect sensors breakout boards to logomatic, and write a software from scratch.

Look also at some IMU boards which include everything you need, except the humidity sensor.

Angelo

Polux rsv:
Or connect sensors breakout boards to logomatic, and write a software from scratch.

I assume the OP has some unstated reason for having the Arduino in the mix, but yes, you could just connect the HASB to the logger (or even the smaller serial logger) and, once everything is configured, have the data go directly to the logger … no Arduino needed.

@Mee_n_Mac

We can connect the HASB directly to the datalogger and it does work correctly, but we need to connect it to the arduino to control it still. The whole set-up needs to run for 1-2 hours and we were worried about the battery lasting and having thousands of entries that arent necessary (only need to record for about the last 15 minutes of that hour or two)

We are currently trying to find a way to draw the altitude measurement from the HASB by itself to use in activating the connectiong between the HASB and Datalogger.

We were trying to connect directly to some pins on the HASB but we havent been able to find the correct connection yet. Any suggestions?

Thanks

Let me see if I understand what you want to do. You want to have an Arduino control the HASB, perdiodically turning it on and getting a pressure reading from it to the Arduino. Then, depending on the pressure read, leave it on and have it send data to a logger (logomatic v2). I’ll assume you have some way to control power to the HASB and logger (relay, FET, ???) so 2 possibilities come to mind.

One way is to have the Arduino take all the data from the HASB and relay that via a seperate set of serial data lines (Tx, Rx) to the logger. That is, the connection from the HASB to the logger is via the Arduino and it’s software. That way the Arduino only sends the logger the data when the Arduino has decided it’s time to do so. The potential drawback is that the Arduino then needs 3 sets of serial lines; one set (already on the Arduino) to go to the USB (via external FTDI), one to go the the HASB and another to go to the logger. Since you need to have this latter set to setup and control the logger anyway, perhaps that’s not an extra issue, at least as far as connections and wiring go. There might be a resource issue though, as I don’t recall what the data rate for the HASB is and so I can’t say how well the Arduino will handle trying to buffer that data stream and then relay it to the logger.

The other way I see is to have the HASB connect directly to the logger and then have the Arduino tell the logger when to start logging data and tell the HASB when to send that data. There are 2 obstacles to overcome to do this.

First you need to change the HASB’s firmware. What I see on the HASB are other connectors that could have the data lines on them. In fact, if the schematic is correct, the same HASB serial data lines (Tx, Rx) that you use to have the Arduino communicate with the HASB are on 3 other connectors (in particular JP4 and J5, “Other Din/Dout”, pins 3/4). But there’s a MUX controlling which connector gets those data lines and only one connector can get them at any one time (ie - either the Arduino or the logger but not both). What you’d have to do is alter the HASB firmware to, upon a (?new?) command from the Arduino, have the MUX switch the data lines from the “Arduino connector” over to the connector that would be connected to the logger. At this point you’d lose Arduino control over the HASB (though I guess you could always shut it off and back on and regain control upon the reboot).

The second obstacle is that you’d have to modify the logger firmware to take the HASB data in from it’s other serial port. There are 2 serial ports, though one seems dedicated to reprogramming the logger. Now it may be there’s a slightly easier way (no reprogramming of the logger needed), but I’ve not thought it all the way through yet. You could have those “switched” data lines from the HASB connected to the same data lines/wires/connector used by the Arduino to communcate with the logger. Prior to commanding the MUX to switch, those lines to the HASB are just floating wires, no real connection to anything in the HASB. Thus the Arduino is free to use them to control the logger as you desire. Once you have the HASB MUX switch over to “logger output mode”, you’d have to have the Arduino cease all communication with the logger and tri-state it’s data lines to the logger. Now the HASB is free to use those data lines. Since I’ll opine you’d be using a software UART and GP I/O lines to communicate with the logger, this should be possible.

Since changing the HASB firmware would be a PITA, I’d really look into option 1. It may be that in flight, since you’re not using the hardware UART on the Arduino to communicate with the USB port, that it and it’s data lines might be shared with the logger or HASB and thus relieve the Arduino software of some of it’s burden when trying to buffer and relay the HASB data to the logger. Indeed IIRC the serial lines called out on the Arduino have buffering resistors in them for just this purpose. Which I think was your original problem, trying to use those lines and the hardware UART simultaneously for communication over the USB and to the logger. Did you ever resolve that ?

http://www.sparkfun.com/datasheets/Sensors/HAS-v13.pdf

http://www.sparkfun.com/datasheets/Widg … ic-v26.pdf

@Mee_n_Mac

You do have the basic goal correct.

We have found that you can connect the Tx and Rx pins from the HASB to the Datalogger and it will correctly log the data. So my intentions were to connect those two in that way, and then use the Arduino to tell it when to power each board. I would like to use the HASB altitude sensor to trigger when to turn the datalogger power on, and this is where im having issues. Im trying to find an alternate pin (it appears to be on the schematic) to tap into just the Altitude sensor and get that information separate from the rest of the sensors. That way, i can send it to a separate pin on the arduino to watch for when to power the Datalogger.

Another thing is using the same technique to tap into the accelerometer on the HASB, but it appears that either the accelerometer is not originally powered or just does not appear in the print out when the HASB is on. And i also need to find the pin to tap into to get the data once i figure out if its on or not.

hope this clears up what im looking for better. I will insert some of the log from the data logger when i run the HASB and datalogger connected as described above:

Time passed (ms): 1580 Internal Temp (C): 26 Temp (K): 0110 Temp (C): -163 Temp (F): 0263 Light lvl: 0000 Temp (C): 26 Pressure ¶: 98758 Altitude (m): 216 humidity: 12

Time passed (ms): 1816 Internal Temp (C): 26 Temp (K): 0111 Temp (C): -162 Temp (F): 0264 Light lvl: 0000 Temp (C): 26 Pressure ¶: 98767 Altitude (m): 215 humidity: 12

Time passed (ms): 2052 Internal Temp (C): 26 Temp (K): 0111 Temp (C): -162 Temp (F): 0264 Light lvl: 0000 Temp (C): 26 Pressure ¶: 98778 Altitude (m): 214 humidity: 12

Time passed (ms): 2288 Internal Temp (C): 26 Temp (K): 0111 Temp (C): -162 Temp (F): 0264 Light lvl: 0000 Temp (C): 26 Pressure ¶: 98775 Altitude (m): 214 humidity: 12

Time passed (ms): 2525 Internal Temp (C): 26 Temp (K): 0112 Temp (C): -161 Temp (F): 0266 Light lvl: 0000 Temp (C): 26 Pressure ¶: 98773 Altitude (m): 215 humidity: 12

Time passed (ms): 2761 Internal Temp (C): 26 Temp (K): 0112 Temp (C): -161 Temp (F): 0266 Light lvl: 0000 Temp (C): 26 Pressure ¶: 98770 Altitude (m): 215 humidity: 12

njbraskey:
I would like to use the HASB altitude sensor to trigger when to turn the datalogger power on, and this is where im having issues. Im trying to find an alternate pin (it appears to be on the schematic) to tap into just the Altitude sensor and get that information separate from the rest of the sensors. That way, i can send it to a separate pin on the arduino to watch for when to power the Datalogger.

What pin on the HASB do you think this is (above) ? I looked at the HASB schematic and what I see for the pressure sensor is an I2C interface. All it’s data comes across that I2C bus. If you wanted to run those 2 lines to the Arduino, I’ll opine you’d be better off using the serial Tx/Rx lines. The only other pins are master clear and end of conversion signals. Moreover from what I can tell all, the devices on the HASB run off the same 3.3V regulator. I don’t see a way, short of hacking the board, to power up any one device seperately.

njbraskey:
Another thing is using the same technique to tap into the accelerometer on the HASB, but it appears that either the accelerometer is not originally powered or just does not appear in the print out when the HASB is on. And i also need to find the pin to tap into to get the data once i figure out if its on or not.

I recall seeing the HASB output data format and it was a little odd. IIRC there were 9 packets of data followed by a tenth packet that had more data in it that the first nine. Then the frame repeated. Each packet contained accel and magnetometer data. See the serial output here ...

http://dallasmakerspace.org/wiki/Near_Space_Balloon

The above assumes (argghh) that the firmware is the same now for you as then for them. From your logger’s data, something certainly looks amiss (temps after Internal Temp(C) don’t look correct).

If you don’t mind changing the HASB firmware, you could have it’s MCU read the pressure and make a determination on whether it’s above or below some threshold and then output a single active low line to the Arduino to indicate that power should either be shutoff or stay on.

I will need to do more research to clarify the following, but just as a quick response:

I need to pull up the actual schematics, but there are multiple places on the boards with thru-holes

from “What pin on the HASB do you think this is”

There are three spots labeled PC1, PC2, and PC3, im pretty sure this is not what im looking for,

but then there are six more holes located on the one side, which if i remember correctly i thought they where connected to different sensors,

to clarify, im not looking to power each sensor alone, i can power the whole board at once, what i wanted was to just draw the output information from a single sensor rather than a whole packet as it was output through the Rx and Tx pins.

njbraskey:
I need to pull up the actual schematics, but there are multiple places on the boards with thru-holes

Well the schematic is here …

http://www.sparkfun.com/datasheets/Sensors/HAS-v13.pdf

I think you’ll want to look at it and then better understand how the I2C bus and communications work. To get data from one sensor only can certainly be done but it’ll take a change to the HASB firmware; to read only the sensor that you want and output only that data and then you’d still need someway to command the HASB to do that special routine vs it’s normal routine. I guess I don’t see the benefit to doing all that work vs getting all the data and just selecting the portion you want.

Just a thought but I guess you could have the logger and HASB power up under Arduino control, have the HASB output it’s normal data stream to the logger and then have the logger pick out the pressure sensor data and relay that back to the Arduino. It’s a bit roundabout but it means not having to connect the Arduino to the logger or change logger firmware. I’ve assumed you need some communication channel btw the logger and the Arduino, though I’m not sure (barring this idea) that it’s strictly needed. Can the logger, once it’s been all configured, just be turned on and have it do it’s logging thing ? If so then another idea is to have the logger make the decision to log (or not) with some new firmware that looks at the pressure data it’s receiving from the HASB. It could relay that decision via a single wire to the Arduino to keep power on (or not). In short I don’t see a real easy simple way to “tap into just the Altitude sensor and get that information separate from the rest of the sensors” and send that information to the Arduino.

The datalogger will run its-self. We were going to connect the HASB and datalogger together so all we have to do is turn the datalogger on and it will run itself. All of that is taken care of. The issue was we wanted to single out the altitude reading and send that to the arduino to use as the trigger to tell the arduino to power the datalogger. I thought one of the extra pins on the HASB board would output the response from individual sensors but i could be wrong.

So what communication “channels” do you need ? Obviously you need the HASB to send data to the logger. Other than some method of getting the pressure sensor data (and maybe the accel data ?) to the Arduino, do you need the Arduino to “talk” to the logger or HASB for any other purpose ? And re: the pressure sensor data, I think all you really want is to know if the pressure is above or below some threshold (in order to control power on/off). Lastly you want to retain a method of “talking” to the Arduino (to/from a PC) for programming and perhaps debug purposes.

All im really looking for is: is there a way to pull the data from the Altitude sensor from the HASB. Only the altitude and none of the other information

the connection from the HASB to the datalogger is working, its just from one to the other, the main arduino is out of that equation. Then im going to use the arduino to send power to the HASB and datalogger. Im going to use the altitude reading to trigger when to turn the datalogger on. Once it is on it will do everything its-self. There is no other communication between the HASB and arduino or between the datalogger and arduino.

How comfortable are you redoing the firmware for either the HASB (ATmega) or logger (ARM) ? If that doesn’t faze you then my guess is that mod’ing the HASB is the easiet route (as it’s the most like the Arduino). Have it read in the pressure sensor (as it must already do) and compare the reading to a preprogrammed threshold. If the pressure meets your criteria, set a spare digital output line from the HASB ATmega to low. Run that line into a digital input pin on the Arduino. Have the Arduino power up the HASB, wait a time and then read the pin. If it’s low, keep the power on. If not, turn power off. Do this periodically until you meet the criteria. This is the least amount of extra lines to run (1) and perhaps the easiest software to write. I dislike the general idea of hard coding thresholds but there you go. Condition sending the data from the HASB to the logger upon meeting the threshold, if you want to.

If you don’t want to invest in an AVR programmer or if changing the HASB firmware is icky, then my thinking is my prior “option 1” is the way to go.