Raspberry Pi for research labs (2) Connecting an accelerometer

1 min read

Raspberry Pi for research labs (3)
Raspberry Pi for research labs (1)

We recently used a smartphone to measure participants’ head motion during an NIRS experiment and got decent results. Smartphone is easy to use, but its size is relatively bulky on participants’ head. Is it possible to use a much smaller device?

In this summer, Joe Baker and Semir Shafi in our lab at Stanford tackled this problem with Raspberry Pi and a standard alone accelerometer. Raspberry Pi costs ~$40 and the accelerometer costs ~$20. So the total investment is ~$60. Not bad.

Joe and Semir
Joe and Semir

The accelerometer was purchased from adafruit.com. The size of the accelerometer is like a quarter, fairly small and would have no effect on a participant’s head.

accelerometer
accelerometer

Semir connected Raspberry Pi, the accelerometer, a monitor and a keyboard/mouse. He then developed a python program to read the data from the accelerometer and displayed it in real time.

Raspberry pi and accelerometer
Raspberry pi and accelerometer

How did it work? Let’s see a real demonstration by Semir. As you see in the video, while the program is running, Semir took the accelerometer back and forth. The x, y, and z data from the accelerometer is displayed on the screen in the real time.

According to Joe, this accelerometer can capture data at 100Hz, much faster than a smartphone’s accelerometer. Besides, it’s easier to integrate with other devices because Raspberry Pi is highly programmable. For example, it is possible to trigger the measuring with an external program so different data sources can be synchronized.

What is more, it’s possible to integrate Raspberry Pi/Accelerometer system with a tablet (e.g. Microsoft Surface or iPad, or even a smartphone). This will make the system much easier to use.



写作助手,把中式英语变成专业英文


AI writing papers with real references


Want to receive new post notification? 有新文章通知我

第六十八期fNIRS Journal Club通知2025/12/6, 10am 夏伟力

以左侧背外侧前额叶皮质(DLPFC)为靶点的间歇性 θ 爆发刺激(iTBS)已成为治疗重度抑郁障碍的成熟方案,但其在刺激过程中及刺激后瞬时对神经兴奋性的影响仍不清楚。来自香港理工大学的夏伟力将分享探讨
Wanling Zhu
13 sec read

第六十七期fNIRS Journal Club视频 肖雅琼教授团队

Youtube: https://youtu.be/c8ei0HMMxHU 优酷: https://v.youku.com/v_show/id_XNjUwMDQyMjcwNA==.html 近年来,越
Wanling Zhu
17 sec read

第六十七期fNIRS Journal Club通知2025/11/1, 10am 肖雅琼教授团队

近年来,越来越多的研究关注自闭症谱系障碍 (ASD)儿童的大脑功能连接异常。但这些异常连接在时间维度上如何变化?又是否与儿童的症状严重程度和认知能力有关?深圳理工大学的肖雅琼教授使用功能性近红外光谱
Wanling Zhu
13 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *