Shop OBEX P1 Docs P2 Docs Learn Events
Hitachi H48C Tri-Axis Accelerometer with cable — Parallax Forums

Hitachi H48C Tri-Axis Accelerometer with cable

Mike87Mike87 Posts: 9
edited 2010-08-30 11:15 in Accessories
Hi,

I'm trying to use an Hitachi Accelerometer with a 3 ft cable with a Propeller proto board. When I'm using the accelerometer with a breadboad (without the 3 ft cable), I have a good accelerometer signal, but as soon as I use it with the 3 ft cable, I get some weird signal.

I guess that the problem is my cable, but when i'm using the same 3 ft cable with the MMA7455 accelerometer I don't have any problem..

If someone have an idea.. thanks!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-08-30 10:52
    Make sure the connections are good and not being moved when using. Attach your code and the results "weird" is not helpful in debugging.
  • Mike87Mike87 Posts: 9
    edited 2010-08-30 11:15
    Here is my code for the accelerometer:

    XYZDataHitachi[0] := Adc.getval(0)

    XYZDataHitachi[1] := Adc.getval(1)

    XYZDataHitachi[2] := Adc.getval(2)

    'Send X data in 2 bytes
    DataOut := XYZDataHitachi[0]
    Debug.tx(DataOut_High)
    Debug.tx(DataOut_Low)

    'Send Y data in 2 bytes
    DataOut := XYZDataHitachi[1]
    Debug.tx(DataOut_High)
    Debug.tx(DataOut_Low)

    'Send Z data in 2 bytes
    DataOut := XYZDataHitachi[2]
    Debug.tx(DataOut_High)
    Debug.tx(DataOut_Low)


    I'm 100% sure that my code is ok because it's working when i'm using it with the accelerometer on a breadboard.

    And by a weird signal, I mean there's some kind of noise and the signal is not what it should be. I can show you a graph of both signals if you want.

    For the connections, I'm using wire wrapping wire (awg 30).. Can it be the source of my problem?
Sign In or Register to comment.