Rotating a real world object with vvvv

Hi there,

I want to be able to rotate a foam cube that is hanging from a ceiling with a chain.

I know that arduino can control motors but I want to map video onto the rotating cube, so I need to have the speed of the rotation linked exactly to the speed of the virtual cube.

Any ideas?

Many Thanks.

Hey, if you can get your hands on a rotary encoder (RS232?) you could in theory feed back the data?1? into vvvv and loop back to the motor control.
Reading the encoder pulses will give you a read position but as with these things there will be some sort of following error to the “Actual” position.

Or of you have lots of money, SEW manufacture a motor and drive where you can talk directly to the drive and get physical parameters via MOVITOOLS

what about some kind of motor that rotates the chain, and the chain has some kind of trigger attached to it that switches everytime a full rotation is completed, thus recalibrates the virtual cube position?

why don’t you use a stepper motor (you could maybe drive that with arduino), it has predefined increments of the rotation, so you always know the motor position from the number of impulses you have given it?
i don’t know how exact that is for video mapping, though, you got a motion delay of the cube from the torsion of the chain. this may be solved by patching a “delay factor” and manually adjusting this when the setup is running.
i’m curious how this turns out, we recently considered building a similar setup, but with fiducials on the cube, and tracking per camera. we didn’t think it would work accurately enough just with motor control, would be great if we were wrong! :-)

if you use chain to hang the cube you will not be able to control or read rotation with much accuracy because chain gives some flexibility to the system.
on the other hand, if you use fixed rod here is the idea.

you will need to destroy an old usb mouse, not the optical one but the one with a ball. if you disassemble it you will find rotating discs with optocouplers used to sense rotation of the ball. if you gear up one rotating disc to your axle properly (so disc will rotate on a higher rate) you can just plug your big mouse to usb port and use mouse coordinate as input.