Jump to content

attila

Technical Forum Moderator
  • Posts

    6,454
  • Joined

  • Last visited

Everything posted by attila

  1. Hi @Camarillo According your measurements the offset DAC is working. I almost forgot that odd reading or output offset could be due to wrong calibration. Since the offset voltage is applied this it likely good, but please perform a "Load factory" and see the oscilloscope readings again to make sure the calibration is not culprit. Otherwise the 21V reading is likely due to damaged ADG612. The one for channel 2 is on the right side, the 16pin IC above the trimmers.
  2. Hi @1bioKAT 2020-02-21_Encoder_Debug.dwf3work // Decoder c = rgData.length var pA = 0 // previuos encoder A value var cnt = 0 // initial phase/counter for(var i = 0; i < c; i++){ fA = 1&(rgData [ i ] >>14) // DIO 14 fB = 1&(rgData [ i ] >>15) // DIO 15 if(fA==1 && pA==0){ // encoder A rising edge if(fB==1){ // encoder B label indicates direction cnt++ }else{ cnt-- } } rgValue [ i ] = cnt rgFlag [ i ] = 1 pA = fA } function Value2Text(flag, value){ switch(flag){ case 0: return "X"; default: return (value > 0x7FFFFFFF) ? value - 0x100000000 : value; } } // Math 7 (Steps > 0x7FFFFFFF ? Steps - 0x100000000 : Steps)
  3. Hi @1bioKAT Please post your workspace with acquisition data. Note the warning in the last screenshot "Samples were lost. Reduce sample rate" !
  4. Hi @slalps 1. In the "USB Serial Converter" properties, make sure the "Load VCP" is unchecked: In case it is checked other application may try to use it as COM device, blocking access to it. 2. Make sure you have the latest driver installed: Reinstall WaveFroms and check the Adept Runtime section or install the driver manually: https://www.ftdichip.com/Drivers/CDM/CDM21228_Setup.zip Reconnect the device in order the new driver to be loaded. 3. The USB EEPROM might be erased by other USB development applications. In this case use the "My device is not listed", reprogramming option in WaveForms Device Manager.
  5. Hi @slalps This looks like a PC/OS issue... The AD2 should be detected as "USB Serial Converter" in Windows's Device Manager. Do you see such or "unknown device" showing up when you conned the device? It may take a minute to be detected as "unknown device"...
  6. Hi @1bioKAT Use the following code to follow the phase, encoder steps: // Decoder c = rgData.length var pA = 0 // previuos encoder A value var cnt = 0 // initial phase/counter for(var i = 0; i < c; i++){ fA = 1&(rgData [ i ] <<0) fB = 1&(rgData [ i ] <<1) if(fA==1 && pA==0){ // encoder A rising edge if(fB==1){ // encoder B label indicates direction cnt++ }else{ cnt-- } } rgValue [ i ] = cnt rgFlag [ i ] = 1 pA = fA } function Value2Text(flag, value){ switch(flag){ case 0: return "X"; default: return (value > 0x7FFFFFFF) ? value - 0x100000000 : value; } } In the Scope Math channel you also need to convert to signed value: (Encoder > 0x7FFFFFFF ? Encoder - 0x100000000 : Encoder) Edit: The insert code is not working and I just notice the indexing text ( [ i ] ) was removed. Now I added these with spacing...
  7. Hi @nikko In case it is an F or earlier revision the USB firmware could be corrupt. See the following instructions and try to reprogram with the Windows application you have in private message.
  8. Hi @Camarillo I meant measuring the VOFF_SC2 relative to the device GND with external DMM. Having the scope channel 2 range 500mV/div or lower, changing the offset between -2.5V and 2.5V should change the VOFF_SC2 between ~1V and ~3V Above 500mV/div for offset between -25V and +25V change VOFF between ~1V and ~3V.
  9. Hi @laurent In case your script quits the device gets closed and the outputs stopped. Set the following parameter before opening the device to keep it running on quit/close: dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) # 0 = run, 1 = stop, 2 = shutdown The VIO could be stopped due to over-current. See the SDK/ samples/ py/ AnalogIO_DigitalDiscovery.py
  10. Hi @nikko The device looks to be detected by the OS correctly. I'm not sure how critical the "Resource temporarily unavailable (11)" info is... Did you install the digilent.adept.runtime and digilent.waveforms packages ? https://reference.digilentinc.com/digilent_adept_2 https://analogdiscovery.com/ Do you get any error when you lunch the application ?
  11. Hi @Ferda You can find the latest manual, corresponding to the software version in the SDK installation:
  12. Hi @Camarillo Probably some high voltage transient input or accidentally having the probe at 1x with high voltage damaged the ADG612. Before replacing the ADG612 you could verify the VREF_SC2 and VOFF_SC2 voltages. https://reference.digilentinc.com/reference/instrumentation/analog-discovery-2/reference-manual#scope_reference_and_offset - the VREF should be about 2V - the VOFF with: 0V offset about 2V +2.5V offset with 500mV/div range about 3V, like the screenshot below --2.5V offset with 500mV/div range about 1V Some further troubleshooting posts:
  13. Hi @Ferda The minimal differences between in AD1-2 are the analog io, power supplies and monitoring:
  14. Hi @1bioKAT I forgot to mention that the values/flags are stored and represented by default as unsigned 32bit integer. In case you use signed values have the following in the Value to Text code: return (value > 0x7FFFFFFF) ? value - 0x100000000 : value;
  15. Hi @nikko The entire board, including the USB controller is powered from the 12V power supply. Make sure this is working correctly. Does the lsusb list "ID 1443:0007 Digilent" device ?
  16. Hi @1bioKAT I think you are interested in the rotation speed and direction. You should perform Record to have many samples to work with, higher resolution over longer period. In the following project: - The 'Encoder' custom decoder calculates the number of samples between to two rising edges of encoder A and depending on B state considers the direction. - The Math1 calculates the RPM = sample_rate / number_of_samples * 60_seconds_in_minute / 6_poles_per_turn - Channel1 measures the voltage, Math 2 applies a low pass filter - Channel2 measures the current, attenuation of 0.162 for 6.2 Ohm shunt, Math 3 applies a low pass filter - Math 4 power Here you have the project: RPM.dwf3work
  17. Hi @dave slagle The part number for the USB (micro B surface mount, right angle, through hole) is USBC-FC05RB2N4, but I can't find any source for it. Here you have the specs for it: For manual soldering one similar, with same pinout-pitch should do it.
  18. Hi @dave slagle The consistent 5 minute could indicate some system sleep or USB suspend, rather than contact issue... Please try disabling sleep as @Mr.Spriggs suggested.
  19. Hi @sib The earlier spi-custom code I posted was tested with Pmod ACL2. It looks like you have receive the correct device ID code using the 'spi-master', so the communication is working. What do you get when you run the spi-custom code ?
  20. Hi @sib Here you have script for ACL2. // Pmod ACL2 - ADXL362 Select.Active.value = 0; Clock.Polarity.value = 0; Clock.Phase.value = 0; if(Clock.Frequency.value > 1e6) Clock.Frequency.value = 1e6; Start(); Write(8, 0x0B, 0x00); // Read Register, Device ID var rgID = Read(8, 4); Stop(); if(rgID[0] != 0xAD || rgID[1] != 0x1D || rgID[2] != 0xF2){ return "Device ID mismatch "+rgID; } Start(); Write(8, 0x0A, 0x2D, 0x02); // Power Control Register, Measurement Mode Stop(); Start(); Write(8, 0x0B, 0x0E); // Read Register, Data var rg = Read(8, 8); Stop(); // convert data bits to signed value relative to gravitational constant // MSbit sign, LSBit 0.001g for default 2g mode var gx = (0.001* ((rg[1]<<28) | (rg[0]<<20)) /1048576).toFixed(3); var gy = (0.001* ((rg[3]<<28) | (rg[2]<<20)) /1048576).toFixed(3); var gz = (0.001* ((rg[5]<<28) | (rg[4]<<20)) /1048576).toFixed(3); var tp = (0.065* ((rg[7]<<28) | (rg[6]<<20)) /1048576).toFixed(2); return "X: "+gx+"g Y: "+gy+"g Z: "+gz+"g Temp: "+tp+"*C"; The measurements seem to be less accurate, see the ADXL362 datasheet regarding specs and calibration...
  21. Hi @dave slagle You can find the system monitor in the status bar and in the Supplies window. The earlier script i just added to see how does the temperature rise.
  22. Hi @dave slagle What temperature are you reading? In this device without active cooling, around 50*C is normal or more if you have loads.
  23. Hi @RAJEEVA dwf.FDwfDigitalIOOutputEnableSet(hdwf, c_int(1<<1)) # OE DIO-1 / DIO-25 dwf.FDwfDigitalIOOutputSet(hdwf, c_int(1<<1)) # drive high DIO-1 / DIO-25
  24. Hi @dave slagle The USB connector in the AD2 is strong and reliable. I'm using some since many years and never had any problem with it. Except some cables are not making good contact with one device or the other kind of devices. On your device some USB cable or try to reversely plug could have damaged the socket. I don't think the two year old device is in warranty... You should try to replace the USB connector.
×
×
  • Create New...