HOW TO ENTER EXTERNAL DATA TO SPARKFUN OPENLOGGER ?

I just received a SparkFun openlogger(DEV-09530). I see how it is connected to an FTDI converter, then to a PC via USB.

What I want to know is how to connect an external sensor to the openlogger, while it is not connected to a PC.

How is external data fed into the openlogger?

I also want to know how to connect the openlogger to my SparkFun (5v) Arduino Pro(328).

Which pins on the open log connect to the proper pins on the arduino pro? How is data fed to the openlog via the arduino pro?

Thanks

Pat

First, it is 3.3v - read the product page and the pages at github for more details.

The baud rate is settable, and there is a mode where it will open a file and send any serial data to it out of boot. That is how you send data - via the serial port.

If you have a 3.3v arduino pro, you can attach it directly (1:1) from the connector on the side. If it is 5V, I think it would work buy you might want to read and maybe put a series resistor between the TX on the arduino side and the RX on the openlog.

Are you saying that I can only send data to the openlog while it is connected to a computer? It can’t be used as a remote data logger? :?

PO’T

I don’t know what you mean. The openlog has only the serial port, so it can only log what the serial port is connected to. It doesn’t have to be connected to any computer, but needs a power supply and will (after being configured to do so) store anything which comes over the serial port at the configured baud rate to a file (append or a new one) on the micro-SD card.

What exactly do you want to do?

I want to collect pulsating data from a speed sensor then transfer that data (pulses/second) to an SD card using an arduino to collect and count such data.

I know how to enter data into an SD card using arduino’s MOSI, MISO, SCK pins using an abbreviated form of FAT (uFAT).

