Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #1 
Hi there,

Is it possible to send eventcode signals with monkeylogic to a bluetooth or wireless 
transmitter (that is usb connected) rather than a data acquisition card that is typically used? 

Thanks!
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #2 
Would you explain more details about the purpose and the setup? The latest version of NIMH ML can trigger a remote reward device via Bluetooth. If that is what you are looking for, please see the 'doc\Bluetooth' directory.
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #3 
Where is doc/bluetooth? I can't find it in the latest version, if it's there where I have to search for
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #4 
It is in the installation path or under the main directory of NIMH ML.
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #5 
OK, I managed to get this to work, but does the bluetooth module needs to be continuously connected to the Arduino Uno or does the bluetooth module could standalone?

Thanks!
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #6 
The Bluetooth module is just a receiver. It is the Uno that powers up the module and generates TTLs.
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #7 
Do you know of any miniature bluetooth module (monkey-head wearable) that could receive bluetooth commands from Monkey Logic and use these to trigger a TTL or analog output? Has this been done before? We want to capture behavioral events on a mobile recording system located on the monkey's head. 
 
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #8 
I don't know. There is a small wifi version of Arduino though. It may suit your purpose.

https://store.arduino.cc/usa/arduino-mkr1000
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #9 
Thanks, does that mean that this wifi Arduino will not need to be wired connected to the bluetooth module?
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #10 
It means you will use wifi instead of Bluetooth. It has the wifi module on board, so there won't be a wire connection except for the battery, I think. It is up to you.
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #11 
Do you think we can use this https://www.adafruit.com/product/2377 instead, that is smaller, to send the TTLs from the bluetooth receive command?

Thanks!
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #12 
You should contact the manufacturer.
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #13 
Is there any way to send 'goodmonkey' events to multiple bluetooth devices 
(ie. define multiple com port outputs in GUI)?

Thanks!
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #14 
Hi Jaewon,

I haven't heard back from you and it will be nice if we could sort this out quickly. 

Is it possible to send multiple bluetooth eventmarkers of interest via ML? Is it possible to add multiple bluetooth subsystem / ports to encode different events/event markers outside of "goodmonkey"?

Thanks!
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #15 
First, I didn't think you were asking me the question. Second, there is nothing much I can say, if you just describe how you want to fix something and ask if it is possible. That doesn't give me enough information to think about the solution. You've got to explain what is your purpose of doing it and how your equipment is set, as I said in my very first answer of this post. The following post is a good example of what I mean.

http://forums.monkeylogic.org/post/graphic-alpha-value-10101644?pid=1308247843
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #16 
We would like to synchronize task events from ML with wirelessly recorded physiological data being collected from the monkey. We have a custom-made wireless physiological recording device mounted on the monkey's head. This device can also receive analog inputs, and TTL, that are synchronously recorded with physiological signals. We would like to synchronize task events from ML with the physiological recordings as the animal performs the ML coded task. In order to do this, we want the head-mounted device to receive TTL inputs wirelessly i.e. through bluetooth module that is wired to the recording device to receive specific event markers from ML. We currently have set this up using the wifi arduino (trinket) and the HS-08 module following your instructions so that the recording device can receive TTL inputs everytime the animal is rewarded. We'd like to send this TTL to 2 or more devices at the same time. Ideally, we'd like to be able to customize what event codes we want to send to the individual bluetooth modules instead of just the reward event. For example, in some instances we would like to send the start cue event for each trial to the bluetooth module so that incorrect trials can also be synchronized with physiological data in the event that animal does not perform any correct trials or there are long delays between rewards. 

Please let me know if you have any other questions!

Thanks
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #17 
You said this head-mounted device is wireless but also described as if it records signals, which is confusing. To clarify, let me ask this. Where is the data that the device records stored? Does it have a memory card or something?

When people say "wireless", usually the module that goes on the subject's head is a transmitter and data is actually saved in a remote receiver computer. If the module stores data in it, it may be a compact, portable recording device, but not a wireless device.

If there is a receiver computer, you should try to sync events on the receiver computer. Sending codes to the transmitter via Bluetooth for event sync is not a good idea, because of huge latencies. As I already showed in the manual (the benchmark at the bottom of https://monkeylogic.nimh.nih.gov/docs_BluetoothRewardTrigger.html), the latency of Bluetooth transmission is 14-40 ms even in the best condition. It is okay for triggering reward but too slow for event sync.


0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #18 
Is it possible for ML to relay a TTL for an assigned event code, by outputting a TTL pulse from an Arduino output pin, with negligible (<= 1 ms) latency? That is, instead of sending a TTL for an assigned event code through a DAQ, could this be relayed directly out of an Arduino output pin. 
I apologize for the confusion and thanks a lot for all your help! 
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #19 
You are doing the same thing again. I have no idea what to say to your question. You need to tell me where the recorded data is saved in your setup.
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #20 

Yes, the device has a memory card, stores recorded data. Any other clarification?

 
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #21 
I don't see any wireless part in your system. Why are you calling it a wireless device? Does it have a radio transmitter or receiver?
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #22 
No, it does not have a radio transmitter or receiver. This is what we would like to introduce via bluetooth/wifi to communicate event codes to the device.
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #23 
Now I think I understand what is going on. I don't know who is developing your device, but what you are asking is the way to fix the design flaw of the device. The developer should have thought about how to sync data stream with external events.

Finding a solution for this kind of problem requires understanding of the device's functions and latencies in each step, as well as a lot of effort in testing. I think you should hire or collaborate with someone knowledgeable and give the person proper credit for the development of the device. This is not something you can fix with a few questions.
0
GLP

Junior Member
Registered:
Posts: 24
Reply with quote  #24 
We have an RF engineer working with us and a lot of these questions are after discussion with him. So, our aim is to find if there is a way through ML to output a low-latency TTL for a specified event using a USB-connected arduino ? That is, we would like to output a TTL pulse for a cue event from the PC using an arduino or other low-cost solution besides a DAQ. To specify further, we would like an arduino to output a 3 - 5 V high pulse for a variable duration (1 - 1000 ms) whenever an event I select (e.g. fix cue) occurs and the latency between the generation of this pulse and the event in the task to be < 2 ms.

Is that possible?

Thanks!
 
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #25 
You should talk to Mathworks and Arduino guys for this, since your question has nothing to do with NIMH ML. MATLAB has a support package for Arduino control, so you can take a look at it.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.