rogerjames99
Posts: 29
Joined: Fri Sep 28, 2012 2:58 pm

Velleman VM205 oscilloscope and logic analyser board

Thu Apr 16, 2015 4:29 pm

Hi,

Has anyone one got any recent information on when the Velleman VM205 oscilloscope and logic analyser board for the Raspberry Pi is going to ship. I have had one on order for a while. It looks like it has been "coming soon" since the middle of last year.

Roger

User avatar
DougieLawson
Posts: 35557
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Velleman VM205 oscilloscope and logic analyser board

Thu Apr 16, 2015 9:22 pm

Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
B.Goode
Posts: 8049
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Velleman VM205 oscilloscope and logic analyser board

Thu Apr 16, 2015 9:40 pm

Note the OS prerequisite from the documentation on the related Github repository:
Currently, the only supported platform is the Raspberry Pi, with a recent distribution of ArchLinux.
From: https://github.com/Velleman/VM205

Subsequent follow-up: Contradicting this, Page 5 of the downloadable manual states that it is necessary to install Raspbian. http://www.velleman.eu/downloads/0/usermanual_vm205.pdf
Last edited by B.Goode on Fri Apr 17, 2015 7:59 am, edited 1 time in total.

rogerjames99
Posts: 29
Joined: Fri Sep 28, 2012 2:58 pm

Re: Velleman VM205 oscilloscope and logic analyser board

Fri Apr 17, 2015 12:39 am

I have the module on order from ESR. They are the company behind both of the links above. They told me a couple of weeks ago that they where expecting the module in stock very soon. However I have not received anything yet. I was just wondering if anyone had got their hands on one, or knew anything about why they were delayed.

Roger

rogerjames99
Posts: 29
Joined: Fri Sep 28, 2012 2:58 pm

Re: Velleman VM205 oscilloscope and logic analyser board

Fri Apr 17, 2015 4:44 pm

Latest update from ESR is that they have two pallets in transit which should arrive by the end of the month.

Roger

rogerjames99
Posts: 29
Joined: Fri Sep 28, 2012 2:58 pm

Re: Velleman VM205 oscilloscope and logic analyser board

Wed Apr 29, 2015 5:59 pm

Arrived about a week ago. What a nice piece of kit! A single channel digital storage scope and 10 channel logic analyser for less than 30 quid! Using it to debug my initio robot and pirocon board. Contrary to some of the published info the software is written in c++ and runs as is on raspbian. Both source and executable are available on GitHub at https://github.com/Velleman/VM205.git. One limitation is the sample buffer is only 800 slots long. It would be nice to have (or write!) a facility in the software to do a continuous dump to a vcd file for offline analysis. However looking at the protocol I am not sure if you could guarantee reading the spi bus fast enough. I have not done the math and do not know whether the board is double buffered.

Roger

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: Velleman VM205 oscilloscope and logic analyser board

Tue Jun 02, 2015 7:06 pm

which one did you buy?
Antikythera

rogerjames99
Posts: 29
Joined: Fri Sep 28, 2012 2:58 pm

Re: Velleman VM205 oscilloscope and logic analyser board

Tue Jun 02, 2015 7:23 pm

As far as I know there is only one version. The vm205 provides both single channel scope and ten channel logic analyser functionality.

Roger

Ritchie
Posts: 5
Joined: Tue Jun 02, 2015 11:08 am

Re: Velleman VM205 oscilloscope and logic analyser board

Wed Jun 03, 2015 10:11 am

Hi,
I have bought and tested a Velleman VM205 oscilloscope + logic analyzer add-on card.
It works fine for what I need it for.
I also have an ADAFRUIT 2.8" touchscreen for my Raspberry PI
I've tested this too and it works fine once you setup the Graphic interface to send the screensignal to the TFT in the right resolution.
Now I want to combine both SPI devices on the same SPI-bus.
How do I do this please ?
The intention is to make a full portable oscilloscope with these 2 .
The Velleman scope-kit only uses these pins : SPI_MOSI , SPI_MISO , SPI_SCLK , SPI_CE0 , GND , 3.3V , 5V
Many thanks for your help in advance !!!

Chipmunk03
Posts: 9
Joined: Sat Mar 23, 2013 8:32 am

Re: Velleman VM205 oscilloscope and logic analyser board

Sat Sep 05, 2015 3:07 pm

Hi,
I recently bought this oscilloscope. The manual and installation instructions are very poor. I can't get my scope running. I think it has to do with the SPI. At boot time I see spi2708 or something like that. I enabled it in raspi-conf.
The software is written in freepascal. On git hub there is also a cpp version. I tried to compile it, but both don't work either.
I made a tone generator using a 555. It generates a sinus of 1kHz. Nothing on screen. Just a flat line.
How did you test the scope?
I use Raspbian wheeze. But maybe I've to switch to archlinux.
I hope to get it running soon.

Cheers

Ritchie
Posts: 5
Joined: Tue Jun 02, 2015 11:08 am

Re: Velleman VM205 oscilloscope and logic analyser board

Wed Sep 09, 2015 5:11 pm

Hi Chipmunk03,
Get a 4GB SDcard minimum and put NOOBS on it,
http://www.raspberrypi.org/help/noobs-setup/
Connect your PI to the internet.
and from www.velleman.eu download the VM205-software,
Execute it from your PI-desktop and the executable VM205 will appear.
This is the graphical "app".
Make sure to adjust the rights so "anyone" can run it. (right-click > properties)
Start it and it will work just fine and right away.

Have fun.
I sure hope someone may find a solution for my question above...

Chipmunk03
Posts: 9
Joined: Sat Mar 23, 2013 8:32 am

Re: Velleman VM205 oscilloscope and logic analyser board

Wed Sep 09, 2015 10:03 pm

Hi Ritchie,

today I installed NOOBS 1.4.1 on a 8GB SD card. I downloaded the software, unzipped it, made VM205 executable, 'et voila', I've got my scope running. The 555 timer (http://www.electroniq.net/555-timer-cir ... timer.html) is generating wonderful block forms.
I was using an older version of Raspbian. I upgraded it and did also a firmware upgrade. Unfortunately, that did not help.
This one went straight out of the zip into a wonderful scope. Now I can start experimenting.
I use a 2012 version of the Raspberry Pi Model B. It's not that quick. But it's okay.
Is it possible to mount it on a Pi 2?

Thanks for your advice. It really helped me out.

Cheers.

rogerjames99
Posts: 29
Joined: Fri Sep 28, 2012 2:58 pm

Re: Velleman VM205 oscilloscope and logic analyser board

Wed Sep 09, 2015 11:43 pm

Ritchie wrote:
Have fun.
I sure hope someone may find a solution for my question above...
You need to ensure one device is using ce0 (p1-24) and the other ce1(p1-26). This will mean a combination of hardware jumpers (or maybe firmware) on both boards and corresponding config for the software for both boards to read from the corresponding spi device driver file. I don't know if either of boards have the hardware/firmware capability to change which p1 they use for chip select. If not you will have to bodge the p1 connection.
Roger

Chipmunk03
Posts: 9
Joined: Sat Mar 23, 2013 8:32 am

Re: Velleman VM205 oscilloscope and logic analyser board

Mon Sep 21, 2015 2:21 pm

Hi,

I found this document on the vellaman website. Maybe it can help you find a solution for the SPI interface.

http://www.velleman.eu/downloads/0/info ... _vm205.pdf

"SPI interface setƫings
Clock Polarity (CPOL) = 1
Clock Phase (CPHA) = 0
SPI chip select = enabled, active low
SPI clock speed = 500 kHz max. SPI bits per word = 8
Bit order = MSB fi rst

The SPI port needs to be enabled in Raspbian before it can be used. Edit the modules blacklist fi le by typing:
sudo nano /etc/modprobe.d/raspi-blacklist.conf
Add a ‘#’ character to this line so it is commented out:
#blacklist spi-bcm2708
Exit and save the fi le.
Enter “sudo reboot” to restart the pi and now the SPI pins will be available to use.
Test the SPI port is working by typing:
ls /dev/spidev*
You should see the following:
/dev/spidev0.0 /dev/spidev0.1"

Regards,

Chipmunk03

Chipmunk03
Posts: 9
Joined: Sat Mar 23, 2013 8:32 am

Re: Velleman VM205 oscilloscope and logic analyser board

Mon Sep 21, 2015 2:43 pm

Hi,

Velleman developed the scope software in Pascal. The software can be found here http://www.velleman.eu/downloads/files/ ... _rev10.zip

