Reading currents and controlling voltages in c++

  • Context: C/C++ 
  • Thread starter Thread starter Mr_Grieves
  • Start date Start date
  • Tags Tags
    C++ Currents Reading
Click For Summary

Discussion Overview

The discussion revolves around the challenges of reading currents and controlling voltages in a C++ program for an interferometer application. Participants explore potential peripherals for interfacing with a photodiode and controlling voltage, as well as the feasibility of using a standard 1/8'' speaker output for this purpose.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant, Dave, seeks advice on reasonably priced peripherals that support Linux for controlling voltage and reading current from a photodiode.
  • Dave questions the precision of using a 1/8'' speaker output for these measurements.
  • Another participant notes that the microphone input is generally limited to 8 bits and operates at a frequency of 20-40 kHz, suggesting that additional electronics may be necessary for proper interfacing.
  • This participant also provides links to resources for educational and hobbyist devices that may be suitable for Dave's needs.
  • Dave later inquires about Linux libraries that could facilitate the control and recording of microphone signals in C++.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the best approach or peripheral for the task. Multiple viewpoints regarding the use of standard audio inputs and the need for additional electronics remain present.

Contextual Notes

There are limitations regarding the precision of standard audio outputs and inputs, as well as the potential need for custom electronics to achieve the desired functionality. The discussion does not resolve these technical challenges.

Who May Find This Useful

Individuals interested in interfacing C++ programs with hardware for scientific applications, particularly in the fields of electronics and programming for experimental setups.

Mr_Grieves
Messages
3
Reaction score
0
Hi all -- I'm writing a controller for an interferometer and I need to be able to control the voltage across a terminal and read the current from a photodiode in c++. What would be a good, reasonably priced peripheral that would accomplish this, preferably with linux support?

Better yet, is it possible to perform this using the 1/8'' speaker output with any real precision?

Thanks,
Dave
 
Technology news on Phys.org
As a note: I'm very new to writing interfaces between programs and peripherals. If I'm going about this the wrong way, let me know. Please, no suggestions to using LabVIEW though :)
 
The microphone input is generally 8bits and pretty fast 20-40khz, you are probably going to need to build more electronics to interface to it - but it will be cheaper than using custom hardware http://www.techlib.com/Karen/misc.htm#Mic Input Telemetry

In the Uk these people are great http://www.picotech.com/, otherwiseyou cna probably find similair stuff locally. Look for devices aimed at education (http://www.heathkit.com/) or hobbies rather than the industrial control ones.
 
Last edited by a moderator:
Cool. Is there a set of linux libraries that will let me control/record the mic signal in c++ that anyone can recommend?

Dave
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 35 ·
2
Replies
35
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K