| Question ||Answer|
|2009 - triggering:
i was wondering if you had a matlab subroutine that i might be able to
use to trigger the vestibulation box.. or the information i might need
to write such a thing...
what i want to do is load the box up with a waveform and then trigger
it from within an experiment being run by matlab...that way i can
embed the use of the box in an experimental procedure (designed to
look at the effect of vestibulation on music perception).
an alternative i am considering is actually hotwiring the red button
transistor circuit or a relay under computer control
|| If the waveform you want to apply is loaded as a script,
then what you need to do to run it is to send the appropriate commands
over the serial port to run a script. This involves putting the
vesibulator into "Run script" mode, then sending the "Run script"
Each command has to go into a packet of bytes that are sent to the
vestibulator over the serial port. The format is described in detail
in the "Low Level Spec" document. Each packet consists of the
following bytes ("0x" indicates these are hex, base 16, numbers):
0xAA <1 byte giving the number of data bytes> <...data bytes...> <1
byte checksum> 0x55
The data bytes consists of, first, 1 byte giving the command type (we
call that the command designator), and for some commands some
following parameter bytes. What you need are:
command to enter run-script mode: command designator is
cdgSelectModeRunScr = 0x06
command to run a script at a given address in script memory: command
designator is cdgScrRun = 0x12 This is followed by 2 bytes giving the
address in script memory of the script you want to run, lo byte first.
Probably you'll load this at the default address of 0x0000, so these 2
bytes will both just be 0x00. But you can have multiple scripts
loaded in memory at once and select the one you want to run through
So the messages would be 0xAA 0x01 0x06 0x06 0x55 to enter script run
mode 0xAA 0x03 0x12 0x00 0x00 0x12 0x55 to run the script at address
0000 and these are the bytes you'd need to send down the serial port.
Note that the second last byte in each message is the checksum which
is the sum, modulo 0x100 of the data bytes in the message. (Hopefully
I got them right here!) So if you run a script at a different address
the checksum in the second message will be different because the data
bytes will be different. You'd probably want to make a little
subroutine to calculate that and insert the other bytes in the message
given an array of data bytes or something like that.
As to how to send these out from Matlab --
We run at 9600 baud, no parity, one stop bit, and use no flow control.
Aside from the baud rate, I imagine the rest are the defaults that
you'd get with the simplest command to open a port.
|2012-timing of commands: there is a 25ms interval to execute a command. I am
trying to run several instances of the code below but want to make sure
I understand the timing correctly for a part of it. I want to induce a
current change for 1s after a 6s delay so that the whole sequence should
How much time will have elapsed at the end of
this script? |
| I believe that the way it works is that each instruction takes 25 ms,
and the count in the delay instruction is in addition to that basic 25
So what will happen is:
- the first setAllElectrodes command will change the electrodes to all
zeroes "immediately" (as I said yesterday, within a few milliseconds I
would think), and by itself will hold them there for 25 ms.
- the delay 238 will cause a 25 ms delay due to its basic cycle, then
238*25 = 5950 more. So by now the electrodes will have been set to 0
for 25 (from the setAllElectrodes command) + 25+5950 (from the delay
command), so 6000 ms.
-the next setAllElectrodes command will change to the values you want
and by itself will hold them there for 25 ms
- the next delay, if it were 38 not 39, would cause the 25 ms basic
cycle plus 38*25 = 950 ms more. So by the end of that command, the
electrodes will have been set to the new values for 25 + 25+950 = 1000
- the stop command should then zero the electrodes.
The total script will then have run for 7 seconds.
So it seems to me that you should change the 39 to 38 in the last delay,
but then it should do what you want.
|2014 - electrode mounting||
M B-C used disposable electrodes: 1.25? diameter round carbon-conductor electrodes (9000 series electrodes; Empi Recovery Sciences, St. Paul, Minnesota, USA) and prepped the skin area with alcohol vigorously rubbed into the skin along with conductive gel. While we did note individual differences with regards to the response, all participants reported illusory self-motion when seated with their eyes closed.
You can check the paper for details on how we configured the electrodes. In general we varied anode and cathode current across the two mastoids and we placed a ground electrode over the forehead based on similar protocols reported from other labs.
|2014 - do I need to attach common, ground electrodes|| common/ground electrode should be attached, not "must be",
-- it's a little subtle. Suppose you have
electrode 1 and electrode 2 attached and you command +1 mA out of each.
That's 2 mA going in. Somewhere 2 mA has to come out.
The purpose of the ground electrode is to pick that up and
route it back to the vestibulator so the total current going in balances.
If you commanded +1 mA from electrode 1 and -1 mA from electrode 2, then
nominally things balance and no current would need to flow into the
ground electrode. So you might think you could do without attaching it.
However, even if you were always careful to keep the total at zero when
you sum all the plus and minus currents, minor tolerance effects between
the channels mean things wouldn't *exactly* balance. There might be,
say, 0.01 mA of imbalance. That would flow into the ground electrode.
If the ground weren't attached in this situation, probably what would
happen is one channel would be pushed to its voltage limit trying to
fight the other channel over that tiny imbalance. It wouldn't hurt
anything, but it just doesn't seem right! So it's best to always
connect the ground electrode.
|2014 - Galvani's resting place||Church of Corpus Domini, Bologna Italy.
Laura Bassi is also buried there,under the floor, in the middle aisle of the Church.
Reference: Frize M. (2013) Laura Bassi and Science in 18th Century Europe. Springer.|
|2014 - Cable to Electrode connection|| 50x25x10 mm. block of plastic
with small nails through it to join electrode wires into cable. The block of plastic cause it keeps things together, but electrically isolated.
|2014- shortcut for setting comm port||
- Find the vestib2p6a.exe program on your computer using the Windows
- Right click on it and select "Create Shortcut".
This will make a file called "vestib2p6a.exe - Shortcut" in the same
directory (or something like that -- different Windows versions might
vary a bit).
- Drag that shortcut file onto the desktop.
You should now have a desktop icon from which to run the vestib program.
- Right click on the desktop icon and select "Properties".
- In the properties dialog, the "Shortcut" sheet (which is probably the
one when the dialog opened) there is an entry for "Target" which should
have the pathname of the vestib2p6a.exe program. Left click on that, go
to the end of that string (you can use the End key or the right arrow
key). There you can enter the argument that you would enter if you
started the program from the command line. So add a space and the port
number just as you would if you were starting the program from the
- Click on the OK button to close the dialog.
- Now if you start the vestib program by double clicking that desktop icon
it should start with the right port.
|2015 - more electrode suggestions||
YorkU, here in Canada, uses electrodes they order from Shoppers Drug mart: 199325-001. They say they're good to 5 mA.
But they say using putting a nice even coating of electrode gel (Spectra Gel) over the electrode is critical.
Any uncovered spots will cause burns.
|2017 - running from matlab||
If you're using Matlab to generate a waveform profile off-line and then
just want to apply that profile, you can load an arbitrary profile into
the script memory and then call that up by running the script. That's
described in section 7 of the manual. You're limited to about a
thousand samples and the speed is user-selectable up to 40 samples per
| 2017 - controlling real time
|| If what you want to do is to generate the excitation profile you want in
real time, say to synchronize with some other stimulus or for some
feedback experiment or something like that,
The approach then is to send commands to the vestibulator
to set the electrode current to new values whenever you want to change
them. The details are in the "Low Level Spec", but the following is a
We send commands to the vestibulator in small packets of bytes. Our PC
program generates these packets, so when you're using that you normally
don't have to deal with the packet level. However, if you want to
control the vestibulator from your own program, running on either a PC
or an Arduino, you need to generate the right bytes for the commands you
want and send them to the vestibulator through the serial port.
To control the vestibulator in real time, it has to be in
"Direct Electrode Control Mode"
(maybe it's just "Direct Electrode Mode" or "Direct Mode" in some of the
documents). You tell it to enter that mode from Idle Mode (which is
what it's in when you first switch it on) by sending it a packet
consisting of the following bytes (in hex)
AA 01 02 02 55
The AA at the beginning and the 55 at the end are there for all packets.
They just help us to resynchronize if we lose the start of a packet.
The second byte, 01 here, is the the number of bytes in the packet
excluding the header and trailer bytes, just 1 here.
The third byte is the "command designator" which describes the kind of
All the command designators are listed in Appendix A of the Low-level Spec.
02 is the one to select mode direct.
That command requires no extra data, so the whole data payload of the
packet is just that one byte, 02, for this command.
The second last byte is a checksum.
It's the sum modulo hex 100 (decimal 256) of the data bytes in the packet.
The modulo operation means it's always just 1 byte.
Since there is just 1 data byte here, the sum of them is just 02.
And the final 55 is the trailing sync byte I mentioned above.
So, if you send that sequence of bytes down the serial port to the
vestibulator it should go into direct electrode mode.
Once you're in direct electrode mode, whenever you want to change the
electrode currents, you again send a packet. This packet will be
AA 05 0A ii jj kk ll ss 55
AA and 55 are as above.
05 is the data length, 5 bytes here for a "set all electrodes" command.
0A is the command designator for the "set all electrodes command".
ii, jj, kk, ll are bytes giving the current on the 4 electrodes,
the same bytes you would put into the script command.
ss is the checksum. This has to be calculated as
0A+ii+jj+kk+ll modulo hex 100
(this just the remainder after dividing 0A+ii+jj+kk+ll by hex 100
or decimal 256).
If you want to be neat, when you finish the sequence,
you can deselect direct control mode with
AA 01 03 03 55
Or you can turn the device off and back on to get back to idle mode.
Otherwise when you try and send the next command to enter direct mode,
if you're already in direct mode, there'll be some error come back probably.
In fact while you're sending packets to the vestibulator it'll be
sending messages back to you saying what it's doing. If you can record
that it'll help debug things.
Probably you need a little program on the PC or Arduino that times
things for you, generates your samples, assembles the packets (the
checksum has to be calculated for each packet), and sends that out the
serial port. Matlab can control the PC serial port:
and Arduinos can do their own.
That program can also record the stuff that comes back. Our PC program
parses the messages that come back and gives you something readable to
see. But you can interpret them manually if something goes wrong. Most
of them are just messages like "I got that last message you sent me and
have done that".
Humans can't respond very fast to these stimuli, so the command rate
that the vestibulator can deal with probably shouldn't be much of a
limit. However, we communicate at 9600 baud with 8-N-1 format. That's
10 bits/byte on the wire, so 960 bytes/second. A set-all-electrodes
command takes 9 bytes. So you could send up to 960/9 = 106
commands/second max. Frankly we've never tried to run that fast, there
may be processing limitations in the poor little microcontroller in the
vestibulator. 10 or 20 per second should work fine. If you want to
experiment with speed limits, you could try increasing the speed until
the unit faults (the red light comes on and it sends back a fault
message because its input buffer would have overflowed).