It's opensource and can be edited with Delpi, Lazarus or Turbo Pascal.

I already changed the software a little (I added a 'Quit' button, because I like that better than just clicking a little white cross in a small red box in the upper right corner of a window). I want the data the scope reads/shows to be written to file like a log does, so you can reread it and view it back later on as soon as one clicks on the 'Run' button.

The C++ software found on git isn't much of an interface and needs a lot of work to get it in a scope interface like VM205 or VM205.exe or xoscope.

Another option I thought of is to write a driver for Xoscope. Xoscope looks realy good and can also be used for a soundcard scope. If Xoscope can read from /dev/spidev* it can hopefully show it's data on Xscope.

Cheers

Moorfox
Posts: 2
Joined: Tue Jan 05, 2016 9:44 am

Re: Velleman VM205 oscilloscope and logic analyser board

Tue Jan 05, 2016 9:48 am

Hello Chipmunk03.
The source in Pascal is no more available. I wish to take a look on it. Do you know another way to have it? Eventually have you downloaded and saved it?

Thank you so much for any help

Moorfox from Italy

Chipmunk03
Posts: 9
Joined: Sat Mar 23, 2013 8:32 am

Re: Velleman VM205 oscilloscope and logic analyser board

Tue Jan 05, 2016 12:31 pm

Hi Moorfox,

the download is still available at:

http://www.velleman.eu/support/downloads/?code=VM205

Kind Regards,

Chipmunk03


Moorfox
Posts: 2
Joined: Tue Jan 05, 2016 9:44 am

Re: Velleman VM205 oscilloscope and logic analyser board

Tue Jan 05, 2016 4:15 pm

Thank you for everything!

hkikem
Posts: 2
Joined: Thu Feb 11, 2016 10:34 am

Re: Velleman VM205 oscilloscope and logic analyser board

Thu Feb 11, 2016 10:43 am

Hello every body;

I'm traying to do an spi communication between my raspberry PI 2 and the oscilloscope and logic analyzer shield for raspberry Pi VM205.

The spi protocol to reading the data can be desribed as follows :

To reset the system and to start the data acquisition, send byte 0x81 to the SPI port. Then check if the data acquisition is
complete:
1. Wait 20ms.
2. Send byte 0x82 to the SPI port
3. Read the response from the SPI port.
If the response is 0x02, the data acquisition is complete.
If the response is 0x00, the data acquisition is not yet complete.
In this case repeat the sequence 1-3 above.


After getting response 0x02, the acquired data can be read. Send 801 times 0x01 to the SPI port and read the response. You’ll get 800 values containing the oscilloscope data.

Then send 801 times 0x02 to the SPI port and read the response. You’ll now get 800 values containing the logic analyzer data for
the eight first channels.

Then send 801times 0x03 to the SPI port and read the response. You’ll now get 800 values containing the logic analyzer data for
the channels 9 and 10. Bit #0 is channel 9 data and bit #1 is channel 10 data.

In the logic analyzer data each bit corresponds the input channel state:
bit value 0 = input state low
bit value 1 = input state high

We can found the all protocol here :
http://www.vellemanprojects.eu/download ... _vm205.pdf

So I implemeted the following code using the wiringPiSPI library to start the communication (just the first paragraph selected in red) and to see if I will have response :

#include <iostream>
#include <wiringPiSPI.h>
#include <wiringPi.h>
#include <errno.h>
#include <unistd.h>

#include <string.h>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

static int myFd;

int main()
{
int speed = 1000000;

int spi_chan = 0;

if ((myFd = wiringPiSPISetup (spi_chan, speed)) < 0)
{
cout << (stderr, "Can't open the SPI bus: %s\n", strerror (errno)) << endl;
exit (EXIT_FAILURE) ;
}

unsigned char byte = 0x81;
wiringPiSPIDataRW(spi_chan, &byte, spi_chan); /*reset the system and start the data acquisition*/

unsigned char reponse = 0x82;
bool out = false;

while((reponse == 0x00)&&(out == false)){
usleep(20000);
unsigned char reponse = 0x82;
wiringPiSPIDataRW(spi_chan, &reponse, spi_chan);
cout << int(reponse) << endl;
if (reponse == 0x02){out = true;}
}

}

But the problem now is, I don't have any response about my card vm205.
So if you can give some helps ….
thank you

rogerjames99
Posts: 29
Joined: Fri Sep 28, 2012 2:58 pm

Re: Velleman VM205 oscilloscope and logic analyser board

Thu Feb 11, 2016 12:14 pm

I suggest you try the code at https://github.com/Velleman/VM205/tree/master/src first and see if that works. If it does then it it is likely that your code or the wiringpi library is not initialising the spi bus or the velleman board properly. Have a look at the source and see who is not doing what.

Roger

hkikem
Posts: 2
Joined: Thu Feb 11, 2016 10:34 am

Re: Velleman VM205 oscilloscope and logic analyser board

Wed Feb 17, 2016 8:53 am

Hi,
Thank you for your response, Velleman support sent me this code, it's in C++. It works well, you must just add <unistd.h> for the the usleep function.
http://forum.velleman.eu/viewtopic.php?f=80&t=16683

Code: Select all

#include <fcntl.h>            //Needed for SPI port
#include <sys/ioctl.h>         //Needed for SPI port
#include <linux/spi/spidev.h>   //Needed for SPI port
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <cstring>

using namespace std;

int fd;
unsigned char spi_mode;
unsigned char spi_bitsPerWord;
unsigned int spi_speed;

void SpiOpenPort (int spi_device)
{
    //----- SET SPI MODE -----
    //SPI_MODE_0 (0,0)    CPOL=0 , CPHA=0
    //SPI_MODE_1 (0,1)    CPOL=0 , CPHA=1
    //SPI_MODE_2 (1,0)    CPOL=1 , CPHA=0
    //SPI_MODE_3 (1,1)    CPOL=1 , CPHA=1
    spi_mode = SPI_MODE_2;
   
    //----- SET BITS PER WORD -----
    spi_bitsPerWord = 8;
   
    //----- SET SPI BUS SPEED -----
    spi_speed = 1000000;      //1000000 = 1MHz 

   fd = open(std::string("/dev/spidev0.0").c_str(), O_RDWR);

    ioctl(fd, SPI_IOC_WR_MODE, &spi_mode);
    ioctl(fd, SPI_IOC_RD_MODE, &spi_mode);
    ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &spi_bitsPerWord);
    ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &spi_bitsPerWord);
   ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &spi_speed);
    ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &spi_speed);
}

int SpiWriteAndRead (unsigned char data)
{
   unsigned char rxDat;
   struct spi_ioc_transfer spi;
 
   spi.tx_buf        = (unsigned long)&data; // transmit from "data"
   spi.rx_buf        = (unsigned long)&rxDat; // receive into "rxDat"
   spi.len           = 1 ;
   spi.delay_usecs   = 0 ;
   spi.speed_hz      = spi_speed ;
   spi.bits_per_word = spi_bitsPerWord ;
   spi.cs_change = 0;
   spi.pad = 0;
   
   ioctl(fd, SPI_IOC_MESSAGE(1), &spi) ;

   return rxDat;
}

int main(void)
{
   int i,h;
   unsigned char data;
    SpiOpenPort (0);
   
   data= 0x93;          // Time/Div setting
   SpiWriteAndRead (data);
   data= 0x0c;          // 1MS/s
   SpiWriteAndRead (data);
   data= 0x94;          // Trigger setting
   SpiWriteAndRead (data);
   data= 0x02;          // Trigger Off
   SpiWriteAndRead (data);
   
   data= 0x81;
   SpiWriteAndRead (data);
   h = 0;
   i = 0;
   do
   {
      data= 0x82;
      usleep (20000);
      h = SpiWriteAndRead (data);
      cout << "The Result is: " << int(h) << endl;
      i++;
   }
   while (h != 2  && i < 1000);
   
   for (i=0; i<802; i++)
   {
      data= 0x01;
      h = SpiWriteAndRead (data);
      if (i<10)
         cout << "Data [" << int(i) << "] is: " << int(h) << endl;   
   }
   
   for (i=0; i<802; i++)
   {
      data= 0x02;
      h = SpiWriteAndRead (data);
      if (i<10)      
         cout << "Data [" << int(i) << "] is: " << int(h) << endl;      
   }
   
   for (i=0; i<802; i++)
   {
      data= 0x03;
      h = SpiWriteAndRead (data);          
   }
   
    close(fd);
    return 0;
}
Hakim

Return to “HATs and other add-ons”