Automation HAT with acceleration sensor


#1

Hello,

i am fairly new to automation hat. I would like to connect a acceleration sensor module (MPU-6050) to the automation hat. I found the following tutorial https://tutorials-raspberrypi.com/measuring-rotation-and-acceleration-raspberry-pi/, how can i do this with the automation hat?

If another sensor would work better, happy to change this, e.g. i looked at ADXL377, but not sure if this would work

I already connected another device to the automation hat, so i would prefer to stick with the hat.

Thank you for your help.


#2

If it uses i2c just connect it right to the Pi. It would be a lot easier “I think” than feeding the signal through the automation hat. I don’t see any i2c header on the hat so you may need to put a Proto Hat or proto zero or something between the Pi and the automation hat. Everything except i2c seems to be brought out on the automation hat, unless I missed it?


#3

Thank you for your answer. So basically i better not use the automation hat and try to user a analog digital converter for my existing sensor and then connect the other sensor via I2C.


#4

It depends on the sensor how you use it. The link you posted for the MPU-6050 shows it as being hooked up via i2c. I2c is a shared bus so multiple devices can be hooked up at the same time. As long as no two have the same i2c address. So in theory you could connect it and the automation hat. The automation hat uses 0x48 and 0x54. https://pinout.xyz/pinout/automation_hat#
Then connect the other sensor to the automation hat if thats what is needed to run it. What is the other sensor?


#5

Sorry for the question - but how would i connect it to the automation hat - i dont know which pin i should use.


#6

Connect what to the automation hat? If your referring to the MPU-6050, you don’t connect it to the automation hat, not if your going to hook it up via i2c. You connect it to the Pi’s GPIO as shown in the link you posted.
Pins 3 SDA and pin 5 SCL, and V+ and ground. i2c isn’t brought out for use on the automation hat, as near as I can tell from the pictures.
I’ve used proto hats with stacking headers.

Thats a BME680 wired to i2c via female to female jumpers. A male 90 degree header on the proto hat and the BME680.


#7

Alright! Thank you. Then i will not use an automation hat.

To connect my other sensor (Sharp GP2Y0A02YK0F) i will get an analog to digital converter and follow this tutorial https://tutorials-raspberrypi.com/infrared-distance-measurement-with-the-raspberry-pi-sharp-gp2y0a02yk0f/


#8

Would a explorer HAT work as well?


#9

The automation hat already has an up to 24v tolerant ADC on board. So you “should” be able to use it with the Sharp GP2Y0A02YK0F. The explorer hat also has ADC’s, they just don’t list much detail on them on the product page. The proto hat, if you use one, would go between the Pi and your hat. You use a male to female stacking header on it.