teckNO
Posts: 5
Joined: Mon Mar 19, 2012 5:18 pm

Re: Wireless data aquisition

Mon Mar 19, 2012 5:27 pm

Hi all,

Im starting all this programming stuff from scratch so please dont say things too complicated

i want to design somthing (eventually) that will read data from a gas sensor but send the data wirelesly to another unit. is this possible with the PI?

ideally it will be completly offline and stand alone so im not sure if bluetooth conectivity is a good way to go? but any help to see if theres any possibility that it could work would be greatly appreciated.

thanks

nick.

wrhii
Posts: 66
Joined: Fri Nov 18, 2011 1:47 am

Re: Wireless data aquisition

Mon Mar 19, 2012 7:34 pm

Yes, this should be possible.

From the sound of things, you want the following (roughly):

Take periodic readings, and store.

At longer intervals, you want this stored data to be passed to some other system.

Options could include:

1. Having the periodic readings/storage done by the pi.

2. Having the periodic "history acquisition" done by the remote system.  This would allow you to control the frequency of the updates, and let the Pi only care about the data logging.

Of course, the big unknown is "how", and that would depend on your remote system which has not yet been defined in your post.  Take a look for the word "acquisition" in the forums, and you should find a few other posts.  Those may give you some ideas on the other questions you need to ask in order to get started.

Best of luck.

UncleDave
Posts: 24
Joined: Tue Feb 21, 2012 6:49 pm

Re: Wireless data aquisition

Mon Mar 19, 2012 10:50 pm

teckNO said:

i want to design somthing (eventually) that will read data from a gas sensor but send the data wirelesly to another unit. is this possible with the PI?


Ultimately the R-Pi is just a PC. As wrhii says the more information you can provide the better. As far as reading data from a sensor - you should be able to do something down either the GPIO or USB. Over what distance would you want to transmit the data, how often, where would the unit be mounted, how would the unit be powered?

Would be some of the questions that I would ask.

UD.

hzrnbgy
Posts: 106
Joined: Mon Dec 26, 2011 10:55 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 2:36 am

for an application you are describing, the RPi would be more suitable as the brain of the system. The RPi is way too powerful and expensive for such a simple task of periodically taking reading from a sensor and transmitting it wirelessly.

The RPi could be the master aggregating all the readings from your remote nodes into a nice webpage for display to users

teckNO
Posts: 5
Joined: Mon Mar 19, 2012 5:18 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 6:36 am

The distance would be a maximum of 15 meteres and its to measure gas readouts from a cab in an articulated lorry with the sensor unit in the trailer so battery power too. I was told pi was good to receive the data from the cab and in the trailer just have the sensor attached to a power supply and a transmitter?

Thanks for the replys

User avatar
rew
Posts: 435
Joined: Fri Aug 26, 2011 3:25 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 8:07 am

Techno,

Getting analog readings is something an AVR or PIC can do just as well as the Raspberry pi. However, sending these using WIFI to somewhere else is something that the RPi is much better at. Connecting an USB wireless module is easy on the 'Pi, and very difficult on the AVR or PIC family.

So, whereas you can buy say an Arduino for $15-$25, and then add stuff to get the "wireless" (another $15-$30), I'd say a RPi and a wifi module is a good (and economic) bet.

With "gas" you mean "fuel"?

For the powersupply, get a car-USB-charger that can handle 1A. Get a good quality micro USB cable. That will power you RPi.

How does the gas sensor provide its data? I'll have some cheap expansion boards available soon. (as soon as I can get things tested, and maybe I need to write a kernel driver... ).

For the WIFI you'll need an USB WIFI module. I'm not yet sure which work well. I've ordered a random $3 one from china, I'll have to see if it works. If not, too bad, $3 down the drain.
Check out our raspberry pi addons: https://www.bitwizard.nl/shop/

teckNO
Posts: 5
Joined: Mon Mar 19, 2012 5:18 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 8:59 am

