Rig additions

Alina Peter's Avatar

Alina Peter

29 Mar, 2022 01:21 PM

Hi Chris,

We're planning a few add-ons to rig 4.

  * Another additional reward line or two for additional different juices

As far as I can see this should be possible by just declaring and wiring up additional output lines on the daq card. Or is there something hiding in mworks somewhere that would prevent that?

  * An air puff delivery system

If we can steer it with the daq card, I would hope the same is true here. Depending on the system I may need analog outputs but I hope not.

  * A lick detector. (Eg infrared beam that is on or off, similar to a photodiode signal).

I can feed it either into the intan system as an analog input like the photodiode, or into mworks somehow. Chances are slim but just to be sure, you have never previously hooked up a lick detector I assume?

Thanks for your help

  1. Support Staff 1 Posted by Christopher Sta... on 29 Mar, 2022 01:37 PM

    Christopher Stawarz's Avatar

    Hi Alina,

    Another additional reward line or two for additional different juices

    As far as I can see this should be possible by just declaring and wiring up additional output lines on the daq card.

    Yes, that should be all that's required.

    An air puff delivery system

    If we can steer it with the daq card, I would hope the same is true here. Depending on the system I may need analog outputs but I hope not.

    If you can control it with digital signals, then you should be able to connect it to the same Arduino you use for the juice pumps. If you need analog output, then you may be able to use the Arduino, but it might require a "real" DAQ. Fortunately, I'm almost done adding support for LabJack T4 and T7 devices to MWorks, so that would be a good option.

    A lick detector. (Eg infrared beam that is on or off, similar to a photodiode signal).

    I can feed it either into the intan system as an analog input like the photodiode, or into mworks somehow.

    You could definitely feed it in to an Arduino for recording by MWorks. You just need to make sure that the voltage it produces is within the range allowed by the Arduino (i.e. 0-3.3V).

    Presumably you want to monitor and respond to licks within your experiment, right? If so, then sending the signal to the Intan system wouldn't work, unless you could route it back to MWorks somehow.

    Chances are slim but just to be sure, you have never previously hooked up a lick detector I assume?

    I have not.

    Cheers,
    Chris

  2. 2 Posted by Alina Peter on 29 Mar, 2022 03:38 PM

    Alina Peter's Avatar

    Hi,

    Thanks!

    Currently I only want to evaluate licks passively rather than using them to steer mworks. But it may be powerful actually for artifact prevention to use this.

    I guess we should use a separate arduino so that our trigger/reward arduino is dedicated to its job? And then add the lick detector as a firmata device or so?

  3. Support Staff 3 Posted by Christopher Sta... on 30 Mar, 2022 01:06 PM

    Christopher Stawarz's Avatar

    I guess we should use a separate arduino so that our trigger/reward arduino is dedicated to its job? And then add the lick detector as a firmata device or so?

    You can use a separate Arduino if you want, but I think it would also be fine to use the same one for all the tasks. I guess just do whatever is most convenient.

    Chris

  4. Christopher Stawarz closed this discussion on 05 Apr, 2022 07:34 PM.

  5. Alina Peter re-opened this discussion on 03 May, 2022 01:20 PM

  6. 4 Posted by Alina Peter on 03 May, 2022 01:20 PM

    Alina Peter's Avatar

    Hi Chris,

    Regarding the lick detector, this will be digital input. Do you think we should use the same Arduino we use to send the rewards and triggers or is this better on a separate device?

    The command would just be iochannel/firmata_digital_input
    With the pin number, just like an output? And I can name the line and it writes something when it is on? Or will it be continuously sampled at some frequency?

    Thanks

    Alina

  7. Support Staff 5 Posted by Christopher Sta... on 03 May, 2022 01:30 PM

    Christopher Stawarz's Avatar

    Hi Alina,

    Regarding the lick detector, this will be digital input. Do you think we should use the same Arduino we use to send the rewards and triggers or is this better on a separate device?

    I think it's fine to use the same Arduino.

    The command would just be iochannel/firmata_digital_input. With the pin number, just like an output?

    Correct.

    And I can name the line and it writes something when it is on? Or will it be continuously sampled at some frequency?

    The Firmata firmware running on the Arudino continually polls the digital inputs. When the state of an input changes, it sends the new state to MWorks, which in turn assigns the new value to the variable you specified via the channel's value parameter.

    Cheers,
    Chris

  8. Christopher Stawarz closed this discussion on 17 May, 2022 02:33 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 May, 2022 02:12 PM
16 May, 2022 03:12 PM
04 May, 2022 06:02 PM
03 May, 2022 01:30 PM
02 May, 2022 10:47 PM