[http://www.arduino.cc/cgi-bin/yabb2/YaB … 1235125412]

How does one enter data using the RX & TX pins via an Arduino pro?

I’m assuming arduino would have to be properly programmed.

Would I be able to use arduino’s Serial.print, Serial.println to send data to Openlog’s SD card?

According to Github datasheet, Openlog can be operated at 3.3 v to 5v.

from GITHUB

Connections

•GRN: Reset pin and connects to the GRN pin on the Arduino Pro Mini. Pulling this line low will reset the ATmega328. Because there is a capacitor on this line, holding this line low will not keep OpenLog in reset.

•RXI: Serial input into OpenLog.

•TXO: Serial output from OpenLog.

•VCC: 3.3V to 12V input. We recommend 3.3V to 5V.

•GND: Ground

•BLK: This pin is connected to GND. Connect this pin to BLK on the Arduino Pro Mini.

The four pins at the top of the board are connected to the SPI

Thank you,

PO’T

The power supply for the openlog (the vcc pin) can be 12v. Don’t put 12v into the TxD or RxD pin.

OpenLog can be configured to immediately start logging to a file, and have a configured baud rate (in 1.1). Setup OpenLog to this mode and set a baud rate you will not overrun.

(Alternately, you can send various characters to create a log file - think of the old modem dialing scripts).

On the Arduino, take the output values and convert them to text. Then send the text out the serial port at the previously selelcted baud rate. You can test this on the PC. Then simply connect the OpenLog. It will copy the data it receives to a file on the SD card.

hi

how will i connect duemilanove to openlog?

via tx1 & tx2 & 5v & gnd pins? or maybe by making use of softserial and 2 other digital & 5v & gnd pins?

not sure if i have to/can connect the rest of the openlog pins? i.e.

  • GRN: Reset pin and connects to the GRN pin on the Arduino Pro Mini. Pulling this line low will reset the ATmega328. Because there is a capacitor on this line, holding this line low will not keep OpenLog in reset.

is this the reset pin on duemilanove?

  • BLK: This pin is connected to GND. Connect this pin to BLK on the Arduino Pro Mini.

should i just connect this to due’s gnd?

dont have FTDI Basic board to test easily.

thanks

Neels

power to the VCC pin, ground to ground.

If you aren’t configuring it (you really need to do this first), the tx on pin 1 next to rx on pin 0 in the corner will go to the opposite pins on the openlog - tx to rx and rx to tx. That is all you should need.

If the ATmega chip is socketed, you can carefully pull the chip out and use the Duemilanove as a serial adapter - if the connection above is correct, you should be able to get the menus and talk to it - and probably even reprogram it (be careful if you have one that didn’t set the bootblock lock bits).

Look at an enlarged picture of an arduino pro on SparkFun [http://www.sparkfun.com/commerce/produc … ts_id=9219]

You will see six posts (pins) pointing outward at 90 deg. Two pins are marked GND at the base of the pins, one of those GND pins is also marked as BLK at the side (hard to see in the picture, but its the GND pin that is furthest outward). Next pins are (5v/3.3v or VCC), RX, TX, RST(reset). The RST is also marked as GRN at the side of the pin.

I haven’t tried using OpenLog with my Arduino pro yet, but according to SparkFun those are the arduino pins to connect to.

Look at a picture of the pin mapping of an atmega 168/328 chip with the arduino pins identified [http://arduino.cc/en/Main/ArduinoBoardDuemilanove]

or of an atmega 168

[http://www.atmel.com/dyn/resources/prod … oc2545.pdf]

You will see that atmega PIN 1 is RESET,

digital pin 0 (atmega 2) is RX,

digital pin 1 (atmega 3) is TX,

Arduino Board Duemilanove has more than one GND pins, 5v pins and a 3.3v pin.

PO’T

tz Posted: Thu Jan 21, 2010 8:13 am Post subject:


I don’t know what you mean. The openlog has only the serial port, so it can only log what the serial port is connected to. It doesn’t have to be connected to any computer, but needs a power supply and will (after being configured to do so) store anything which comes over the serial port at the configured baud rate to a file (append or a new one) on the micro-SD card.

(after being configured to do so) OK, I’m lost at this point. How do I configure OpenLog? :oops: :oops:

Home

OpenLog – Open source data logging

just want to use it : Just power up OpenLog and by default (in v1.1 and above) OpenLog will log any serial text thrown at it. No commands, no configuration required. Just power up and go!

I ‘Just powered up OpenLog’, aaaaand…NOTHING

Troubleshooting

The easiest way to get OpenLog working is with a serial connection to a computer. Power up OpenLog and you should see ‘12<’. If you don’t, make sure your TXO and RXI pins are connected correctly. TXO is an output pin from OpenLog and will need to be connected to a input pin on your serial conversion board.

OpenLog communicates with TTL, not RS232, because it is meant to be connected with a microcontroller or an embedded project. If you are connecting OpenLog to a computer, you will need a TTL-to-RS232 converter board such as the RS232 Shifter board, FTDI Basic, or the FT2332 Breakout.

But once you’ve swapped TX/RX, you can easily use an FTDI Basic to talk to, configure, and quickly bootload new firmware onto OpenLog.

Things I’ve done:

  1. swapped TX/RX, on an FTDI Basic TTL-to-RS232 converter, connected to computer.

2)Downloaded all the files from the ‘main page’.

  1. Open a command prompt, navigate to the directory that contains OpenLog and type make all. (tried to, NOTHING SHOWS UP)

I don’t know how to configure the thing just to get it operating. I’m lost :oops: :cry:

Thanks for previous help

PO’T

Open a terminal program and try to talk to the openlog. You should see “12>”. You do need a FAT16 formatted card for this to work, I think 1 means it sees a SD card, 2 means it sees a FAT filesystem.

Typing H? brings up a menu.

See if you can get this far. The LEDs on the FTDI should flash if you get the right port, then try different baud rates.

I don’t know what you mean by terminal program; its a new term to me :?

I’ve got the OpenLog hooked up to my computer USB via TTL-to-RS232 converter board in the manner shown, with RX/TX swapped. When I unplug the USB connection, then reconnect, the OpenLog LED blinks 1, 1-2-3, 1-2, 1-2, 1-2-3 then stops. That’s all I can get to happen.

I’ve been able to save data to SD cards using other programs (arduino), but I can’t get this thing to work. :frowning:

Patrick

Terminal program:

Hyperterm under windows (usually comes with it) or putty.

zterm under MacOS

minicom under Linux and ohters.

TX, I appreciate your patience, but it seems that I am incapable of getting OpenLog operating.

I tried using Hyperterm and ‘Putty‘; couldn’t get either to work.

I might have screwed up, though. I connected the open log to Arduino IDE, and downloaded a simple sketch(“Hello world“), apparently, to open log’s atmega328. The sketch was accepted. Endless cycles of “Hello world showed up on arduino’s serial monitor, but nothing showed up on OpenLog’s SD card.

When I got Hyperterm to work, endless cycles of “Hello world” showed up there.

Using ‘putty‘, endless cycles of hieroglyphics showed up.

I tried varying baud rates, no change.

Things I’ve done:

  1. swapped TX/RX, on an FTDI Basic TTL-to-RS232 converter, which connects OpenLog to computer.

2)Downloaded all the files from the ‘main page’. (according to GITHUB)

  1. Open a command prompt, navigate to the directory that contains OpenLog and type make all. (tried to, NOTHING SHOWS UP)

  2. Tried using hyperterminal - didn’t work

  3. Tried using ‘Putty’, serial emulator -also no go

  4. Tried using Arduino IDE, was able to load simple sketch (“Hello world”) to OpenLog’s atm328, “Hello world” showed up on Serial Monitor, but nothing was sent to SD card.

Well, that seems to be it. I’ll go back to using previous methods for saving data on SD cards.

Thank you

Patrick

You need to reflash the openlog software (see the product page or the section github). Openlog looks like an arduino, so loading a sketch changed it into that sketch.

There are flashing instructions at the github page.

Reflash an openlog hex flash file first, then you should see the 12> with a FAT16 formatted card inserted.

Patrick:

Yes, the documentation on the Spark Fun site on how to use OpenLog sucks. To talk to the OpenLog, you have to have another computer running a terminal program, or a microprocessor with a TTL level serial RS232 output port.

If you use a PC, Mac, or Linux, the terminal program has to be connected to the correct COM port. Furthermore, you need a serial adapter connected to the computer so that the RS232 output signals are at the right voltage levels (0 and 5V or 0 and 3.3V) to connect to the OpenLog. FTDI and other companies make USB serial adapters that “look like” a serial COM port to the computer.

It sounds like you already have an FTDI USB serial adapter and know how to use this with Arduino environment. However, to use the adapter with a terminal program, you need to configure the terminal program properly to use it.

If you are using Windows, plug in the serial adapter and find out what it is called (e.g. COM19) by opening My Computer > Properties > Hardware > Device Manager > Ports (COM & LPT). Then start Hyperterm, set Hyperterm to open COM19 and set the baud rate to 9600, 8 bits, no parity, no flow control.

If you have RX on the serial adapter connected to TX on the OpenLog, etc. then OpenLog will be able to talk to the PC.

However, as purchased, OpenLog defaults to “data logging mode” upon startup and does not echo characters to the terminal until you close the log file. Type ^Z (ctrl-Z) on the PC keyboard to stop data logging.

Then you should see a prompt “>” Type the character ? for help or type commands such as “ls ” to list the files on the microSD card.

If you have reprogrammed OpenLog using the Arduino software, you will have to reprogram OpenLog again with the logging software. This is contained in the file main.hex, which you can download from GitHub. Follow the instructions on the GitHub site, or search this forum for recently posted examples on how to do that. You will need to use the program avrdude to reprogram the OpenLog, and it will have to be configured to the correct COM port and baud rate (57600) to work.

Good luck, Jim

Author Message

jremington Posted: Sun Jan 31, 2010 6:47 pm Post subject:


"(Patrick:

Yes, the documentation on the Spark Fun site on how to use OpenLog sucks.

Good luck, Jim)"


Thanks Jim. As I stated (somewhere) getting the OpenLog to work isn’t as ‘simple’ as advertized. The “directions” are like having an operators booklet with the first half of the pages torn out. They’re making a lot of assumptions about a user’s knowledge of computer-eze. :roll:

I ended up sending it back for ‘reflashing’ after I screwed around with it, and screwing it up, for several days. When it gets back to me, I’ll see if I can follow your directions to get it working. If not, I’ll just have to use it in some other manner. :?

Thank you

Patrick

Spark Fun obviously did not write the documentation for OpenLog with beginners in mind. As it is, OpenLog doesn’t do much. I can’t imagine why the board designed didn’t include a few more connections to the processor I/O pins.

Using the FTDI Basic adapter you can reflash the Openlog yourself by following the directions in the second to last post on this thread:

viewtopic.php?t=18700

You may need the latest Arduino version (17) for this to work

Yup, I’m using .0017, and I was able to download arduino sketch’s(“Hello world”) to the OpenLog’s atmega328, but nothing would show up on the CD card.

From TZ’s suggestion, I finally started using Hyperterminal, and other terminal programs, but none of them worked. I thought maybe I screwed up the OpenLog by downloading the arduino sketch.

Sparkfun sent me a file for reflashing, but I couldn’t get that to do anything. Something in the makefile couldn’t be found (command not found). Similar line you show in that second to last reply.

Its in sparkfun’s hands now.

Patrick

The original versions were NOT locked to prevent the bootloader from being overwritten. So if you can’t do the arduino sketch, you would need to reflash it using the ISP to the 4 lines on the far side (plus power and ground, or have Sparkfun reflash them).

For my variant (hyperlog at my tz1 (tz) · GitHub site - still tweaking), I use a config file in the root of the SD card, although it only uses a single line for the baud rate. It then records out of boot and doesn’t reply with anything. I have a CLI test program (fat32cli), which does more, but only works at 57600 and is a bit obscure.

You should see the “12>” (or at least the 1 part - you need a FAT16 SD card for anything else on the stock software). You might want to try different baud rates or the “baud rate recovery” and try 9600.