The gas I"m referring too is carbon dioxide and carbon monoxide, purley for the driver to see the levels on screen without touching anything after its switched on and connected. I realise realtime live streaming would be hard and power consuming but I was thinking maybe every 60 seconds it would display the current readout?

UncleDave
Posts: 24
Joined: Tue Feb 21, 2012 6:49 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 9:01 am

More questions:

Do you need to only record the pressure or do you need to monitor it (display)? Can you not "just use a wire" to the cab? How many sensors?

I'm sure that there must be a way to get power from the trailer's electrical system. If not we'll need to factor in charging the batteries in the remote unit on the trailer. There will also need to be some kind of warning when the batteries are getting low on power. If there is to be a unit mounted on the trailer then weather proofing and vibration damping are two areas that must be addressed.

UD.

teckNO
Posts: 5
Joined: Mon Mar 19, 2012 5:18 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 9:35 am

Just monitor it, and wireless because cabs and trailers change all the time so it gives me the oppertunity to have it unerversal when I drive any Vehicle, maybe a rechargeable battery I can plug into the lighter socket for both units when not in use...

hzrnbgy
Posts: 106
Joined: Mon Dec 26, 2011 10:55 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 1:13 pm

rew said:


Techno,

Getting analog readings is something an AVR or PIC can do just as well as the Raspberry pi. However, sending these using WIFI to somewhere else is something that the RPi is much better at. Connecting an USB wireless module is easy on the 'Pi, and very difficult on the AVR or PIC family.

So, whereas you can buy say an Arduino for $15-$25, and then add stuff to get the "wireless" (another $15-$30), I'd say a RPi and a wifi module is a good (and economic) bet.

With "gas" you mean "fuel"?

For the powersupply, get a car-USB-charger that can handle 1A. Get a good quality micro USB cable. That will power you RPi.

How does the gas sensor provide its data? I'll have some cheap expansion boards available soon. (as soon as I can get things tested, and maybe I need to write a kernel driver... ).

For the WIFI you'll need an USB WIFI module. I'm not yet sure which work well. I've ordered a random $3 one from china, I'll have to see if it works. If not, too bad, $3 down the drain.



Wifi wouldn't be the most suitable method of transmission for an AVR/PIC sensor combo. Ebay has a bunch of inexpensive 2.4GHz wireless transceivers costing around $5.00 a pop and the drivers are readily available for PIC/AVRs. By using a microcontroller also gives you the ability to run it from battery in ultra low power modes. And you don't have to use an arduino, there are cheaper more powerful alternative to it that cost a lot less. But then again, that depends on the extent of how much you are willing to learn and spend your time with.

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 1:50 pm

teckNO said:


wireless because cabs and trailers change all the time


If you plan to install this in a fleet of trucks, you must figure out how to pair the cab with the trailer. You can't just let the cab pick up readings from the strongest transmitter because several trucks may be parked together in a yard.

Your best bet may be a wired network based upon the CAN bus. CAN is designed for use in automotive applications. You should be able to buy gas sensors with a CAN interface. I saw CAN mentioned at least once in these forums, but good luck searching for the word "can".

The disadvantage with CAN bus is that you need a wired connection from the trailer to the cab.

Another idea is to use a serial connection over infrared from the trailer to the cab. A microcontroller like a PIC or AVR would be excellent as the trailer end of this setup.

error404
Posts: 351
Joined: Wed Dec 21, 2011 11:49 pm

Re: Wireless data aquisition

Tue Mar 20, 2012 6:12 pm

rew said:


Getting analog readings is something an AVR or PIC can do just as well as the Raspberry pi.


Actually, it's something an AVR or PIC can do much better, since the Raspberry Pi doesn't have an ADC.

I will second the suggestion of using a cheap micro for the sensor reading /sending and something else (like a Pi or tablet) to receive it. The 2.4GHz or 433MHz serial boards should work fine for this purpose, they're trivial to use and very cheap.

Return to “Other projects”