Author Topic: Sensor network and Serial port CPU usage  (Read 1435 times)

jaime1988

  • Newbie
  • *
  • Posts: 18
Sensor network and Serial port CPU usage
« on: February 07, 2014, 02:54:18 PM »
Hi, I have been out for a while because of work, but now I have time again :)

I'm working to make a sensor network based on the Moteino platform.

For now I have a PIR, DS18B20 temperature and soil moisture sensor working with timers/interruptions which can be controlled via text commands from a remote moteino gateway. You can activate/deactivate the sensors and receive readings with configurable period. I'm working now to add more sensor (water level, pressure, IR receive/send,...). I will update the post if there is interest :)

The problem is when using the gateway with nodejs. When I run on a RPI the gateway.js downloaded from github, the CPU usage is 99%, even with a macbook the gateway uses about 40-50% of the CPU :S I have made some research and it seems the problem is related with the serial port, if I don't use the serial port, the gateway doesn't take almost any resources, but using the serial port is impossible. Anyone has this problem?

Thanks and best regards.

billchurch

  • Newbie
  • *
  • Posts: 12
Re: Sensor network and Serial port CPU usage
« Reply #1 on: March 01, 2014, 09:42:21 AM »
For my two node ("host" and "client") Garagemote application I don't even see a blip. How often are your sensors transmitting back?

Using the Garagemote example, when I refresh the status it seems to be about a 3% hit as far as top is concerned.

jaime1988

  • Newbie
  • *
  • Posts: 18
Re: Sensor network and Serial port CPU usage
« Reply #2 on: March 05, 2014, 02:22:20 PM »
Hi billchurch,

This problem happens even when not transmitting. I will make more test and try to reset the RPI image, I'm using raspbian, what are you using?. But it's strange because with the macbook happens the same. Could it be the drivers or so?It's really strange.

Thanks for your response.