Coder Social home page Coder Social logo

drandyhaas / haasoscope Goto Github PK

View Code? Open in Web Editor NEW
111.0 111.0 39.0 83.53 MB

Docs, design, firmware, and software for the Haasoscope

Home Page: https://www.crowdsupply.com/andy-haas/haasoscope

License: MIT License

Verilog 52.78% Mathematica 0.18% VHDL 3.87% HTML 4.37% Python 19.21% Tcl 6.23% Shell 4.52% C++ 0.24% Java 4.54% Makefile 0.02% C 2.92% Fortran 0.01% Batchfile 0.07% Visual Basic 6.0 1.03%
altera data-acquisition eagle fpga open-hardware open-source oscilloscope python verilog

haasoscope's People

Contributors

danielkucera avatar drandyhaas avatar jonas-meyer97 avatar kevinoconnor avatar tedder avatar thirsty2 avatar zigastegu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haasoscope's Issues

USB Extension board

Where can I get one. The ebay link is broken or expired for whatever was there.

Data acquisition independent from GUI

The main Python module contains all parts of the awesome oscilloscope software tool. I have a project where I'd like to sample a downconverted RF signal having a bandwidth of about 10 MHz. I don't need a GUI. I just want your Python class to be embedded in one of my own project's modules.

Do you have any thoughts about how difficult it might be to separate the GUI and drawing functions from the data acquisition and device control code?

Thanks for making this board available. I love it.

Pierre

Run haasocope software on OSX 10.13.5 High Sierr

I am having lots of problems getting things installed on OSX to get the software to run.

e.g., 'OSX, Python 2.7.10

I believe sip is installed but running the HaasocopeDraw complains about it not being installed.
brew info sip
sip: stable 4.19.8 (bottled), HEAD
Tool to create Python bindings for C and C++ libraries
https://www.riverbankcomputing.com/software/sip/intro
/usr/local/Cellar/sip/4.19.8_4 (16 files, 1.1MB) *
Poured from bottle on 2018-06-23 at 16:26:36
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/sip.rb
==> Dependencies
Recommended: python โœ”, python@2 โœ”
==> Options
--without-python
Build without python support
--without-python@2
Build without python@2 support
--HEAD
Install HEAD version
==> Caveats
The sip-dir for Python is /usr/local/share/sip.

Homes-iMac:software ssheikh$ python HaasoscopeDraw.py
Loading HaasoscopeLib.py
Traceback (most recent call last):
File "HaasoscopeDraw.py", line 1, in
import HaasoscopeLib
File "/Users/ssheikh/Haasoscope/software/HaasoscopeLib.py", line 18, in
import matplotlib.pyplot as plt
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/pyplot.py", line 98, in
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/backends/init.py", line 28, in pylab_setup
globals(),locals(),[backend_name],0)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/backends/backend_qt4agg.py", line 13, in
from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/backends/backend_qt4.py", line 25, in
from qt4_compat import QtCore, QtGui, _getSaveFileName, version
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/backends/qt4_compat.py", line 36, in
import sip
ImportError: No module named sip

Probes won't compensate

Cut down the probe trim tool and adjusted the pcb trimmers to get nice square waves

The probes supplied won't compensate. This is fixable thus:

  • Pull the cable strain relief away from the BNC plug, and slide off the small 'box' cover
  • Next to the black trimmer on the probe PCB solder on a 120 (one hundred and twenty) pF capacitor onto the two empty pads
  • Refit the cover and the strain relief

This done the probes will also compensate (normal gain on PCB).

Thanks for a great product

I appreciate what you have done

Hi Andy,
I watched Dave's video review of your product, and while I generally like his blog, I think he was much too hard on you. He spent most of the time complaining about the schematic and complaining why his high-end probes don't work with your board. The probes I bought with the scope fit fine, and I am certainly not going to be reproducing your board. Also, he spent a lot of time criticizing the installation and interface, which he could have avoided by reading your instructions.

What I really like about your product is:
It works on Lubuntu.
You have been very responsive to comments.
The GUI is in python so I can tweak it if desired.
Since I am also interested in FPGAs, I can see an example of a working project.

I do seem to have a trouble triggering when waiting for an event, but maybe that is something I am doing wrong, since no one else is reporting this issue.

I do hope you continue to have an interest in it and those of us who bought it.

Windows - ImportError: No module named serial

C:\Haasoscope-master\software>python HaasoscopeDraw.py
Loading HaasoscopeLib.py
Traceback (most recent call last):
  File "HaasoscopeDraw.py", line 1, in <module>
    import HaasoscopeLib
  File "C:\Users\alberto\Desktop\Haasoscope-master\software\HaasoscopeLib.py", line 11, in <module>
    from serial import Serial, SerialException
ImportError: No module named serial

I guess I need a windows version of that module or maybe the software should use a serial library that supports Windows. I don't know.

Please help.

Firmware upgrade

What are you trying to do?
I want to upgrade firmware of the board. Is there any guide/files? I have USB Blaster.
I was getting error when running the client:

/dev/ttyUSB0 : USB2.0-Serial : USB VID:PID=1A86:7523 LOCATION=2-1
connected serial to /dev/ttyUSB0 , timeout 0.37014933333333333 seconds
got firmwareversion 0 for board 0 in 100.32 ms
Could not read firmware version - Exiting!

so I commented one line:

--- a/software/HaasoscopeLibQt.py
+++ b/software/HaasoscopeLibQt.py
@@ -254,7 +254,7 @@ class Haasoscope():
         print("got firmwareversion",firmwareversion,"for board",board,"in",round(tookms,2),"ms")
         if firmwareversion==0 and tookms>50:
             print("Could not read firmware version - Exiting!")
-            sys.exit(-7)
+            #sys.exit(-7)
         return firmwareversion # is 0 if not found (firmware version <5)
     
     def telltickstowait(self):

and it runs now:

Loading HaasoscopeTrigLibQt.py
Argument List: ['HaasoscopeQt.py']
num main ADC and max10adc bytes for all boards =  2048 and 0
Construction done
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
rate theoretically 35.95 Hz over serial
/dev/ttyUSB0 : USB2.0-Serial : USB VID:PID=1A86:7523 LOCATION=2-1
connected serial to /dev/ttyUSB0 , timeout 0.37014933333333333 seconds
got firmwareversion 0 for board 0 in 100.36 ms
Could not read firmware version - Exiting!
minimum firmwareversion of all boards is 0
rolling trigger
num samples is 512
send increment is 0
do highres is True
trigger time over/under thresh now 1 and usedownsamplefortriggertot is True
serialdelaytimerwait is 100
tell SPI setup: 131  8 0
tell SPI setup: 131  6 16
tell SPI setup: 131  4 27
tell SPI setup: 131  5 27
tell SPI setup: 131  1 0
usb2 connection not available
got uniqueID 80988211106e2028 for board 0 , len is now 1
current directory is /storage/Projects/Haasoscope/software
reading calibrations for board 0 , channels 0 - 4
read calib/calib_80988211106e2028.json.txt
calib was written using unknown firmware version

The QT UI works now, but I would prefer to update the FW anyway.
My HW version is v8.81

What is your OS and python version?
Linux, Python 3.9.7

Have you installed the prerequisites?
Yes

Worked once, and then never responds again

What are you trying to do?
I just received the board today. I see the board worked (connected ch0 only) twice or so (after reconnecting USB cable for a several times), and then on a occasion I saw the QT frond-end plots lots of noises of all 4 channels. After that, I never get the board to work again. Is there a way to troubleshoot this problem? Thank you.

What is your OS and python version?
Ubuntu Linux

