Designing without Firmware, please fact check me

Discussion in 'General Electronics Chat' started by HalfMadDad, Jul 7, 2016.

  1. HalfMadDad

    Thread Starter New Member

    Jun 10, 2016
    Hi Everyone

    Could I ask you to check my line of reasoning? I am trying to get a project off the ground.

    I have been servicing scientific instruments for about 18 years but I have never designed one. I am tinkering with the idea of doing this.

    All instruments I work on are bench top and not particularly cost sensitive. If something costs $300 instead of $100 but it saves a lot of design time, that's fine.

    Production runs would be very short, well under a 1000 and probably under 100.

    This is such a wonderful time to be involved with electronics. If you want to torture yourself slowly with Assembly language and nand gates you can, you can use a full blown OS like Linux and large integrated circuits/SBCs and there are all sorts of options between these extremes.

    Since portability and cost are not the main issues for me, I am thinking about other options beside working with embedded computers.

    Does this line of reasoning seem right, could you fact check me? :

    1)ISA cards were often passive in the old days, they often had no CPUs of their own

    2)When old computers controlled passive boards, they slowed down due to the added overhead.

    3)Later model ISA cards and PCI cards often had their own CPUs and could do far more while taxing the main CPU less

    4)Multicore CPUs and modern computers have immense computational power and would not necessarily struggle to control a passive board, assuming the passive circuit was not overly complex(highly arbitrary, I will explain more soon)

    I have been thinking about creating a PCIe card that would have a PCIe to local bridge chip. I was thinking that it would just have a ribbon socket and that I would then take a ribbon cable to a larger circuit board that would have the circuitry that needs controlling.

    Now I am wondering about a simpler solution, a PCIe or PCI GPIO card.

    So I was saying the a complex circuit is "highly arbitrary", let me explain why I think I am not in this category:

    The requirements for this instrument would be something along the line of:

    1)I need to control 4 stepper motors
    2)I need to be able to control 2 solenoids
    3)I need to process data from 2 photodiodes
    4)I need to process data from 1 photomultiplier tube

    and that's about it, most of the complexity is in the optics not electronics

    Are the statements I have listed so far accurate?

    Does it sound reasonable to control a circuit of this nature using SPI driven across a GPIO card on a modern computer?

    Does this sound possible to do with no firmware programming at all?

    Thanks in advance for any feedback you can provide
  2. JohnInTX


    Jun 26, 2012
    I think the main problem with the raw IO on a PC approach isn't the speed of the processor its the multiple layers of the OS. A PC based OS these days isn't very time-determinant i.e. when it should be sending the next step to the motor, it's busy updating something. Back when you could plug and ISA card into a PC running MS-DOS it wasn't much more than an embedded system and you had access to real-time interrupt control (mostly). Those days are gone. Its not just Windows, Linux didn't have a pre-emptive kernel way back when.@joeyd999 knows Linux and could weigh in about that.. EDIT H/T to joey.

    That's why the stuff I know (and do) might use a PC for the heavy-lifting then just send commands to the various intelligent uC based peripherals. Various outfits do business in this area, National Instruments for example. Outfits like Sealevel Systems still make various IO cards for roll your own but I'd be surprised if they were fast enough to run a stepper motor.

    Most of the stuff I know uses PC enabled (USB, Ethernet interfaces) smart modules to drive steppers. These are little computers themselves that take relatively simple commands from the PC host and do the real-time stuff e.g. 'Drive CCW at 500 steps/sec for 1000 steps'.

    While it may seem tempting to plug in an IO port to that i7 flamethrower, the PC is really designed to run high level software and operating systems. Down in the dirt where I and others live, its still embedded smart-points talking to the 'spiff and glitz' PC through some interface - USB, Ethernet, ProfiBus, HTML-5 layers etc. etc.

    A caveat when using desktop Windows - it goes away leaving you with no compatible platform to run. I have a client that developed the core of a killer industrial system on WinXP. My job was to make all of those real-time smart points to control the process. When uSoft went to Vista, it had lots of additional isolation from the hardware - so much so that none of the plug-in card vendors (RS-485 transceiver and DAQ) supported the new OS - and said that they didn't have any plans to do so. They were forced to buy a lifetime supply of cards and XP licenses to survive. I also have based stuff on COTS stuff only to have it fall out of favor and become useless (anyone want a Psion OPL kit?).

    I look forward to reading what others have to say. It's been awhile since I did a PC hosted thing. For prototyping, you might find everything you need from NI. Get it working to firm up your specs then see how you could roll the functionality onto some uC platform.

    Good luck.
    Last edited: Jul 7, 2016
    atferrari, absf and HalfMadDad like this.
  3. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    Yes it does. Since 2.6 -- like 100 years ago.
    HalfMadDad and JohnInTX like this.
  4. JohnInTX


    Jun 26, 2012
    .. and that's why I tagged you, bud. Original post edited.
    Last edited: Jul 7, 2016
    HalfMadDad likes this.
  5. HalfMadDad

    Thread Starter New Member

    Jun 10, 2016
    Thanks Joey

    and thanks very John. I hadn't really given the detereministic topic enough thought. I wonder if this could be circumvented on a multicore system by placing the controlling program in a high priority process so that the CPUs won't screw off in the middle of data acquisition to check for emails and such. I see lots of PC based control stuff that controls relays and such, maybe your point is why most PC based control boards are limited to slow speed, not-even-close-to-realtime sort of tasks.
  6. Roderick Young


    Feb 22, 2015
    The kind of task you describe might be better addressed with a Raspberry Pi or Arduino. There's already plenty of simple I/O for driving motors and such. I understand that your product is not cost-sensitive, but just the same, those solutions are very inexpensive, and since they are ubiquitous, you can generally just google for answers, as someone in the world probably already figured out what you want to know.
  7. Sensacell


    Jun 19, 2012
    If its not cost sensitive- pay somebody to design a micro-controller based I/O engine that does the low level timing sensitive stuff.
    Interface to a PC over USB and do the high level user interface stuff there.

    That's how most people do it.
  8. MaxHeadRoom


    Jul 18, 2013
    Mach 3 use the printer port and does all the trajectory calculation and output the stepper/servo control as well as performing the HMI.
    It does not close the PID loop however, this is done by the external motor drive itself.
    There is also Kflop which uses the P.C. as just the HMI and outputs to an external control via USB port.
    There are a few other systems that use the USB port to output to external controller cards.
    Another modern method for modular control is to use a multi-drop system using Modbus.