LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 08-01-2017, 06:49 AM   #1
Boniato
LQ Newbie
 
Registered: Aug 2017
Posts: 11

Rep: Reputation: Disabled
Analogue output professional single board computer


Dear all,

In my work I need to set up a system that reads from a USB device and sends the data as a voltage to another device.
For this purpose I have created some Python code that can read from the USB device and convert the digital input into an analogue voltage in a Raspberry Pi running Linux.

The set up works properly but I need a professional and more stable version of it. I'm considering two potential options:

1) To buy a professional grade single board computer. I'm not an expert, so perhaps someone can recommend a Raspberry equivalent board that runs Linux, has a port for SATA or SSD, has analogue voltage output and USB input and is very stable.

2) To use a desktop computer with a suitable analogue card. That would be a Linux server with a Linux compatible card, that can produce voltage output such as in the Raspberry Pi and interacts with Python through some library. Does anyone know of such a card?

I'm not sure which option is the best, or which is the best hardware for each option. Any help will be kindly appreciated!

Thanks a lot for reading!
Boniato
 
Old 08-01-2017, 08:36 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
What you need is a digital to analogue converter. You need to Specify your requirements for the voltage(voltage & current values), the degree of control, etc. For example, 8 bit D/As are cheap; but they only have 255 steps, so a 0-5V output has step sizes around 20mV. 64 bit D/As are %@£&! expensive, if available at all. Match your python to your d/a.

Then source the parts matching your spec.If this isn't straightforward, use someone local with a knowledge of electronics. Little things mean a lot, especially with analogue stuff, which is different, more fragile and fussy than digital.
 
Old 08-01-2017, 09:10 AM   #3
Boniato
LQ Newbie
 
Registered: Aug 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thank you Business Kid.
Price is not so much a concern so the more voltage resolution the better. But if someone can advice about a digital to analogue converter that is Linux compatible and easy to control from Python it would be great!
 
Old 08-01-2017, 10:38 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
National Instruments or Measurement Computing Corporation would be my choices for I/O stuff. Measurement Computing has some information on there website about building acquisition equipment using the Pi.

You didn't post your configuration or why your system is unstable but there could be many reasons whether it is related to the operating system, hardware etc.
 
Old 08-01-2017, 10:47 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Look for industrial I/O cards.
 
Old 08-01-2017, 11:37 AM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
What exactly is unstable about the RPi? There are addon things hardware wise which reduce the load / work that needs to be done on the pi. There are industrial cards too, which mostly extend the operation temperature range. The freescale i.MX6 boards have had SATA for a while now. Lots of options depending on what you need. Some of the cubie boards have had SATA too.

