Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Arduino Due with the rotary encoder
#1
Hi,
I was wondering if it is possible to use the Arduino shield with an Arduino due to get the Output stream to the Arduino DAC pins.
I tried to play with the code and to combine the code from the DDS module and the blink model but didn't succeed.

Thanks,
Ben
Reply
#2
Hi Ben,

As a full-duplex RS-485 interface, the state machine <----> module connection has polarity. In other words, the wiring on one side (A) has to be the opposite of the wiring on the other side (B). The module jacks on the state machine are all 'A', and the "state machine" jack on all modules + the Arduino shield are 'B'. For Module <----> Module connections, we adopted the convention that modules that capture signals (e.g. Analog input, Rotary encoder) are 'B', and modules that generate signals (e.g. Analog output, DDS) are 'A'. This creates a problem for your application - the Arduino shield is type 'B', but so is the 'Module' jack on the rotary encoder module (I'm going by the thread title here). If you have a DDS module, you can connect its 'Input Stream' jack to an Arduino shield (not sure if this is what you meant).

-Josh
Reply
#3
(11-03-2020, 05:56 PM)Josh Wrote: Hi Ben,

As a full-duplex RS-485 interface, the state machine <----> module connection has polarity. In other words, the wiring on one side (A) has to be the opposite of the wiring on the other side (B). The module jacks on the state machine are all 'A', and the "state machine" jack on all modules + the Arduino shield are 'B'. For Module <----> Module connections, we adopted the convention that modules that capture signals (e.g. Analog input, Rotary encoder) are 'B', and modules that generate signals (e.g. Analog output, DDS) are 'A'. This creates a problem for your application - the Arduino shield is type 'B', but so is the 'Module' jack on the rotary encoder module (I'm going by the thread title here). If you have a DDS module, you can connect its 'Input Stream' jack to an Arduino shield (not sure if this is what you meant).

-Josh

I don't have the DDS module, I just tried to use parts of the firmware code from the github.
So from what you say I can't use the arduino shield to get the data from the rotary encoder module.
I will tell you what I am doing:
I am running an experiment without the Bpod itself and I am collecting all the data through open ehys acquisition board.
I am using the rotary encoder as part of my treadmill for both this experiment and the behavior experiment with the Bpod.
I wanted to get the data from the rotary encoder for both experiments and to be able to sync the rotary encoder data with the ephys data.
I need to get some output to be able to sync the rotary ncoder data with the ephys data.

Thanks,
Ben
Reply
#4
Found a way to bypass and use the teensy DAC outpt for direct read of encoder position.
Thanks,
Ben
Reply


Forum Jump: