Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1397 Posts: 7500
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 76 Posts: 337
It's my first time on this forum.
I want to connect an analog distance sensor for example the "OMT300-R200-IEP-IO-V1" to the XDK. I was wondering if i can do this with the adc pins (pin A10 and A11) on the extensionboard. I want to make a program that can measure the distance a few times per day and then save that information on the sd card or send it via wifi and temporary via kabel to the computer.
Is this possible and what do i need to make this connection? I do have a 24V sources aviable for the sensor but what more do i need to make the connection (resistors, kabels etc.)?
Thanks in advance!
I do some stuff with the ADC over Extensionboard, too. So i try to answer your questions.
So first of all i recommend to use the pin PD5 on extensionboard. This pin is channel 5 of ADC0. For fruther information about the pins i recommend the XDK110_ExtensionBus_Guide.
To programm some stuff with the ADC you have to use the EMLib library which is a really basic library. But at the moment there are no higher level API's available. A tutorial how to use the EMLib library can you find here : https://developer.appropos.de/ (you have to create an account first but its all free).
Then in the next step i see the sensor you want to use have an analog current output. So you have to messure the voltage over a resistence. Please notice the maximum voltage of the XDK pins are 2,5V. A higher voltage can destroy internal components.
On the apropos side (URL above) you can find some more tutorials e.g. how to store data on a SD card.
I hope that was a little bit helpfull.
Thank you for your response!
I have a 24V power source for my sensor. I want to connect my sensor to a M12 splitter so that i connecit to both the 24V cable and the XDK. The max output of the Sensor is 20mA, so i want to connect the signal pin to a 125 ohm resistor so that the max voltage is equal to 2.5V. This connection can be seen in the inserted image. is this the right way to do it?
And a second question, i read that the max current of the XDK is 100mA, so wouldn't it be a problem to connect a sensor to both ADC ports?
With Kind regards,