MBED USB Communication error while it is working

13 Apr 2013

Hi guys,

I have a problem with my mbed USB communication. Let me explain what i want to do. I have a brushed DC motor which turns a disc, an ADC for converting analog signal in + / - 10 V dc range, i have a PIC for gathering some data from its peripherals etc. I use SPI of mbed for comm with ADC, serial port for comm with PIC, and using PWM out for driving the motor. The motor is driven by using IR2110 + IRFZ44N. Power supplies of MBED and motor are different but their ground is common (shorted). The MBED gathers data from its peripherals and send them by using its USB Serial out(D+, D-, GND) to the host computer. Also, it takes some data from the host computer, such as desired rpm value. Everything is clear up to now, i think. (USB connection is done by using only D+, D- and GND. +5V from host computer is not connected anywhere.)

Here is the my problem..

Sometimes, the communication between MBED and host computer lost. I mean, when motor begins turning, after a while usb comm is broken down. Firstly, i think that there is an interference caused by back EMF of the motor. Then, i inserted Chokes(Toroid, http://www.aikenamps.com/Chokes.html , http://www.w8ji.com/toroid_balun_winding.htm) to motor cables. It made a better than before. Occurance of this error decreases but it did not completely solve my problem.

After inserting Chokes, this time the problem is occured such a way that Mbed does not send data but it takes data.. For example, it does not send the system temperature but it takes new desired rpm and it works..

I think that if i used opto-isolator, maybe i have not got this error, but now i need suggestions for solving this problem without using opto-isolator.

Thanks