Monday, January 18, 2010

Barometric pressure, or doing Pascals in C. Plus magnetometer, LCDs

I've been working on I2C. The latest is the VTI SCP-1000, D11 I2C version.

So I have a new archive with the test source (the display version just counts, but the others write to the UART at 57600 baud).

A more recent version is at github in the i2cperiph directory.

It also includes source for the newhaven 2x16 and 2x20 LCDs, the ADXL345 accelerometer and the HMC5843 magnetometer.

(updated to include accelerometer)

I used the breakout board DigiKey PN 551-1044-ND and one of those 0.6 inch wide component headers - the type you typically use to hold resistors or capacitors or things. I simply wired all the Vdd and Vss lines together.

SDA in yellow, SCL in green, 3.3v in red, and ground in black.

Pin 1 is at the bottom left of the baro. The top of the arduino pro has the Vcc and Ground pins. SDA and SCL come out the middle.





7 comments:

  1. Hi,
    a could you show us how to hook the SCP-1000 up please. Also it would be nice if you can tell wich Pins you use for the TWI.

    Im a neewbie and try to get your code working on an arduino.

    ReplyDelete
  2. Click on the picture for a larger version.

    The black header goes on top of the barometer.

    I don't connect anything from the left size.

    On the right side the top and bottom pin are ground. (black wire)
    The mext two down from the top are V+, 3.3 (red wire on arduino)
    The next one isn't connected.
    The next two are for SDA and SCL (I don't have the datasheet handy).

    I'll try a better picture latter.

    ReplyDelete
  3. thx for the fast replay.
    did u use any pullups resistors for sda, sdl?

    wich arduino pins are for the sda, sdl. I looked in your code but did not find any definitions for those pins.

    ReplyDelete
  4. post updated, pics and text added.

    I don't use external pullups, but do turn on the pin pullups inside the AVR chip.

    That works for most things - the lcd display is an exception

    ReplyDelete
  5. How do implement this program on a arduino... the program you have given is is not for the arduinos IDE... please help me out...

    ReplyDelete
  6. I think you can rename the source to end in .pde, but you might need to change some options since it doesn't do start and loop - Changing main to start might suffice.

    ReplyDelete
  7. hello
    i am requested that kindly provide me code for barometric sensor working on I2c. Sensor name is SCP1000-D11 i shall be very thankful to you if you help me in it.

    ReplyDelete