Hi,
My request is pretty simple.
I have a camera that outputs a rs232 serial data to control the lens.
I have a lens that needs an analog data to move.
I want to translate the data between them and i think i have all the information i need:
camera data
This is the data that comes out from the camera, i need to connect the serial out to my arduino and read the data.
The lens connector
This is the lens connector, i need to send analog data to pins 5+7 to move the iris.
This is the data that comes out from the camera, i need to connect the serial out to my arduino and read the data.
You might download the .pdf and then attach it to your post. Not sure what the site you linked to is about. You will probably need a level shifter to convert rs232 to TTL.
his is the lens connector, i need to send analog data to pins 5+7 to move the iris.
Not enough info in the picture to understand how the device works.
JoZee:
so i need to reed this data and in response output an analog data to my old lens, meaning: 3.4v-6.2v according to DATA 1.
I'm guessing that the old lens uses the voltage as a reference and not as power. Is that correct?
The Arduino cannot directly generate a varying voltage. You either need to get a DAC module or, perhaps, it would be sufficient to have the Arduino control a digital potentiometer if the old lens does not need any appreciable current.
I have not read the datasheet carefully but I suspect that the second example in Serial Input Basics would be a good starting point for receiving the data. It should at least let you see what you are receiving.
It can generate a PWM signal, which can be smoothed by a resistor and a capacitor, but the average value of that signal will depend on the current consumed by the load.