Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9868 Discussions

WiFi performance drops when motor shield is connected.

DAnfu
Novice
2,067 Views

Hi!

I have a Edison with the Arduino board and the DK Electronics Motor Shield v1 (a clone of the Adafruit shield). I wrote a program in C/C++ that listens to socket connections to control 2 DC motors with an Android app.

I have two separate power sources: 4 AA batteries for the 2 motors, and usb for the edison (I've removed the shield's power jumper as indicated in the manual).

The problem is: when I try the socket connections without the shield plugged (only receiving strings and printing them in console) it works like a charm. But when I plug the shield the WiFi connection starts to lag several seconds (ssh connection too).

I've tried to turn off power management with "iwconfig wlan0 power off" and disabling the network-gadget-init.service but there is no significant improvement.

Ping values are within 500 ms and 3000 ms (when the package is not lost).

Any ideas on why is this happening?

Thanks in advance for any help!

1 Solution
Carlos_M_Intel
Employee
293 Views

Hi diego.anfuso

If you are using the gpio48(Linux) / 7(Expansion Board), there is a known issue that may be affecting you. Take a look at the http://downloadmirror.intel.com/24698/eng/edison-bsp_rn_332032-007.pdf Known and Unresolved Issues of the Release Notes of the Yocto Image.

Regards

CMata

View solution in original post

9 Replies
Carlos_M_Intel
Employee
293 Views

Hi diego.anfuso

Have you tried to create two routines? Something like: one specifically for handling the motors and the other one interacting with the app and creating a buffer in order to send data to the Motor's routine only when data it's available.

It seems that the lag is due to the code you are running, have you tried to test your project in other way?. Are you using the latest image for Edison?

Regards;

CMata

DAnfu
Novice
293 Views

Hi CMata, I'm using separate threads to handle both socket connection and motors, but the lag is not due to the code. Even when I'm not running any program WiFi lags (in a SSH session for example, every character I write takes seconds to be processed) . I'm using the last image for Edison.

The only difference I found between WiFi working OK or not is the shield plugged or no plugged, am I missing some settings for the OS or the board?

Diego

Carlos_M_Intel
Employee
293 Views

Hi diego.anfuso

Is this happening only with the DK Electronics Motor Shield? Or is happening with all the shields that you connect to your board?

I haven't found an official document or datasheet about the shield you are using, could you post the official documents about it in order to check which pins is using.

Regards;

CMata

DAnfu
Novice
293 Views

Hi CMata_Intel,

I only have this shield, I couldn't try with another one yet. The shield is a exact clone of this Adafruit's one:

https://learn.adafruit.com/adafruit-motor-shield https://learn.adafruit.com/adafruit-motor-shield

I managed to set WiFi to work properly a few times, I couldn't find out the exact pattern but what I did was switching wlan0 up and down with ifconfig and then turn power management off. However, this solution doesn't work always. If I get to reproduce one solution I will post the steps for further analysis.

Thanks for your support,

Diego

MICHAEL_P_Intel
Employee
293 Views
Carlos_M_Intel
Employee
294 Views

Hi diego.anfuso

If you are using the gpio48(Linux) / 7(Expansion Board), there is a known issue that may be affecting you. Take a look at the http://downloadmirror.intel.com/24698/eng/edison-bsp_rn_332032-007.pdf Known and Unresolved Issues of the Release Notes of the Yocto Image.

Regards

CMata

View solution in original post

DAnfu
Novice
293 Views

Hi CMata_Intel, MPayne

Yes! I'm using GPIO 7 (expansion board) to control the shield. I can't avoid using that pin but I've found that if I run this commands, WiFi will work fine most of the times:

ifconfig wlan0 down

ifconfig wlan0 up

iwconfig wlan0 power on

iwconfig wlan0 power off

iwconfig wlan0 power on

Thank you!

Diego

PGana
Novice
293 Views

Hello diego.anfuso

I would like to use DK Electronics Motor Shield v1 to my intel edison board to control a stepper motor. But when I try to compile my code it is showing as below

Arduino: 1.6.5 (Windows 8.1), Board: "Intel® Edison"

In file included from StepperTest.pde:5:0:

C:\Intel_Arduino_drivers\arduino-1.6.5\libraries\adafruit-Adafruit-Motor-Shield-library-89a0973/AFMotor.h:156:47: error: 'DC_MOTOR_PWM_RATE' was not declared in this scope

AF_DCMotor(uint8_t motornum, uint8_t freq = DC_MOTOR_PWM_RATE);

Could you please help me out to clear this issue...

Best regards

Pradeep Ganapathi

VVela
New Contributor I
293 Views

Have to give this a try. I'm just suffering from random lags of about .1 to 3 seconds every 5-30 seconds between a server/client socket. Ruining my application....

Reply