tag:blogger.com,1999:blog-5751743333728160012.post2199886410186450321..comments2023-07-27T03:57:42.871-06:00Comments on CIAduck's Tech Spot: MPL3115A2 sensor with Raspberry PiUnknownnoreply@blogger.comBlogger17125tag:blogger.com,1999:blog-5751743333728160012.post-52539936214494013392017-02-17T00:37:52.812-07:002017-02-17T00:37:52.812-07:00did this problem ever get fixed for you? I'm h...did this problem ever get fixed for you? I'm having the same problemSmileshttps://www.blogger.com/profile/12782624683135687023noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-2977116429171629082016-05-23T06:17:45.440-06:002016-05-23T06:17:45.440-06:00I used this http://www.instructables.com/id/Raspbe...I used this http://www.instructables.com/id/Raspberry-Pi-MPL3115A2-Precision-Altimeter-Sensor--1/?ALLSTEPS works with Pi3 (enable I2C first, install Python SMBus libraries)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-10632827697894887382016-04-01T12:02:54.630-06:002016-04-01T12:02:54.630-06:00Hey John,
I'm having the issue that you have,...Hey John,<br /><br />I'm having the issue that you have, it never past who_am_i query. The display is always 0x0, Device not active.<br /><br />Have you found any solutions to solve this problem yet?<br /><br />Thanks in advanced.Anonymoushttps://www.blogger.com/profile/10521013670685367893noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-55462595966664058932016-01-08T13:43:01.554-07:002016-01-08T13:43:01.554-07:00After rebooting the Pi the 'combined' para...After rebooting the Pi the 'combined' parameter is back to being turned off.<br /><br />To make the change permanent, you might want to create a file in /etc/modprobe.d containint the following line:<br />options i2c_bcm2708 combined=1<br /><br />That will survive a reboot.Dennixxnoreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-76733208946722189002015-11-12T14:59:48.208-07:002015-11-12T14:59:48.208-07:00For those ones interested in using MPL3115A2 + pyt...For those ones interested in using MPL3115A2 + python on Raspberry pi. <br />There is one good guy who wrote a hole bunch of stuff for RPI including python code for MPL3115A2. Here is a link: <br /><br />https://github.com/sensorian/sensorian-firmware/tree/master/Drivers_Python/MPL3115A2alex_domhttps://www.blogger.com/profile/06757009690311481231noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-2715124113712481612015-08-27T23:27:42.467-06:002015-08-27T23:27:42.467-06:00Can you please answer these questions?
1.
Where di...Can you please answer these questions?<br />1.<br />Where did you find out the MPL3115A2 requires a proper repeated start command in it's I2C communication? I browsed a datasheet, but did not find. I probably overlooked it or used a different manual.<br /><br />2. After<br />sudo su -<br />echo -n 1 > /sys/module/i2c_bcm2708/parameters/combined<br />exit<br />. How can I check my Raspberry was setup properly?<br /><br />3.<br />what param is the value '3' in command <br />p_data = bus.read_i2c_block_data(ADDR,0x01,3)<br /><br /><br /><br />XYhttps://www.blogger.com/profile/16476261084047636270noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-38245073970975516092015-08-26T13:30:01.007-06:002015-08-26T13:30:01.007-06:00I discarded that bit of code when I translated fro...I discarded that bit of code when I translated from Python to javascript for Node. If I recall, I had issues with it too. I could still use the sensor without looking for the WHO_AM_I every time. Maybe the author has a solution.Anonymoushttps://www.blogger.com/profile/03695705928566324851noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-71320029157163002862015-08-14T07:38:40.452-06:002015-08-14T07:38:40.452-06:00I got a MPL3115A2 from adafruit. I am having a pr...I got a MPL3115A2 from adafruit. I am having a problem where your script says my device is not active. Just wonder how to get pass this part. I think I have a active device and i2cdetect shows something working.<br /><br />pi@rpi ~ $ sudo python MPL3115A2.py <br />0x0<br />Device not active.<br /><br />pi@rpi ~ $ sudo i2cdetect -y 1<br /> 0 1 2 3 4 5 6 7 8 9 a b c d e f<br />00: -- -- -- -- -- -- -- -- -- -- -- -- -- <br />10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br />20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br />30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br />40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br />50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br />60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br />70: -- -- -- -- -- -- -- -- <br /><br />pi@rpi ~ $ cat /sys/module/i2c_bcm2708/parameters/combined<br />Y<br /><br />Thanks for your help.<br /><br />DougDougnoreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-22433270302547598302015-06-02T06:08:27.771-06:002015-06-02T06:08:27.771-06:00I had what I assume was a terminal connection issu...I had what I assume was a terminal connection issue (or maybe a vi macro mistake) that rendered a series of ones and zeros probably a dozen digits long. It wasn't even remotely a correct setting. Since I discovered that it has been working perfectly. I wasn't able to get the second i2c channel to work with another MPL3115A2 but luckily I had several multiplexers lying about. I'm currently using the two sensors to approximate air flow through an aperture and things seem to be working well. Thank you for this incredibly helpful writeup.Anonymoushttps://www.blogger.com/profile/03695705928566324851noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-75704575411555485112015-06-02T06:07:38.522-06:002015-06-02T06:07:38.522-06:00I had what I assume was a terminal connection issu...I had what I assume was a terminal connection issue (or maybe a vi macro mistake) that rendered a series of ones and zeros probably a dozen digits long. It wasn't even remotely a correct setting. Since I discovered that it has been working perfectly. I wasn't able to get the second i2c channel to work with another MPL3115A2 but luckily I had several multiplexers lying about. I'm currently using the two sensors to approximate air flow through an aperture and things seem to be working well. Thank you for this incredibly helpful writeup.Anonymoushttps://www.blogger.com/profile/03695705928566324851noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-88672454008493665552015-05-29T12:12:50.325-06:002015-05-29T12:12:50.325-06:00What exact setting did you use?What exact setting did you use?Anonymoushttps://www.blogger.com/profile/04620914307157170274noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-54869781215233311522015-05-19T15:34:45.922-06:002015-05-19T15:34:45.922-06:00Fixed it. Had an erroneous i2c_arm_baudrate set i...Fixed it. Had an erroneous i2c_arm_baudrate set in /boot/config.txtAnonymoushttps://www.blogger.com/profile/03695705928566324851noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-44067066410417462982015-05-19T14:42:53.305-06:002015-05-19T14:42:53.305-06:00I keep getting some variation of the following:
0...I keep getting some variation of the following:<br /><br />0xc4<br />Traceback (most recent call last):<br />File "mpl3115a2.py", line 20, in <br />setting = bus.read_byte_data(ADDR, CTRL_REG1)<br />IOError: [Errno 110] Connection timed out<br /><br />Sometimes it doesn't even make it past who_am_i query.<br /><br />I'm getting similar results with Node.js and am wondering if maybe someone has some advice?Anonymoushttps://www.blogger.com/profile/03695705928566324851noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-84862085182396594932015-05-19T14:39:13.208-06:002015-05-19T14:39:13.208-06:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/03695705928566324851noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-72202161168114552402015-01-26T17:44:35.658-07:002015-01-26T17:44:35.658-07:00Found the problem. You need to change the line
new...Found the problem. You need to change the line<br /><i>newSetting = setting | 0x38 </i><br />to<br /><i>newSetting = 0x38</i><br />This will guarantee that it works as a barometer. For some reason it was set to work as an altimeter by default. Although the data sheet claims that barometer is the default but maybe the factory quality control test when they assembled the module changed it to altimeter.kirchnethttps://www.blogger.com/profile/09910853057497901811noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-66974535192302082232015-01-26T15:25:23.722-07:002015-01-26T15:25:23.722-07:00I should add that the p_MSB byte always comes out ...I should add that the p_MSB byte always comes out as zerokirchnethttps://www.blogger.com/profile/09910853057497901811noreply@blogger.comtag:blogger.com,1999:blog-5751743333728160012.post-49162654516014894372015-01-26T15:23:24.728-07:002015-01-26T15:23:24.728-07:00Did you change any of the settings previously? Whe...Did you change any of the settings previously? When I copy and run your code 1:1 it works but shows odd values for the pressure. Instead of a value around 100,000 I get values around 130.<br />So I wonder if there are some registers that you need to set before running this code for the first time? Since you have these two lines you are using the previous settings:<br /><br /><i> setting = bus.read_byte_data(ADDR, CTRL_REG1)<br /> newSetting = setting | 0x38<br /></i><br />The temperature values that my sensor returns are correct though so clearly it has to do with some settings for the barometer. Looking through the data sheet I don't quite see though what that could be.kirchnethttps://www.blogger.com/profile/09910853057497901811noreply@blogger.com