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.
Related
i have a little project i am working on in which i need to measure the time difference between several raspberry pi modules in the matter of nano seconds. my question is what timing mechanism can provide me this type of difference measurement ability, other than GPS clocking system (which i am trying to avoid).
among the options i am familiar with:
PTP sync
Linux time from epoch, in nano-Seconds
GPS- trying to avoid if possible
other suggestions are welcome
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.
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 have a project that consisted of transmitting data wirelessly from 15 tractors to a station, the maximum distance between tractor and station is 13 miles. I used a raspberry pi 3 to collect data from tractors. with some research I found that there is no wifi or GSM coverage so the only solution is to use RF communication using VHF. so is that possible with raspberry pi or I must add a modem? if yes, what is the criterion for choosing a modem? and please if you have any other information tell me?
and thank you for your time.
I had a similar issue but possibly a little more complex. I needed to cover a maximum distance of 22 kilometres and I wanted to monitor over 100 resources ranging from breeding stock to fences and gates etc. I too had no GSM access plus no direct line of sight access as the area is hilly and the breeders like the deep valleys. The solution I used was to make my own radio network using cheap radio repeaters. Everything was battery operated and was driven by the receivers powering up the transmitters. This means that the units consume only 40 micro amps on standby and when the transmitters transmit, in my case they consume around 100 to 200 milliamps.
In the house I have a little program that transmits a poll to the receivers every so often and waits for the units to reply. This gives me a big advantage because I can, via the repeater trail (as each repeater, the signal goes through, adds its code to the returning message) actually determine were my stock are.
Now for the big issue, how long do the batteries last? Well each unit has a 18650 battery. For the fence and gate controls this is charged by a small 5 volt solar panel and after 2 years running time I have not changed any of them. For the cattle units the length of time between charges depends solely on how often you poll the units (note each unit has its own code) with one exception (a bull who wants to roam and is a real escape artist) I only poll them once or twice a day and I swap the battery every two weeks.
The frequency I use is 433Mhz and the radio transmitters and receivers are very cheap ( less then 10 cents a pair if you by them in Australia) with a very small Attiny (I think) arduino per unit (around 30 cents each) and a length on wire (34.6cm long as an aerial) for the cattle and 69.2cm for the repeaters. Note these calculations are based on the frequency used i.e. 433Mhz.
As I had to install lots of the repeaters I contacted an organisation in China (sorry they no longer exist) and they created a tiny waterproof and rugged capsule that contained everything, while also improving on the design (range wise while reducing power) at a cost of $220 for 100 units not including batterys. I bought one lot as a test and now between myself and my neighbours we bought another 2000 units for only $2750.
In my case this was paid for in less then three months when during calving season I knew exactly were they were calving and was on site to assist. The first time I used it we saved a mother who was having a real issue.
To end this long message I am not an expert but I had an idea and hired people who were and the repeater approach certainly works over long distances and large areas (42 square kilometres).
Following on from the comments above, I'm not sure where you are located but spectrum around the 400mhz range is licensed in many countries so it would be worth checking exactly what you can use.
If this is your target then this is UHF rather than VHF so if you search for 'Raspberry PI UHF shield' or 'Raspberry PI UHF module' you will find some examples of cheap hardware you can add to your raspberry pi to support communication over these frequencies. Most of the results should include some software examples also.
There are also articles on using the pins on the PI to transmit directly by modulating the voltage them - this is almost certainly going to interfere with other communications so I doubt it would meet your needs.
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.