Loading HaasoscopeLib.py
('Linux', 'lnx', '5.4.0-45-generic', '#49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020', 'x86_64')
matplotlib backend is TkAgg
Loading HaasoscopeLib.py
('Linux', 'lnx', '5.4.0-45-generic', '#49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020', 'x86_64')
matplotlib backend is TkAgg
num main ADC and max10adc bytes for all boards = 2048 and 0
rate theoretically 35.95 Hz over serial
/dev/ttyUSB0 : USB2.0-Serial : USB VID:PID=1A86:7523 LOCATION=1-4
connected serial to /dev/ttyUSB0 , timeout 3.0 seconds
got firmwareversion 0 for board 0 in 100.4 ms
minimum firmwareversion of all boards is 0
rolling trigger
num samples is 512
send increment is 0
do highres is True
trigger time over/under thresh now 1 and usedownsamplefortriggertot is True
serialdelaytimerwait is 100
tell SPI setup: 131 8 0
tell SPI setup: 131 6 16
tell SPI setup: 131 4 36
tell SPI setup: 131 5 36
tell SPI setup: 131 1 0
usb2 connection not available
getID asked for 8 bytes and got 0 from board 0
current directory is /home/merck/Code/Haasoscope/software
failed to get board ID for board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
c^[[Agetdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
do highres is False
shut down adcs
bye bye!

Loading HaasoscopeLib.py
('Linux', 'lnx', '5.4.0-45-generic', '#49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020', 'x86_64')
matplotlib backend is TkAgg
Loading HaasoscopeLib.py
('Linux', 'lnx', '5.4.0-45-generic', '#49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020', 'x86_64')
matplotlib backend is TkAgg
num main ADC and max10adc bytes for all boards = 2048 and 0
rate theoretically 35.95 Hz over serial
/dev/ttyUSB2 : Digilent Adept USB Device : USB VID:PID=0403:6010 SER=210328A587B0 LOCATION=1-7:1.1
/dev/ttyUSB1 : Digilent Adept USB Device : USB VID:PID=0403:6010 SER=210328A587B0 LOCATION=1-7:1.0
/dev/ttyUSB0 : USB2.0-Serial : USB VID:PID=1A86:7523 LOCATION=1-4
connected serial to /dev/ttyUSB0 , timeout 3.0 seconds
got firmwareversion 0 for board 0 in 100.4 ms
minimum firmwareversion of all boards is 0
rolling trigger
num samples is 512
send increment is 0
do highres is True
trigger time over/under thresh now 1 and usedownsamplefortriggertot is True
serialdelaytimerwait is 100
tell SPI setup: 131 8 0
tell SPI setup: 131 6 16
tell SPI setup: 131 4 36
tell SPI setup: 131 5 36
tell SPI setup: 131 1 0
usb2 connection not available
got uniqueID f01ce000f8c0fc80 for board 0 , len is now 1
current directory is /home/merck/Code/Haasoscope/software
reading calibrations for board 0 , channels 0 - 4
No calib file found for board 0 at file calib/calib_f01ce000f8c0fc80.json.txt
getdata asked for 2048 bytes and got 18 from board 0
(0, 128, 248, 128, 0, 254, 128, 224, 0, 224)
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
getdata asked for 2048 bytes and got 0 from board 0
don't have channel 0 on board 0
serial com failed!
failed to talk to board when cleaning up!
bye bye!

OLED doesn't show anything past boot screen

See picture for my OLED install. It's on the leftmost pins, leaving three pins on the right unconnected. That appears to match what's in the documentation.

2018-05-01 14 02 24

It shows that (slightly odd) boot image and doesn't change. Tried powering off and back on, no change.

Help, hw design files

What are you trying to do?
I want to inspect hw design files. Which Eagle version to download/install. It should probably support more than 2 layers, I suppose.

What is your OS?
Windows 10

An alternative FPGA implementation

This is not an issue; it is notification that I have written an alternative FPGA implementation for the Haasoscope hardware: https://github.com/KevinOConnor/hsoft

I purchased the Haasoscope as a tool for experimenting with FPGA development. I have published some code that may be of interest to others. In particular it has the following useful features:

  1. The code is capable of capturing data in a format that can be imported into sigrok/pulseview. For example, here is a session I took with the Haasoscope attached to a "CAN bus" (using 3 channels on the scope, each at 125Mhz) :
    canquery
    The sigrok/pulseview tool can be useful for analyzing communication protocols. As an example, I can use the tool to get a good estimate of delays between signal lines (eg, 65ns in the picture below):
    cantime
  2. The code supports both the on-board full-speed USB adapter as well as the optional hi-speed USB "hat". When the hi-speed adapter is available, it is not necessary to connect the full-speed USB at all (everything can be done over the hi-speed connection). The code can automatically switch between USB interfaces. The FPGA can fully saturate the hi-speed interface (the ft232h chip nominally supports 40MBytes per second).
  3. Captures can exceed the internal FPGA memory if the host reads the data sufficiently fast. (That is, one can effectively "stream" measurement data if one reduces the measurement rate and/or the number of channels.) Only active channels consume space in the internal FPGA memory and USB bandwidth. For example, here's a 500ms capture (a "CAN bus" capture, 2 channels, at 10.4Mhz):
    can500ms
    One can still "zoom in" to that data in Pulseview to observe useful protocol details:
    canzoom
  4. The code uses basic Verilog with an emphasis on modular code. I've tried to limit the use of Quartus specific features. (It is still necessary to compile the FPGA code with Quartus, but there are only a couple of Quartus specific files in the repository.) As of today, 75% of the FPGA logic elements are unused - ideally leaving space for those looking to experiment with the FPGA.

There are some notable limitations:

  • There is no GUI for this code. The code does not work with the existing Haasoscope software. The command protocol is not compatible. The current capture software is a Linux command-line tool. It has only been tested on Linux.
  • There are likely lots of bugs in the code.

Additional details on features and limitations are available at: https://github.com/KevinOConnor/hsoft/blob/master/docs/Features.md

If interested in running this code (or interested in understanding how it works) see the documentation at: https://github.com/KevinOConnor/hsoft

-Kevin

power switch direction

in the doc: "Switch the power switch on the Haasoscope to take power from the USB connection. You should see a red power light on."

I assume the "power from USB" is to the left (with BNCs down)?

numpy for Python 2.7?

I installed serial, now the issue is finding a Numpy that isn't a wheel that is easy to install in Python 2.7...sigh.

c# / .net communication

Hi,

i was wondering if anybody ever attempted to communicate with a Haasoscope through c#? I am currently using a lab nation scope in combination with c#, but i need more channels.

trigger threshold and voltage offset

Hi Andy,
I am converting your haasoscope to use pyqtgraph as a GUI instead of matplotlib. I have trigger working, but am confused by some behavior I see. If I set the voltage offset with the calibration values for my board, it triggers as I expect it to. However, if add a negative voltage offset such as -0.5, it still triggers at the same voltage. I it would require a voltage 0.5 volts higher. Is the trigger comparison made before the voltage offset is applied?

In case you are interested, I have attached a screenshot of my WIP pyqtgraph GUI.

Regards,
Blake
2019-10-13-180140_1440x900_scrot

Docker build fails

When I try to follow the directions to build a docker image it fails at "git checkout python3" There are no branches in my clone and no file "python3" so the build fails.

Python 2 EOL coming end of this year

https://pythonclock.org/

I see you've released the software platform for your scope on Python 2. Python 2 is about to be un-maintained. Nobody should be being asked to install it for new products for a few years now!

Libraries like Numpy & Scipy will no longer make new releases for Python 2 either.
https://python3statement.org/

Fortunately all the libraries you require are easily python 3 compatible. Maybe this year you would be able to ask the CompSci department at your uni if there are students who would like to volunteer to help you port it to Python 3. This could essentially be a great real-world exercise for them.

Finally, they might then be able to help you package the software as a self-contained executable/installer. For those (like EEVBlog Dave) who prefer to just "use" their hardware.

They could probably help you work on your git organisation as well. I would already suggest separating the hardware design, firmware, desktop software & android software sides of this project into 4 different repositories.

I would normally like to help but am hesitant about dropping money for the board at this time.

I could see from Dave's mailbag review that software is one part where you absolutely failed make any positive impression, so I wanted to give some unwarranted suggestions. Good luck with this project.

ADC Accuracy

Hello,
I've been measuring the precision of the ADCs that for 8 bits was supposed to be perfect and it seems not.
Protocol: 250 kHz triangle, 8,2Vpkpk to have full swing. Recording 512 Samples and cropping the data to have 1 output code increase per sample.
image

I get up to 4 bits error. Is that possible ?
image

I'm not familiar with ADC testing and my terminology is likely wrong.

physical layout documentation

Can you add an image near the top of the documentation explaining the physical layout? In other words, which is channel 0, what are the channel switches? How about the lone switch?

I assume that because you talk about switches being 'up' and 'down', the board should be rotated, perhaps so BNCs are at the bottom?

building boards...

I've heard that for those without significant hf implementation experience, with a design like this, it'd probably be best to first work with the pre-populated and tested devices available for sale. Do you agree?

I realize that there's a pretty extensive BOM. Which parts would you say are the most tricky to deal with?

Thanks much for making this great project openly available to everyone.

Haasoscope seems wiped after trying the FT232H USB extension board

Hi

I recently bought the extension board for the Haasoscope (I have version 9.01) on ebay (https://www.ebay.com/itm/282971875030) - It didn't include the USB2 extension cable, so I used another one - after plugging it in my Haasoscope I tried running the python script but got no response from the board. The I reattached the OLED display. But not the board seems to be wiped. I don't get a picture on the OLED display anymore and when I execute the python scripts I get no response back. The only LED that has light is the power one. The device is recognized by windows and is shown in the device manager.
I'm using windows 10, Quartus prime version 18.1.0 and python 3.7. I had everything up and running before I installed the USB extension board.
I have tried flashing the haasoscope with the provided pof files, but that doesn't seem to changes anything.

Any suggestions?

Currently, I trying to compile the latest Max10adc firmware using my version of Quartus, but I get an error :
" Error (18496): The Output outclk_pin in pin location 28 (pad_9453) is too close to PLL clock input pin (clock_ext_osc) in pin location 27 (pad_0)"

Repeated samples?

What are you trying to do?
I am saving each xydata to a file. However, when checking the data I realize there is some unexpected coincidences, so I run a python script to check for repeated data. By running this script I found the data is exactly repeated 9 to 12 times. This, of course, could be a big coincidence, but happen in a very specific way, what look suspicious. Maybe, we are reading the same buffer again and again until a real new xydata appears (I am saving the data each time it is read, inside the while loop on HaasoscopeDraw.py)

Maybe there are not new readings available, so the serial reads exactly the same previous one? (That could explain the whole problem)

What is your OS and python version?
I use Windows 7, Python 2.7.10

Have you installed the prerequisites?
Yes, and the software is running.

To Reproduce
Steps to reproduce the behavior:

  1. Run the script included in the folowing zip (data included):
    toReproduce.zip
    The data included was saved by using
    np.save(file, d.xydata)
    which output is a binary python format

The Haasoscope was in default Trigger mode, triggering on one channel only.

Expected behavior
Each time we read the data we expect the readings vary slightly. What happens is we got the exact same set of xydata around 10 times in a sequence, what could signal the buffer is not changing at all.

Screenshots
Description of the following log (output of CheckResultsRepeated.py):
Column 1: actual xydata number (I gave them a sequential number). This is the xydata we are comparing to.
Column 2: number of times it is repeated in the following xydata (previous xydata are not compared)
Columns 3 (comma separated): the xydata found equal

As you can see, the exact same xydata are always the few next ones, what is too much of a coincidence.

OUTPUT


C:\Desarrollo\Haasoscope\software>python CheckResultsRepeated.py
0 3 1,2,3,
1 2 2,3,
2 1 3,
3 0
4 0
5 12 6,7,8,9,10,11,12,13,14,15,16,17,
6 11 7,8,9,10,11,12,13,14,15,16,17,
7 10 8,9,10,11,12,13,14,15,16,17,
8 9 9,10,11,12,13,14,15,16,17,
9 8 10,11,12,13,14,15,16,17,
10 7 11,12,13,14,15,16,17,
11 6 12,13,14,15,16,17,
12 5 13,14,15,16,17,
13 4 14,15,16,17,
14 3 15,16,17,
15 2 16,17,
16 1 17,
17 0
18 0
19 11 20,21,22,23,24,25,26,27,28,29,30,
20 10 21,22,23,24,25,26,27,28,29,30,
21 9 22,23,24,25,26,27,28,29,30,
22 8 23,24,25,26,27,28,29,30,
23 7 24,25,26,27,28,29,30,
24 6 25,26,27,28,29,30,
25 5 26,27,28,29,30,
26 4 27,28,29,30,
27 3 28,29,30,
28 2 29,30,
29 1 30,
30 0
31 0
32 11 33,34,35,36,37,38,39,40,41,42,43,
33 10 34,35,36,37,38,39,40,41,42,43,
34 9 35,36,37,38,39,40,41,42,43,
35 8 36,37,38,39,40,41,42,43,
36 7 37,38,39,40,41,42,43,
37 6 38,39,40,41,42,43,
38 5 39,40,41,42,43,
39 4 40,41,42,43,
40 3 41,42,43,
41 2 42,43,
42 1 43,
43 0
44 0


Additional context
I was reading 256 samples only, not the default 512 (maybe that affect the readings).
HaasoscopeLib.ram_width = 8

The signal is the output of an interferometer (the signal changes all the time because of the ambient vibrations), so it is less likely it was reading a super stable signal.
Maybe the trigger is not triggering, and that makes the previous readings keep the same values.

I will be happy to help solving this problem (under your guidance of course), and maybe make a pull request to upload the solution.

Thanks for such an excellent product.

How does the DAC and gain circuit work in practice?

Hi. I'm trying to understand how the DAC and opamp gain circuit work in practice on the Haasoscope.

At first glance the circuit appears to be a simple "differential amplifier" circuit (eg, as described at https://www.electronics-tutorials.ws/opamp/opamp_5.html ). However, my Haasoscope doesn't seem to work like that in practice.

For a standard differential amplifier, if I connect a 1x probe (zero ohms) then I'd expect the voltages to roughly follow the formula probe_voltage = dac_voltage * (1 + input_resistor/feedback_resistor) - adc_voltage*input_resistor/feedback_resistor. So, if I connect a 1x probe to GND, and I want the ADC to receive 0.900V (128 reading on the ADC, center line at 0V in the application), then I'd expect to set the DAC voltage to 0.7615V ( (0 + 0.900*1100000/200000) / (1 + 1100000/200000) ).

In practice, however, to get 0.900V on the ADC I need to set the DAC voltage to 1.0575V (2115 in the software) on my Haasoscope (v9.01 board purchased in Nov 2022). This is puzzling because this is a higher voltage at INA- than at OUTA on the opamp, while a standard differential amplifier would always have a higher voltage at OUTA than INA-. As part of investigating this, I setup the Haasoscope in the above configuration and applied a multimeter to the pins of the MAX4416, and I can confirm that the DAC voltage is 1.0575V (probe on INA+ pin), that the opamp does maintain a corresponding voltage of 1.0575V on INA- pin, and that the ADC voltage is receiving 0.900V (OUTA pin).

My best guess is that leakage current from the IN+ pin to the IN- pin on the opamp is dominating the stable state voltage. (The mcp4416 has only a 60Kohm differential resistance, which is rather small relative to the 400Kohm and 4Mohm feedback resistors.)

So, I'm wonder if there is a better understanding of how the opamp circuit is supposed to work in practice? Or perhaps I'm missing something important, or have an incorrect understanding of the circuit.

Ultimately I'd like to be able to write software that can take a user supplied voltage range and automatically configure the DAC voltage and 10x gain mode accordingly. However, I haven't been able to determine a good formula for predicting an appropriate DAC setting. I can kinda predict the results when using "gain1x mode" (there seems to be a static offset of ~0.350V from nominal predictions), but I haven't found a simple pattern when in "gain10x mode".

Let me know if there is a better place to discuss topics like this.

Thanks in advance,
-Kevin

Please make proper Use of git

Just a random tip from a random guy which points at something.
Please tidy up the versioning as files. You have a git which does the versioning for you ;)
For example the: v9 files in the eagle subfolder. Use tags and/or branches for something like this.
Also does git let you checkout old versions of every stage without the needings to check "backup" Files or similar in this. for example in your firmware-subfolder. It will make the whole Git-Repo looking much better.
;)

New 3d case for the Haasoscope

This is not an issue; it is notification of a 3d printable case that I designed for the Haasoscope. Let me know if there is a better place to discuss topics like this.

I designed a case for the Haasoscope: https://github.com/KevinOConnor/hcase (and https://www.printables.com/model/356793-haasoscope-case ). The haasocope board can "click" into the bottom of this case and the top of the case can also "click" into the bottom.

This case also encloses all the pins (only the bmc connectors extend from the case). There are openings for most ports, including the usb port of the "hi speed usb module".

-Kevin

Mac install steps

Figure this might be handy in the doc:

brew install cartr/qt4/qt@4 cartr/qt4/pyqt@4 sip --without-python
pip2 install pyserial numpy matplotlib PySide Qt.py scipy

Glitchy signal showing 'spikes'

I always seem to get 'glitches' or 'spikes' when looking at a signal. I've attached pictures to show what I mean:

1 kHz sine wave

Same signal, zoomed in more

Same signal, zoomed in much more, showing the glitch in detal

Looking at it with another oscilloscope, the signal is fine. The glitches seem to happen during zero-crossings, irrespective of the signal frequency. For a 10 kHz signal, for example, I also get glitches around the zero crossings.

I also get the glitches in both DC and AC coupling mode.

Could not read firmware version - Exiting!

I want to launch HaasoscopeQt.py

OS:Arch linux, python:3.10.2, conda environment

$python ./HaasoscopeQt.py
Loading HaasoscopeTrigLibQt.py
Argument List: ['./HaasoscopeQt.py']
num main ADC and max10adc bytes for all boards = 2048 and 0
Construction done
rate theoretically 35.95 Hz over serial
/dev/ttyUSB0 : USB2.0-Serial : USB VID:PID=1A86:7523 LOCATION=1-1.2.2
connected serial to /dev/ttyUSB0 , timeout 0.37014933333333333 seconds
got firmwareversion 0 for board 0 in 100.34 ms
Could not read firmware version - Exiting!

expected launch haasoscope software.

I have tried flashing latest firmware, updating libraries, changing python env, rebooting computer, resetting haasoscope, unplugging probes, rebooting haasoscope, reinstalling all libraries, changing udev rules.
I also modified the HaasoscopeLibQt.py to rule out the error: however it then throws the error that it cant connect via usb?

Could anyone please advise me how I can resolve or at least troubleshoot this?
Thanks

dp_ram behavior

Hi,

I noticed the following line in your verilog code:
if (nsamp>4095) nsamp=4095; //max of 4096 samples stored in the ram (12 bit writesamp address), and one less is needed (not sure why...)

As I said earlier, I am attempting to rewrite your haasoscope so I can assign up to 32KB to one channel and use one top-level file that includes all the others as components so I don't need a .bdf file.

As part of my effort to understand all the components, I performed some experiments on lp_ram. I notice that I must wait two clock cycles for the data to show up after I set the address on read. I have a suspicion this is what is causing the issue in your verilog code. Below is my test code, and I have attached a screen shot from my logic analyzer. The address is updated in state 4, but the data doesn't change until state 6. (Using your logic analyzer input pins as debug GPIOs plus debug1 and debug 2 gives me 10 debug GPIOs.)

Here is my test code snippet (I know it is horribly inefficient, which stems from my being a novice, lots of experiments, and not being quite sure how dp_ram works):

always @(posedge clk) begin
	debug[2:0] <= rdaddress_sig[2:0];
	debug[3:3] <= q_sig[0];
	debug4 <= q_sig[1];
	debug5 <= q_sig[2];
	{debug9,debug8,debug7,debug6} <= test_ram_state; 
	
	case (test_ram_state)
		0: begin
			rdaddress_sig <= 0;
			wraddress_sig <= 0;
			wren_sig <= 0;
			rden_sig <= 0;
			test_ram_state <= 1;
			data_sig <= 2;
		end
		1: begin
			wren_sig <= 1;
			test_ram_state <= 2;
		end
		2: begin
			wraddress_sig <= wraddress_sig + 1;
			data_sig <= data_sig+ 1;
			if (wraddress_sig == 7)
				test_ram_state <= 3;
		end
		3: begin
			wren_sig <= 0;
			rden_sig <= 1;
			test_ram_state <= 4;
		end
		4: begin
			if (rdaddress_sig == 6)
				test_ram_state <= 7;
			else begin
				test_ram_state <= 5;
			end
		end
		5:
			test_ram_state <= 6;
		6: begin
			rdaddress_sig <= rdaddress_sig + 1;
			test_ram_state <= 4;
		end
		7:
			test_ram_state <= 7;
	endcase
end

lp_ram_test

Can't get channel 0 to display on computer

I can see the waveform on the LCD screen, but it doesn't display on the computer. I see the following in the terminal:
getdata asked for 2048 bytes and got 1798 from board 0
(41, 42, 42, 43, 42, 42, 41, 42, 107, 131)
don't have channel 0 on board 0

In the GUI I have selected channel 0 and believe the trigger is correctly set. As all I see in the GUI is a vertical dashed line the length of the display, and a short horizontal dashed line. What could be wrong?

V9.0 features

Hi Andy,
I saw your list for v9.0 features on Crowd supply. I think you definitely should consider adding over-voltage protection since the current limit of 3.5v is quite low. I know one can set the probes to x10 to get around this, but it would it would be a shame to kill the board due to one bad measurement.

If I were coming up with a wishlist I would add the following:
1)Higher range than 3.5v such as 17.5V (maybe have your ranges change by a factor of 5 instead of 10).
2) Add 1 MB or more of RAM so can get really long traces and which would make the logic analyzer more practical.
3) Add arbitrary wave generator so can do bode plots. Very few scopes have this, and it is very easy to add to a USB scope.

