1012 Detaching Sporadically

Comments & issues
Meijin
Phidgetsian
Posts: 12
Joined: Mon Mar 30, 2015 10:21 am
Contact:

1012 Detaching Sporadically

Post by Meijin »

I am having a problem with a 1012 sporadically disconnecting. I tried replacing it with another one and it is doing the same thing. I have it connected to a powered USB hub along with a 1067.
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: 1012 Detaching Sporadically

Post by mparadis »

Does there seem to be any pattern of when the 1012 detaches? Is it when the 1012 or the 1067 is being used, or does it seem random?
Meijin
Phidgetsian
Posts: 12
Joined: Mon Mar 30, 2015 10:21 am
Contact:

Re: 1012 Detaching Sporadically

Post by Meijin »

I think it is happening when either a switch is tripped or a button is pushed. Though they are fine the vast majority of the time. I can trip the same switches or push the same buttons a lot and they don't cause a detach.
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: 1012 Detaching Sporadically

Post by mparadis »

Common causes of momentary disconnects are:

1) When the power and ground on a Phidget is shorted together. Sometimes from metal contacting the pins on the bottom of the board, other times from bad wiring in a circuit.

2) When there is not enough power to supply all of the Phidgets connected to the power supply, which causes the supply voltage to dip below the required amount. For example, if you had several Phidgets connected to one USB hub, they all have to share the 5V supply coming down the cable to your computer. If a Phidget suddenly pulls a lot of current, Ohm's Law would cause the supply to dip below 3V momentarily, which would cause a disconnect. Some Phidgets are more susceptible to this effect and may disconnect at 4V.

In light of these, double-check the circuits connected to the 1012's inputs and outputs to make sure there are no scenarios where 5V and ground are shorted together, and make sure that you have ample power going to your Phidgets.
Meijin
Phidgetsian
Posts: 12
Joined: Mon Mar 30, 2015 10:21 am
Contact:

Re: 1012 Detaching Sporadically

Post by Meijin »

Currently there only there are only two phidgets connected to the powered USB hub. The interface kit and the stepper driver. The hub is connected to a 5v 2.4A power supply. The power supply is connected to 480VAC to 120VAC transformer. All the inputs and outputs use 24V power supply that is also connected to the 480VAC.

I don't see a way for something to be shorting 5V to ground. Also if it was doing this wouldn't be more likely that it would do it every time the button or switch was activated?

Also all the inputs and outputs are using the 24V power supply.
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: 1012 Detaching Sporadically

Post by mparadis »

Have you tried testing the 1012 on its own? It's a lot easier to rule things out when there's only one device involved. If we remove all other factors and the 1012 is still misbehaving on its own, it could mean the board itself is defective.
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1012 Detaching Sporadically

Post by Patrick »

It could also be EMI issues / too short/thin USB cables. Maybe try enabling logging in the library and post the logfile for a detach event.

-Patrick
Meijin
Phidgetsian
Posts: 12
Joined: Mon Mar 30, 2015 10:21 am
Contact:

Re: 1012 Detaching Sporadically

Post by Meijin »

Here is the log. I have the program exit when a phidget detaches because bad things can happen if don't.

12/16/16 08:17:11,4032,".\clog.c(82)",INFO,"Enabling logging"
12/16/16 08:17:11,2684,".\windows\cusbwindows.c(391)",INFO,"New Phidget found in CUSBBuildList: \\?\hid#vid_06c2&pid_007b#7&2fcc5482&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"
12/16/16 08:17:11,2684,".\windows\cusbwindows.c(391)",INFO,"New Phidget found in CUSBBuildList: \\?\hid#vid_06c2&pid_0044#7&228b4ec0&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"
12/16/16 08:17:11,2684,".\windows\cusbwindows.c(521)",INFO,"Phidget successfully opened in CUSBOpenHandle"
12/16/16 08:17:11,3848,".\cthread.c(393)",INFO,"WriteThread running"
12/16/16 08:17:11,2684,".\windows\cusbwindows.c(521)",INFO,"Phidget successfully opened in CUSBOpenHandle"
12/16/16 08:17:11,3264,".\cthread.c(273)",INFO,"ReadThread running"
12/16/16 08:17:11,3240,".\cthread.c(393)",INFO,"WriteThread running"
12/16/16 08:17:11,3548,".\cthread.c(273)",INFO,"ReadThread running"
12/16/16 08:17:23,3548,".\windows\cusbwindows.c(798)",INFO,"GetOverlappedResult failed with error: ERROR_DEVICE_NOT_CONNECTED"
12/16/16 08:17:23,3548,".\cthread.c(327)",INFO,"ReadThread exiting normally (Phidget detach detected in CPhidget_read)"
12/16/16 08:17:23,3264,".\windows\cusbwindows.c(798)",INFO,"GetOverlappedResult failed with error: ERROR_DEVICE_NOT_CONNECTED"
12/16/16 08:17:23,3264,".\cthread.c(327)",INFO,"ReadThread exiting normally (Phidget detach detected in CPhidget_read)"
12/16/16 08:17:23,3848,".\cthread.c(457)",INFO,"WriteThread exiting normally (Phidget detach detected in CPhidget_write)"
12/16/16 08:17:23,3240,".\cthread.c(457)",INFO,"WriteThread exiting normally (Phidget detach detected in CPhidget_write)"
12/16/16 08:17:24,4032,".\clog.c(93)",INFO,"Disabling logging"
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: 1012 Detaching Sporadically

Post by Patrick »

It's not EMI, there is actually a real USB detach happening. Have you tried connecting the 1012 directly to the PC to rule out hub issues? Have you tried swapping out the USB cable?

Can you provide a diagram of exactly how the I/O on the 1012 is connected? Are you using both digital inputs and outputs?

-Patrick
Meijin
Phidgetsian
Posts: 12
Joined: Mon Mar 30, 2015 10:21 am
Contact:

Re: 1012 Detaching Sporadically

Post by Meijin »

I have not tried connecting it directly to the computer yet. I am on my third USB Hub. It's a Tripp-Lite USB 2.0 7 Port powered hub. I am also on my second set of USB cables. I switched to some Amazon Basics cable when I started having this problem. Also this is the second 1012 that I have tried. I attached a couple of pictures. One shows the how the power is distributed and the other shows the I/O.
Attachments
power.png
io.png
Post Reply

Who is online

Users browsing this forum: Google [Bot], Leonardsoito and 0 guests