cubieboard.org
(doesn't seem to be online for me atm)

The compu-lab utilite had the i.MX6 setup with dual video out and dual gigabit ethernet ports. And an SSD. Not so sure about the GPIO option(s) since it was more of an early fanless desktop type thing. Lots of options like minnowboard and others. So many boards these days.

http://linuxgizmos.com/

Some of which have laptops based on them now. pi-top, pinebook, ...

https://pi-top.com/

https://www.pine64.org/?product=pinebook

And probably others.
 
Old 08-01-2017, 05:41 PM   #7
Boniato
LQ Newbie
 
Registered: Aug 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thank you all for your answers.

By unstable mostly I mean the fact that the operating system is installed in a SD card (although there are other alternatives). I think the raspberry pi is unstable but this setup is to build a server work as a part of a driving simulator and must be very realible.

I will analyze the options you have given me!
 
Old 08-01-2017, 08:35 PM   #8
coltree
Member
 
Registered: Nov 2003
Location: Jacobs Well, Queensland AU
Distribution: OpenBSD
Posts: 102
Blog Entries: 1

Rep: Reputation: 34
If you're doing D/A you probably want real time.
PCs are total crap at real time !
Are you using the raspberry pi for other functions, or just a single D/A ?
Do you need Linux ?
Can you run your main application on your Linux PC or raspberry Pi, USB to an Arduino, which can handle the D/A in real time ?
Having a little dedicated board for D/A might make timing easier.
All this stuff will also hook up to your Raspberry Pi by the I2C bus.

Here's a quick look at python on an Arduino
http://www.toptechboy.com/using-pyth...duino-lessons/

depending on D/A resolution
dirt cheap, simple pwm
https://provideyourown.com/2011/anal...wm-to-voltage/
8 bit via I2C bus
http://tronixstuff.com/2013/06/17/tu...91-adc-dac-ic/
12 bit via I2C bus
https://cdn-learn.adafruit.com/downl...c-tutorial.pdf
quad 16 bit via I2C bus
https://stackoverflow.com/questions/...ar-using-a-spi

github has a library for ArduinoISP and Analog Devices DACs
https://github.com/frejanordsiek/arduino_library_AD56X4

Analog Devices have historically made really good gear.

Last edited by coltree; 08-01-2017 at 08:46 PM.
 
1 members found this post helpful.
Old 08-02-2017, 06:37 AM   #9
Boniato
LQ Newbie
 
Registered: Aug 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hi Coltree. It has to run in real time.

But I have coded some python code that sorts that issue. It is simple as I don't need a very high time resolution (1/100 of a second is fine).

I have checked the national instruments I/O cards. I was thinking maybe this one could do the trick:

The problem may be how to control the output of this card from Python.
 
Old 08-02-2017, 07:29 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
A CompactRIO card requires a compatible controller/chassis which goes way beyond your needs. I was thinking more of a PCI I/O card. The controller does use a linux RTOS but not sure about Python.

As you posted 1/100 does not really need real time so near or low latency is probably good enough.

My Pi seem to be stable and I have not experienced any but SD corruption does seem to be a problem.

The ODROID is another popular SBC
http://www.hardkernel.com/main/main.php
 
Old 08-02-2017, 07:53 AM   #11
Boniato
LQ Newbie
 
Registered: Aug 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hi michaelbk.

Thanks. Probably a PCI is the way to go. But how does one communicate with such a card using python?
 
Old 08-02-2017, 08:34 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Never had the opportunity to see how well it works.

https://pypi.python.org/pypi/PyDAQmx
 
Old 08-02-2017, 09:43 AM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
As a general rule, when approaching industrial jobs, you're better using appropriate languages. There's a whole lot of industrial stuff out there, nearly blow up proof and cheap enough (e.g. plcs) which do your processing and i/o. If doing any amount of this, look into them. Industrial PC cards are messy to work with IME.
 
Old 08-02-2017, 07:51 PM   #14
coltree
Member
 
Registered: Nov 2003
Location: Jacobs Well, Queensland AU
Distribution: OpenBSD
Posts: 102
Blog Entries: 1

Rep: Reputation: 34
Quote:
Originally Posted by Boniato View Post
Hi Coltree. It has to run in real time.

But I have coded some python code that sorts that issue. It is simple as I don't need a very high time resolution (1/100 of a second is fine).

I have checked the national instruments I/O cards. I was thinking maybe this one could do the trick:

The problem may be how to control the output of this card from Python.

Do you realise that is a $700 industrial rack system A/D,D/A module ? then a controller $2300 -> $13k
You started by talking about python, raspberry pi, then USB, and an SBC, then PC with analogue card.

If I may be so bold as to suggest a raspberry pi for a quick, cheap start,
doing analogue through a pwm output just to try out your python code.
When you're happy you can fiddle the voltages to what you want, as viewed with a thoroughly cheap oscilloscope http://www.bitscope.com.au/product/BS05/
(which is another device which can do all you want and more)
then lash out on thousands of dollars worth of industrial grade kit (has C/C++ libraries).

My CRO works off a laptop and is the only way to run up all sorts of DIY stuff.
When it doesn't work as expected, you need eyes to see what is happening.
It's the easiest way to adjust your software for required output.

Last edited by coltree; 08-02-2017 at 08:00 PM.
 
Old 08-03-2017, 08:52 AM   #15
Boniato
LQ Newbie
 
Registered: Aug 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
All right!!!

Thank you all.
After reading all your suggestions I think it is best to consider sticking to the Raspberry Pi (and see if I can substitute the SD card by and SSD drive somehow) or to get one Odroid.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Jaguar Board is an x86 based Single Board Computer LXer Syndicated Linux News 0 01-24-2016 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration