Aharoni-Lab / Miniscope-DAQ-QT-Software

Software for streaming and controlling neural and behavioral data from freely behaving animals
GNU General Public License v3.0
117 stars 29 forks source link

V3 Miniscope retrieve frame failed #35

Closed 7heRedFox closed 3 years ago

7heRedFox commented 3 years ago

Hello,

I have an issue receiving images with a V3 Miniscope. I can change the excitation LED intensity and the DAQ seems to work properly (3 LEDs are on) but I always end up with this on my dell workstation

image

The weird part is that it works well and in a stable way on another dell desktop machine. I suspected a USB issue but according to the device manager it is 3.0 and working

image

On the old software it would crash immediately after issuing the 'grab frame error' message few second after attempting to connect

I'm sure of the device ID as other ID issue an error message right away.

Edit: I manage to test it with a shorter cable, ~45cm/1.5ft, but to no success on this particular workstation

daharoni commented 3 years ago

Hi, This is usually caused by one of the following issues (listed in order of likely hood) :

7heRedFox commented 3 years ago

Hello,

thanks for taking the time to help

I did more testing, on 3 computers (including the one not working) and with 3 different cables for every cable I tried, it worked on all the other computers but unfortunately not on the one I'd like to use the miniscope with I checked the DAQ and saw no burned component I looked at the driver running the miniscope and I saw a minor difference as on my other machines it uses the microsoft generic driver v 10.0.18362.815 and the 10.0.19041.488 on the one I have issue with.

UPDATE 02/17/21: I manage to run the "old" microsoft generic usb video driver, unfortunately to no use, also I tried safe mode but it lacked too much stuff to even launch the software and device manager indicated the miniscope not running so I stopped trying that. Also what I saw was that even though I can update the LED power through the software, it takes some time to actually do it (1 to 2 seconds between me sliding the cursor and the LED actually changing power output), it leads me to think that there is too much delay between the DAQ and the processing of the video or the command.

7heRedFox commented 3 years ago

Hello,

I think I pinned the culprit, the L13 inductor fried few days ago and now the 3 LED light up but I have no signal on any computer nor I can control the excitatory LED intensity, I think the difference of circuitry in between pc started the problem and it got worse with time to the point it finished to fry L13. Do you have any indication on the best way to remove and replace it?

BR

daharoni commented 3 years ago

The L13 inductor should be pretty easy to swap out with a new one if you have a soldering iron in lab. This youtube tutorial might help: https://www.youtube.com/watch?v=gd7KhJHMMQ8.

You can purchase a new inductor here: https://www.digikey.com/en/products/detail/CBC3225T101MR/587-1628-1-ND/1008243

7heRedFox commented 3 years ago

Thanks for all the tips but even after repairs it only works with the other computers. We invested in the V4 and the DAQ coming with it but still it doesn't work. There seems to be too much latency between the DAQ and the PC. I'm closing the issue as the problem is way too specific to this machine and I can use both DAQ on other computers

wingsuit84 commented 3 years ago

Hello guys, I have the same error with miniscope v3 and v4,i have also two Daq(v 2.3) as is written by :@7heRedFox and same error: retrieve the frame failed

-on device manager miniscope under the camera is ok -last version of software installed, 1) Used the different USB slots, 2) Used a different computer, 3) tried to use a short coax cable, 4) changed the device ID, 5) used another DAQ box (V2.3), and 6) re-upgraded the firmware 7) tried using different USB cables? 8)induttore L13 is working 9)I tried with 3 different types of coax cable 10)all soldering is ok for SMD and board connection but it doesn't work!!! any suggestion? thanks in advance

DenisPolygalov commented 3 years ago

Thanks for all the tips but even after repairs it only works with the other computers. We invested in the V4 and the DAQ coming with it but still it doesn't work. There seems to be too much latency between the DAQ and the PC. I'm closing the issue as the problem is way too specific to this machine and I can use both DAQ on other computers