I am putting the finishing touches on adding horizontal cursors and vertical cursors so the software will automatically calculate the difference in voltage between two vertical points, or the interval and frequency between two horizontal points. I can post this when I am done if you would like so you can consider adding it to the main version.

Haasoscope not communicating

When I try to open up HaasoscopeDraw.py, I get this error:

Loading HaasoscopeLib.py
matplotlib backend is TkAgg
Loading HaasoscopeLib.py
matplotlib backend is TkAgg
num main ADC and max10adc bytes for all boards =  2048 and 0
rate theoretically 10.89 Hz over serial
/dev/ttyUSB0 : USB2.0-Serial : USB VID:PID=1A86:7523 LOCATION=2-1
connected serial to /dev/ttyUSB0 , timeout 3.0 seconds
got firmwareversion 0 for board 0 in 100.3 ms

After this all that happens is an empty graphics window pops up and nothing displays.

And the minimal serial reading script doesn't work either.

Very occasionally (e.g. once every ten times) it does work. But most of the time it gives the above error.

I'm on Linux (Ubuntu) using python 2.7.

Program doesn't start on Mac

I tried both python and python3 on the program in the terminal app on OSX and it gives errors.

python HaasoscopeDraw.py
File "HaasoscopeDraw.py", line 40
if d.db: print time.time()-d.oldtime,"done with evt",nevents
^
SyntaxError: invalid syntax

GSSLA16111692:software ssheikh$ python3 HaasoscopeDraw.py
File "HaasoscopeDraw.py", line 40
if d.db: print time.time()-d.oldtime,"done with evt",nevents
^
SyntaxError: invalid syntax

Could you explain how the dac fits in

Hi Andy,

Could you give a short explanation of how the MCP4728 DAC is used in your Haasoscope, both from the hardware point of view, and when the software needs to adjust it?

Regards,
Blake

Slow (3 Hz) reading of a 60 Hz signal

What are you trying to do?
I have a 60 Hz signal, but the reading speed is only about 3 Hz maximum, even when disabling the display of measurements (what is supposed to give the best possible reading speed)

What is your OS and python version?
I use Windows 7, Python 2.7.10

Have you installed the prerequisites?
Yes, and the software is running.

To Reproduce
1)Connect a 60 Hz signal to one probe of the oscilloscope. In my case, touching the probe tip produce this signal (maybe because of the noising 60 Hz environment)
2)Check for the reading frequency. I got around 3 Hz in the best case.

Expected behavior
Read around 10 Hz minimum (assuming it takes 100 ms to send each data array to the computer).

Screenshots
16msSignal3HzReadings

Additional context
I am using the micro USB cable only (not USB 2 accesory board)

Thanks for such an excellent product. Keep doing it even better.

Oversampling doesn't seem to be working correctly

When I turn on oversampling, the waveform becomes more jagged instead of smoother. It is as if the additional samples actually took place a little before the previous samples instead of after the "normal" samples. I am not sure, but I thought this used to work better. Maybe this occurred when you adjusted the screen display so oversampled no longer appeared as half the frequency as normal sampling.

Haasoscope no longer recognized by PCs

I was not using my Haasoscope for several months, and now when I plug it into computer nothing even appears in Device Manager. My scope is ver.8.81 board from the Kickstarter campaign, still original firmware, and was still working OK till May. I've tried to plug it into several computers, Windows 10 as well as Windows 7, directly as well as via USB hub, changed several USB cables... Same results - nothing even appears in Device Manager!!
Please help to identify what could be a problem - is it a faulty CH340G chip, and would it be possible to use the scope without it (connecting directly to Rx/Tx pins)? How can I check if the scope itself still working or not? It's such a good tool, what a pity if I can't use it anymore :-(

Can't scan JTAG chain. Error code 87

Hallo.

I have tried to update firmware into my Haasoscope board (V 8.81) I use Windows version and the Blaster driver provided by you to avoid the BSOD.

I have connected just USB blaster and it's cable to the board. The power led hac correct Red light.

Then I fire

s:\Haas\Haasoscope\max10_adc_firmware>c:\intelFPGA_pro\18.1\qprogrammer\bin64\quartus_pgm.exe --bgp -m jtag -o "p;output_files/serial1.pof"

And then I have got this error on the command line:

Can't scan JTAG chain. Error code 87

When I try to use GUI version, then the Test JTAG Chain produces additional info
Error: JTAG chain problem detected
Error: No device detected. Detected 1's at TDI pin.

What can be wrong, please?

Can't get single event trigger to work correctly

I can't get single-event trigger to trigger when it won't trigger immediately.

For example, if I configure it as follows:
right click to set trigger
press 'r' to remove rolling trigger
press 'P' to toggle single mode
If I have a continuous waveform, when I press 'p', I will see a single capture of the continuous waveform, but if there is no waveform present, I don't see a single capture when the waveform occurs. It also doesn't trigger if I press 't' to make trigger on rising edge, and then change the voltage from 0 to +3V.

Also, when I press 'p', the console almost always displays "paused False". Every once in a while it displays "paused True".

In summary, I can't get it to trigger when there is a single event.

If single event trigger is working for you, could you show it to me in a short video like you did with my last issue?

Thanks.

Running in Python 3 on Raspberry Pi

Was able to setup the board and run the HaasoscopeDraw.py in Windows with Python 2,7 succesfully.
Trying to setup and run on Raspberry Pi with Python 3.7
Getting this error

Python 3.7.3 (/usr/bin/python3)

%Run HaasoscopeDraw.py
Traceback (most recent call last):
File "/home/pi/Desktop/Haasoscope-python3/software/HaasoscopeDraw.py", line 63
if d.db: print time.time()-d.oldtime,"done with evt",nevents
^
SyntaxError: invalid syntax

Before this I was not able to install PySide2, getting this error:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting PySide2
Could not find a version that satisfies the requirement PySide2 (from versions: )
No matching distribution found for PySide2

everything else in pip3 install pyserial numpy matplotlib Qt.py scipy pyqtgraph PySide2 command seems to be there

Not big in Linux here, just following directions so please, if anybody can explain in plain terms what I am doing worng I'd appreciate it.

error running software

I have hardware v9.01. Is there a known working version of the software I can use?

[Haasoscope]$ python2 --version
Python 2.7.17
[Haasoscope]$ $ git show --summary
commit 2aa6fdd2cb4648d8fe72a57867999ac4fca78c22 (HEAD -> master, origin/master, origin/HEAD)
Author: Andy Haas <[email protected]>
Date:   Fri Dec 20 13:19:15 2019 -0500

    trigger points

[Haasoscope]$ cd software/
[software]$ python2 HaasoscopeDraw.py 
Loading HaasoscopeLib.py
('Linux', 'ss9', '4.19.81-1-lts', '#1 SMP @1572357778', 'x86_64')
matplotlib backend is agg
Loading HaasoscopeLib.py
('Linux', 'ss9', '4.19.81-1-lts', '#1 SMP @1572357778', 'x86_64')
matplotlib backend is agg
num main ADC and max10adc bytes for all boards =  2048 and 0
rate theoretically 35.95 Hz over serial
/dev/ttyUSB0 : USB2.0-Serial : USB VID:PID=1A86:7523 LOCATION=1-1.2
connected serial to /dev/ttyUSB0 , timeout 3.0 seconds
got firmwareversion 15 for board 0 in 2.42 ms
minimum firmwareversion of all boards is 15
rolling trigger
num samples is 512
send increment is 0
do highres is True
trigger time over/under thresh now 1 and usedownsamplefortriggertot is True
serialdelaytimerwait is 100
tell SPI setup: 131  8 0
tell SPI setup: 131  6 16
tell SPI setup: 131  4 36
tell SPI setup: 131  5 36
tell SPI setup: 131  1 0
usb2 connection not available
got uniqueID 80982271106e805c for board 0 , len is now 1
current directory is /home/user/Projects/Haasoscope/software
reading calibrations for board 0 , channels 0 - 4
read calib/calib_80982271106e805c.json.txt
calib was written using firmware version 15
do highres is False
shut down adcs
bye bye!
Traceback (most recent call last):
  File "HaasoscopeDraw.py", line 43, in <module>
    if not d.getchannels(): break
  File "/home/user/Projects/Haasoscope/software/HaasoscopeLib.py", line 1837, in getchannels
    self.on_running(self.ydata, bn) #update data in main window
  File "/home/user/Projects/Haasoscope/software/HaasoscopeLib.py", line 1251, in on_running
    self.lines[thechan].set_xdata(xdatanew)
  File "/usr/lib/python2.7/site-packages/matplotlib/lines.py", line 1213, in set_xdata
    self.stale = True
  File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 241, in stale
    self.stale_callback(self, val)
  File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 68, in _stale_axes_callback
    self.axes.stale = val
  File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 241, in stale
    self.stale_callback(self, val)
  File "/usr/lib/python2.7/site-packages/matplotlib/figure.py", line 60, in _stale_figure_callback
    self.figure.stale = val
  File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 241, in stale
    self.stale_callback(self, val)
  File "/usr/lib/python2.7/site-packages/matplotlib/pyplot.py", line 577, in _auto_draw_if_interactive
    fig.canvas.draw_idle()
  File "/usr/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2055, in draw_idle
    self.draw(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 437, in draw
    self.figure.draw(self.renderer)
  File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/matplotlib/figure.py", line 1493, in draw
    renderer, self, artists, self.suppressComposite)
  File "/usr/lib/python2.7/site-packages/matplotlib/image.py", line 141, in _draw_list_compositing_images
    a.draw(renderer)
  File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2635, in draw
    mimage._draw_list_compositing_images(renderer, self, artists)
  File "/usr/lib/python2.7/site-packages/matplotlib/image.py", line 141, in _draw_list_compositing_images
    a.draw(renderer)
  File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/matplotlib/lines.py", line 738, in draw
    self.recache()
  File "/usr/lib/python2.7/site-packages/matplotlib/lines.py", line 661, in recache
    self._xy = np.column_stack(np.broadcast_arrays(x, y)).astype(float)
  File "/usr/lib/python2.7/site-packages/numpy/lib/stride_tricks.py", line 259, in broadcast_arrays
    shape = _broadcast_shape(*args)
  File "/usr/lib/python2.7/site-packages/numpy/lib/stride_tricks.py", line 193, in _broadcast_shape
    b = np.broadcast(*args[:32])
ValueError: shape mismatch: objects cannot be broadcast to a single shape

Or when trying python 3 it is a little better - the UI screen flashes momentarily before crashing:

[Haasoscope]$ python --version
Python 3.8.0
[Haasoscope]$ git checkout python35 
Switched to branch 'python35'
[Haasoscope]$ cd software/
[software]$ python HaasoscopeDraw.py 
Loading HaasoscopeLib.py
posix.uname_result(sysname='Linux', nodename='ss9', release='4.19.81-1-lts', version='#1 SMP @1572357778', machine='x86_64')
('matplotlib backend is', 'Qt5Agg')
HaasoscopeDraw.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Loading HaasoscopeLib.py
posix.uname_result(sysname='Linux', nodename='ss9', release='4.19.81-1-lts', version='#1 SMP @1572357778', machine='x86_64')
('matplotlib backend is', 'Qt5Agg')
('num main ADC and max10adc bytes for all boards = ', 2048, 'and', 0)
('rate theoretically', 35.95, 'Hz over serial')
('/dev/ttyUSB0', ':', 'USB2.0-Serial', ':', 'USB VID:PID=1A86:7523 LOCATION=1-1.2')
('connected serial to', '/dev/ttyUSB0', ', timeout', 3.0, 'seconds')
('got firmwareversion', 15, 'for board', 0, 'in', 2.26, 'ms')
('minimum firmwareversion of all boards is', 15)
rolling trigger
('num samples is', 512)
('123 send increment is', 0)
('143 do highres is', True)
('129 trigger time over/under thresh now', 1, 'and usedownsamplefortriggertot is', True)
('serialdelaytimerwait is', 100)
('tell SPI setup: 131 ', 8, 0)
('tell SPI setup: 131 ', 6, 16)
('tell SPI setup: 131 ', 4, 36)
('tell SPI setup: 131 ', 5, 36)
('tell SPI setup: 131 ', 1, 0)
usb2 connection not available
('got uniqueID', '80982271106e805c', 'for board', 0, ', len is now', 1)
('current directory is', '/home/user/Projects/Haasoscope/software')
('reading calibrations for board', 0, ', channels', 0, '-', 4)
('read', 'calib/calib_80982271106e805c.json.txt')
('calib was written using firmware version', 15)
('theboard:', 0, ' num_board:', 1, ' chan:', 0, ' num_chan_per_board:', 4)
('theboard:', 0, ' num_board:', 1, ' chan:', 1, ' num_chan_per_board:', 4)
('theboard:', 0, ' num_board:', 1, ' chan:', 2, ' num_chan_per_board:', 4)
('theboard:', 0, ' num_board:', 1, ' chan:', 3, ' num_chan_per_board:', 4)
('143 do highres is', False)
shut down adcs
bye bye!
Traceback (most recent call last):
  File "HaasoscopeDraw.py", line 44, in <module>
    if not d.getchannels(): break
  File "/home/user/Projects/Haasoscope/software/HaasoscopeLib.py", line 1901, in getchannels
    self.drawtext() #redraws the measurements
  File "/home/user/Projects/Haasoscope/software/HaasoscopeLib.py", line 747, in drawtext
    self.texts[0]=(self.ax.text(xpos, height, self.chantext(),horizontalalignment='left', verticalalignment='top',transform=self.ax.transAxes))
  File "/home/user/Projects/Haasoscope/software/HaasoscopeLib.py", line 717, in chantext
    if self.testBit(self.switchpos[theboard],chanonboard):
TypeError: list indices must be integers or slices, not float

Rewriting firmware from scratch

Hi Andy,

Now that I am pleased with my pyqtgraph GUI and resolved the single acquisition issue to my satisfaction, I would like to try something really ambitious. I would like to attempt to write the FPGA firmware to give me a scope with the following specifications:

  1. No max10 ADC, slave processor, or logic analyzer support.
  2. Assign at least 8KB to each of the 4 ADC channels, and if possible dynamically change assignment of the memory so can assign 16KB to each channel if only using 2 channels, and 32KB if only using one channel.

However, I don't know where to start. I would really like to remove the .bdf schematic and just use interface specifications for all the verilog and vhdl code, since my attempts at deleting from or adding to the .bdf schematic always result in errors.

Do you have any suggestions on how to strip your project down to the bare minimum such as just blinky GPIOs and async terminal, and then slowly add on I2C, SPI, andADC as I learn more how they all fit together?

Thanks,
Blake

Single Event triggering

Hi Andy,
I am convinced there is a problem with single-event triggering. My experiment consists of monitoring a switch which I set low, and then set high. Sometimes it does not catch it going high the first time, but does on subsequent times. I am setting it for one-event, rolling off, rising trigger, and then unpause when I want to set up for a new event.

Can you give me a clue as to where I should look to try to debug this issue? Obviously, it is much harder to debug the hardware than software, so I would like to first somehow check to see if the events are getting to the software, but are somehow not causing a screen update.

Thanks.

Wish list

Hi Dr Haas,

I think the Haasoscope is great as is, but since you keep tweaking it, I have the following wish list. (Since it is open source, we can always add whatever we want, so it is no big deal if you choose to ignore these suggestions.)

Wishlist:

  1. When you make a lot of changes, you update a brief readme file so we know if it is a bug fix or an enhancement that we should try out.

  2. You implement horizontal and vertical cursors like the Syscomp CGR-201.

Also, I am thinking about downloading the new firmware to try out the logic analyzer feature, but want to wait until it is stable. Is it working satisfactorily now, or are you planning to make changes to bring it up to snuff?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.