I'm using MPU6050 IMU with the raspberry pi. I want to get data at a required frequency, for example, 200 Hz that is I want data at every 0.005 seconds. How do I go on to accomplish this? I'm using i2c for serial communication. Feel free to suggest any other method by which I can get this done.
Related
Does anyone know of a good alternative to the DHT22 for temperature and humidity sensing on the Raspberry Pi?
The DHT22 works great, but the wire length can only be a few feet long before you start running into problems. I want to connect a temp/humidity sensor at about 15 feet away.
You can use some of 1-wire sensors, for example temperature>DS18B20 humidity>DS2438 or some else.
You can read more about 1-wire specification here
I am trying to get data samples from a sensor using a ADS1256 library with a Raspberry Pi High-Precision AD/DA Expansion Board on my RaspberryPi 2B
Now as mentioned in their code and datasheet it can take around 30,000 samples per second, but when I am running it, it was taking around 15 samples per second. After some modifications in code, it is taking around 470 samples per second.
I need atleast 1000-1500 samples per second.
Here again is the link to the ADS1256 code.
I tried to use this at a higher rate of speed. If you are waiting for DRDY pin to go low for on the order of milliseconds it isn't going to work. I had no luck in modifying the software. I tried to use this http://abyz.me.uk/lg/lgpio.html#lguSleep but I never could get the interrupt to activate on the change of DRDY. It seems that the person who wrote the sample program for the ADS1256 could not either. I looked at the sample program for the mpc3202. http://abyz.me.uk/lg/lgpio.html#lguSleep He does similar things; He sleeps for .2s between samples. That won't work for his sample rate. One problem is that the raspberry pi has no real-time clock. I tried some unix time routines and got back 0 as a result.
i need some help understanding a specific serial port connection from a sensor. I need to read data from the sensor and make some calculations in matlab or c++ (i will decide later)
The manufacturer only gives a chart with the following details:
Sensor Serial Port
Pin Number Mode Pin Description
I Trigger Input
I RS-232 Receive
O RS-232 Transmit
PWR Sensor Power (DTR)
PWR/GND Signal Ground
Not Used (Reserved)
Not Used (Reserved)
I/O RS-485 B Signal Pin
I/O RS-485 A Signal Pin**
So my question is: OK i know that pin 2 is used to receive data but how am i going to decode the volts stream into integers for example for my program? Also, i know that pin 4 gives power to the sensor. How do i know how many volts it has to give? Generally how am i going to learn all these details since the manufacturer does not give it?
Do you think Serial Port Analyzer Software will help?
Thanks very much in advance.
You might want to search for "DE-9 pinout YourSensorNameHere" in google or This page might be of some use to you. With most RS-232 you only need pins 2,3 and 5. With out more specifics about your sensor there isn't much SO can do for you.
Looking for some help to be honest, This is not my area of knoladge atall.
Ive read around the question of powering my Pi with a battery, now I nabbed one of these guys for my phone
http://www.amazon.co.uk/13000mAh-Portable-External-Technology-Motorola-Black/dp/B00BQ5KHJW/ref=sr_1_cc_1?s=aps&ie=UTF8&qid=1420826597&sr=1-1-catcorr&keywords=anker+astro+e4
Incase the link dies in the future;
Item model number: AK-79AN13K2-BA
AnkerĀ® 2nd Gen Astro E4 13000mAh 2-Port (3A Output) Fast
Max 3A Out
5V Out
Now, from what i've read there have been mixed notes of, don't use batterys, only use this battery, don't do this, don't exeed this magical number ( which was differant each time ). so any help would be grately needed. If i was to power my pi via this thing. im I going to get a poof of smoke and need to replace the poor pi :(
A raspberry Pi is powered via USB, which means that it simply takes the 5V supplied via USB to run. As long as your current source is stable (ie. it doesn't change when you draw current from it), no device will care whether it is a battery or a switching power supply. Now, a bare raspberry Pi B uses less than 2W of power, 2W/5V = 0.4A = 400mA, so if that battery pack lives up to its specification, you are going to be fine. The device is spec'ed to provide 13000mAh, so at a constant current of 400mA, this would last you more than 32 hours.
Now, most people attach something to the raspberry, and that something will also draw power, but just add that power to the calculations above, to see if it's going to work out.
I have rain gauge that has a PCB that counts the number of tips. From that PCB there is a output wire. I want to connect my Pi to that wire and count the number of tips and store the values for every half an hour or so. The whole setup should run on a battery.
I am planning to use weewx python library to do counting and storing data. But I want to know which terminal I should be connecting the rain gauge wire.