FYI, This problem is specific to some machines, not only yours. I've seen this happened many times on some of our machines and in my personal and maybe biased opinion the root cause is in the firmware/software design.

DenisPolygalov commented 3 years ago

Hello guys, I have the same error with miniscope v3 and v4,i have also two Daq(v 2.3) as is written by :@7heRedFox and same error: retrieve the frame failed

-on device manager miniscope under the camera is ok -last version of software installed,

1. Used the different USB slots,

2. Used a different computer,

3. tried to use a short coax cable,

4. changed the device ID,

5. used another DAQ box (V2.3), and

6. re-upgraded the firmware

7. tried using different USB cables?
   8)induttore L13 is working
   9)I tried with 3 different types of coax cable
   10)all soldering is ok for SMD and board connection
   but it doesn't work!!!
   any suggestion?
   thanks in advance

Well, I'm not Daniel (who obviously knows the situation better) and I have nothing to do with Miniscope developers but I would suggest to try to debug this by using my code I wrote from scratch in order to fight bug colonies in Miniscope(s). The only thing you need is to create 32-bit conda environment on Windows PC as described here https://github.com/DenisPolygalov/CaFFlow and execute python scripts in the order described here: https://github.com/DenisPolygalov/CaFFlow/tree/master/mstools In the best case scenario everything will work just out of box, in the worst case scenario you just spend some time and figure out at which stage of processing (hardware or firmware or PC software side) the problem is. Ah, so far v4 Miniscopes are not supported, and if it works you will get full blown analysis pipline (up to the dF/F traces extraction) as a bonus, but this is off-topic...

daharoni commented 3 years ago

@wingsuit84 , Thanks for the detailed info. It sounds like you have pretty much taken all the steps we would to initially try to track down the problem. A couple questions:

wingsuit84 commented 3 years ago

thanks for your time, -yes -both of them lab maker -in our lab, v3/v4 worked just one time, and after that, no

OptogeneticsandNeuralEngineeringCore commented 3 years ago

I was just able to fix three DAQ by soldering on new L13 inductors, after hours of testing and trouble shooting. Don’t ask why I keep connecting my scopes backwards. All three exhibited:

  1. No obvious/typical damage to the inductors
  2. All 3 LEDs would light up (including scope)
  3. “MINISCOPE” under cameras in the Device Manager
  4. Would crash (old) software with ‘grab frame error’ after attempting to connect Inductors are difficult to test, and it is reported that inductors are generally ‘good’ if “greater than 1Ω and normally less than 10Ω”. Yeah, it’s not a good test. Anyhow, on these boards, I observed 1.1Ω. After putting on new inductors, I observe 2.2Ω. I doubt there is much indication there, but maybe someone could find that information useful. Maybe it is just worthwhile to try to replace the inductor… As @daharoni links to, the inductors are CBC3225T101MR from Taiyo Yuden, $0.30 each. A soldering heat gun will likely remove other components, so I don’t recommend. Hot ‘soldering tweezers’ are the way to go to remove the old inductors, but if you only have a soldering iron:
  5. Remove: Use as large a tip as you have. Heat and surface area are your friends here. Use some soldering flux as well to get the heat to the solder. Heat one side of the old inductor, then the other. Let the heat flow through the inductor as well. Don’t apply a lot of pressure and spend a lot of time doing this. Eventually the old inductor will pop right off (eye protection!).
  6. Prep: apply a bit of new solder to the PCB pads. Apply a bit of solder to both sides of the new inductor. This helps everything go together nicely.
  7. Place: Hold the new inductor with tweezers or needle nose plyers. Solder on the side opposite the L13 marking (easier to start close to the other components). Then sold on the other side. It’s OK if the new inductor doesn’t lay perfectly flat. Check for shorts.
sw3145 commented 1 year ago

I recently encountered a problem with the windows firewall disrupting data flow from the miniscope to the computer. The same miniscope connected fine with 2 other computers. Allowing access for this app on the windows firewall solved the problem.