-
Posts
6,503 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Everything posted by attila
-
Digital Steps Quadrature Encoder = Analog Angle - Plotted on Oscilloscope
attila replied to 1bioKAT's question in Test and Measurement
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 -
Analog Discovery 2 losing connection.
attila replied to dave slagle's question in Test and Measurement
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. -
Analog Discovery 2 losing connection.
attila replied to dave slagle's question in Test and Measurement
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. -
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 ?
- 29 replies
-
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...
- 29 replies
-
Analog Discovery 2 losing connection.
attila replied to dave slagle's question in Test and Measurement
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. -
Analog Discovery 2 losing connection.
attila replied to dave slagle's question in Test and Measurement
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. -
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
-
Analog Discovery 2 losing connection.
attila replied to dave slagle's question in Test and Measurement
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. -
Analog Discovery Studio - No Device Detected - MacOS
attila replied to dclock's question in Test and Measurement
Hi @dclock Thank you for the feedback. -
Analog Discovery 2 losing connection.
attila replied to dave slagle's question in Test and Measurement
Hi @dave slagle This is likely a connection-contact issue. The error indicates loss of USB communication. Try using other cables eventually powered USB hub. -
Hi @RAJEEVA
-
Analog Discovery Studio - No Device Detected - MacOS
attila replied to dclock's question in Test and Measurement
Hi @dclock Did you try installing the driver from the installer DMG? Could you try the latest beta version? https://forum.digilentinc.com/topic/8908-waveforms-beta-download/ This updates the USB libraries for macOS. Install the dwf.framework form the DMG and try running the following: $ python /Application/WaveForms.app/Contents/Resources/SDK/samples/py/Enumerate.py -
Hi @sib Thank you for sharing your code. I will test the example and your code as soon I find the ACL2, or get a new one... You may need a Protocol.SPI.Stop/Start() between "SPI RESET" and "Read Device ID".
- 29 replies
-
- 29 replies
-
Hi @sib Thank you for the photo and screenshot. The wiring looks good. At the moment I can't find ACL2, only ~20 other PMods, but the last time I've checked it was working. You have selected the example for ACL with ADXL345. This has different command set than the ACL2 with ADXL362 IC. Probably you wanted to say ACL2 and not ACL5. Under the Custom tab select the ACL3/2 with ADXL362 and Run. These is a typo mistake, it should be ACL2 instead ACL3. In case you use the Logic Analyzer, the Protocol tool won't be able to read data, so the uncheck this option otherwise you will get "Device ID mismatch". You can also use the Master tab
- 29 replies
-
- 29 replies
-
Hi @RAJEEVA The AD2 samping rate is 100MHz bandwidth about 50MHz. The DD sampling rate is 800MHz on the DIN lines and bandwidth about 100MHz. The bandwidth highly depends on the driver circuit, wiring... For IR signal you probably need much lower frequency. This typically uses 30-60kHz carrier signal and kbps data rate.
-
Hi @sib You should have: CS to Select, SCLK to Clock, MOSI to DQ0, MISO to DQ1 Pin-5 or 11 to GND and Pin-6 or 12 to V+ 3.3V The other interrupt pins and DQ2-3 are not required. You can find info about the Pmods at: https://reference.digilentinc.com/reference/pmod/pmodacl/start https://reference.digilentinc.com/reference/pmod/pmodacl2/start
- 29 replies
-
On Digital Discovery the index for DIO-24 is 0, 25 is 1,... dwf.FDwfDigitalIOOutputEnableSet(hdwf, c_int(1<<0)) # DIO-0 / DIO-24 dwf.FDwfDigitalIOOutputEnableSet(hdwf, c_int(1<<1)) # DIO-1 / DIO-25 dwf.FDwfDigitalIOOutputEnableSet(hdwf, c_int(1<<2)) # DIO-2 / DIO-26 dwf.FDwfDigitalIOOutputEnableSet(hdwf, c_int(1<<3)) # DIO-3 / DIO-27 dwf.FDwfDigitalIOOutputEnableSet(hdwf, c_int((1<<0) | (1<<1) | (1<<2))) # DIO-0:2 / DIO-24:26
-
Hi @RAJEEVA You can find the examples and manual in the SDK folder: DigitalIO.py # enable output/mask on 8 LSB IO pins, from DIO 0 to 7, DIO 24 to 31 for Digital Discovery dwf.FDwfDigitalIOOutputEnableSet(hdwf, c_int(0x00FF)) # set value on enabled IO pins dwf.FDwfDigitalIOOutputSet(hdwf, c_int(0x0012))
-
Hi @sib You can find script examples in Protocol tool/ SPI-I2C Custom and Sensor tabs. You can also find SPI/I2C examples in the SDK:
- 29 replies
-
will Analog Discovery 2 work with Android OS on a tablet?
attila replied to Jaye's question in Test and Measurement
Hi @caesun For such purpose you could use the OpenScope or OpenLogger: https://store.digilentinc.com/usb-scopes-instruments-circuits/ -
Logic Detector as trigger in Scope. Is it possible?
attila replied to m72's question in Test and Measurement
Hi @m72 Thank you for the observation. I managed to reproduce the issue. Until this gets solved, please use lower cursor numbers as reference. -
will Analog Discovery 2 work with Android OS on a tablet?
attila replied to Jaye's question in Test and Measurement
Hi @juliosilva The devices can be used with single board computers (BeagleBone, RaspberryPi4...) using the ARM build of WaveForms. https://blog.digilentinc.com/analog-discovery-2-is-now-compatible-with-raspberry-pi-4/ The phones and table are not supported due to USB device driver.