Is Linux useful for an Electrical Engineer? - Page 1
Forum section: electronics / general

author: massprog
author_rank: Newbie
timestamp: December 10, 2016, 03:37:31 pm
content: I'm undergraduate student of EE(control)I still haven't study control courseand I love programming and computerswhat is it's applications and where can I use of linux EE and particular in control?I'm be appreciate for your answers

author: Artlav
author_rank: Frequent Contributor
timestamp: December 10, 2016, 03:49:09 pm
content: Linux is an OS - a set of software that takes care of peripherals, filesystems, processes, memory and so on. It can work on rather small devices - down to 4Mb of RAM or so. Usually it is used where you need to have more complex processing than just a regulator or two.I.e. a quadrocopter would be immediately controlled by a microcontroller that reads the sensors, computes DCT or something and gives commands to the motors. A real-time control system. But above that uC you can put an ARM CPU with Linux on it, that would read data from cameras, and give the uC commands on the level of "go left 3 meters", rather than talk to motors directly, and report something over WiFi to the internet.Linux takes care of USB, WIFI, TCP/IP, files and so on, leaving you free to code just the control program working on the level of "give me image from camera 1" and "send xyz tohttp://192.168.8.54:455", instead of having to implemet each protocol and interface yourself.Something like that. Sorry if it was too detailed.

author: rsjsouza
author_rank: Super Contributor
timestamp: December 10, 2016, 04:22:22 pm
content: For a system that requires tight control such as used for motors and other actuators, in general microcontrollers or discrete circuits are closer to them while Linux plays the role of the "manager" of the entire system. One of the reasons is that Linux was originally designed to execute many processes without support to be ruled by strict real-time constraints. That changes a bit with RT Linux, which has better support for this.All in all, Linux is very useful in embedded computing and electronics.

author: Luminax
author_rank: Regular Contributor
timestamp: December 10, 2016, 04:25:48 pm
content: The beauty is of course, unlike some propietary OS, you have full control over what you want to use and what you don't.The super steep learning curve is a huge setback for some people (me included) but once you get used to it you'd be amazed at what can be accomplished with just the basic tiny kernel and some basic toolchain installed.

author: massprog
author_rank: Newbie
timestamp: December 10, 2016, 08:08:59 pm
content: thank you for your good answersAs I said I love programmingand I know itis It useful to develop my programming skills?and what language is necessary for me?thank you dears

author: tszaboo
author_rank: Super Contributor
timestamp: December 10, 2016, 08:39:46 pm
content: Yes. Not for desktop, but for embedded.

author: trophosphere
author_rank: Frequent Contributor
timestamp: December 10, 2016, 09:05:03 pm
content: The only time when I had to use Linux was during my time at a university for a VLSI design class. I was using Cadence Virtuso to build a custom 8-bit micro-controller. I think we bothered the graduate student more on how to do something specific in Linux than about the project itself though designing the PLL was a bit of a challenge. Since then, I never had to use Linux.

author: daybyter
author_rank: Frequent Contributor
timestamp: December 10, 2016, 09:35:39 pm
content: Hmmmh...there are some chances, that you still use Linux...In your phone, your satellite receiver, your dvd player, your car etc etc

author: donmr
author_rank: Regular Contributor
timestamp: December 11, 2016, 12:57:11 am
content: Quote from: blueskull on December 10, 2016, 08:13:02 pmThat depends on what EDA software you are talking about. I've done IC design for 40 years and rarely used Windows EDA tools. It has been Unix/Linux since they became widely available over 20 years ago.Whether its simulating logic, creating test data, or producing documentation and reports, I use Linux every day. (I do use MS-Windows for email because the IT drones at work think IMAP will "break the network".)

author: ebclr
author_rank: Super Contributor
timestamp: December 11, 2016, 10:40:56 am
content: Linux is mandatory, not only usefulA lot of devices, uses linux inside, scopes, spectrum analyzer, base stations, military, if you don't know Linux you are not a electrical engenieer

author: Karel
author_rank: Super Contributor
timestamp: December 11, 2016, 11:01:29 am
content: Programming is much easier than with windows, including GUI things.In our company, all development and design is done on Linux systems. Occasionally, very occasionally, we use windows 7 in Virtualbox.Professional EDA like Zuken, Eagle and Cadence run natively on Linux.

author: ebclr
author_rank: Super Contributor
timestamp: December 11, 2016, 11:34:03 am
content: The power of Linux isn't on the desktop, is on the embedded and server applications, for desktop windows still the king

author: Karel
author_rank: Super Contributor
timestamp: December 11, 2016, 11:35:37 am
content: During my career I have been using different platforms and different EDA.I can tell you this, Eagle is definitely not a hobbyist tool. At least in our company, it let us do things more quickly and with lesserrors than, for example, that bloated, buggy and overpriced altium designer...It's true that Eagle lacks some features. That's why it's cheaper and more affordable.Doesn't mean it's less professional. People who think that Eagle isn't a professionaltool, haven't been used it long enough or haven't learned the tool properly.And yes, we do design professional multilayer boards with highspeed USB/ethernet/LVDS/etc.I'm not going to tell you why we moved away from windows. Use Google and you'll find lots of reasons not to use windows...

author: ebclr
author_rank: Super Contributor
timestamp: December 11, 2016, 12:08:34 pm
content: Have you used Altium for doing some projects from beginning to end, if you did you will never come back to eagleEagle it's not on same level it's useful but it's a toy a little better than Proteus that is even easier to work than eagle but still a toyKicad is a better option than eagle that is also expensive

author: george graves
author_rank: Super Contributor
timestamp: December 11, 2016, 12:19:24 pm
content: Quote from: massprog on December 10, 2016, 03:37:31 pmQuote from: ebclr on December 11, 2016, 11:34:03 amIn other words....you have a dozen stepping stones between you an a *unix level OS that is needed.As a student, you have enough issues to deal with then trying to run Linux even as an OS. Too fussy IMHO. Just get a Thinkpad or Mac book and call it a day

author: dr.diesel
author_rank: Super Contributor
timestamp: December 11, 2016, 12:38:09 pm
content: The OP doesn't exactly specify, but mentions control? That is kinda vague, like programming PLCs or other industrial equipment as an end user, or actual programming of the underlying OS the PLC runs on?

author: Kalvin
author_rank: Super Contributor
timestamp: December 11, 2016, 12:49:07 pm
content: For the automated measurement and control stuff Linux is a quite useful environment as a large number of different software packages and programming languages are available for Linux. Some people may also appreciate the fact that Linux is available from the smallest gadgets to largest computer systems, so learning Linux will not be wasted time and effort, even if you decided to stay in the dark side looking at the world through opaque Windows.

author: Kalvin
author_rank: Super Contributor
timestamp: December 11, 2016, 01:17:08 pm
content: If you ever need a simple gadgets performing automated test and measurement with logging and/or connectivity, Linux is the way to go. You can buy a device running Linux for less than $10. Add some ADC, DAC, GPIO, SD-card for the OS, and you are good to go. Want a Wifi connection or Ethernet? Yes, very easy. Want to access and/or debug the devices remotely around the world? Almost trivial. Needs to run on a battery? Just hook a USB power bank or similar. Want a responsive system? Linux is the way as you can remove everything which is not necessary, you are the boss. Need to tweak a driver or need a new driver altogether? Try to do that in Windows. Need tens of devices but the license payments will kill the idea? Choose Linux.In addition to Linux, there are other Unix variants, like BSD which may be suitable in some situations.Although Linux has many good qualities, it may not be the ultimate solution. Unfortunately some tools require Windows environment, but fortunately a Virtualbox or VMWare are quite useful.I would recommend testing different Linux distros using Virtualbox or VMWare, so you can choose your favourite. Running the distro inside a virtual machine is very flexible as you can have even multiple Linux distros running at the same time, but your main operating system will not be affected in any way.

author: Kalvin
author_rank: Super Contributor
timestamp: December 11, 2016, 01:41:50 pm
content: Quote from: blueskull on December 11, 2016, 01:31:06 pmHopefully you are not suggesting that Windows would be the right tool for the job either.Anyway, controlling a motor in real-time needs a dedicated processor for that task, and the host-computer - whether Windows or Linux - will communicate the processor over some communication bus or media.

author: John Coloccia
author_rank: Super Contributor
timestamp: December 11, 2016, 02:55:44 pm
content: Quote from: massprog on December 10, 2016, 03:37:31 pmYour question is a little bit vague. If I just go from the title, Linux is useful just like anything else is useful. If it's selected for the right application, then it's useful. If it's a bad fit, then it's not useful.It wouldn't be a bad idea to be familiar with Linux, just as you should be familiar with Windows, and it's also not a bad idea to be familiar with basic windows/linux programming, but most EEs aren't going to be writing this kind of software anymore than most software engineers would be designing boards. There are always exceptions but they're just that...exceptions.

author: Karel
author_rank: Super Contributor
timestamp: December 11, 2016, 03:47:06 pm
content: Quote from: ebclr on December 11, 2016, 12:08:34 pmIn the past I have used Multisim and Ultiboard for a couple of years. It was terrible. I don't know if it has improved in the mean time.I have used altium designer for exactly a year. I have done several projects with it. One of my (ex) colleagues was very proficient with it.Although it wasn't too bad, we experienced several issues with it. It was slow, in case of internet connection faillure, we gotannoying popup messages about the license. Sometimes we couldn't use it because it thought we had too many seats in use.Many times we had to call support. At least ones a day I had to restart because of instabilities. Probably because altium is stillstuck in the 90's using an antique language & compiler. It forces you to use windows. Difficult to use git, "git diff" is useless. Etc, etc.Then I started to use Zukens' Cadstar. I didn't like it either. No real integration between schematic capture and board layout.No realtime forward backward annotation. Insufficient documentation, no forum or cummunity.Then I started to use Eagle. It's not perfect either but after a learning curve, I was able to do the job faster and more efficient.It doesn't use the stupid "select an object, then select a tool" method. Eagle uses the much more efficient approach of"select a tool, then select an object" method. Eagle saves the data in an open, human readible format that works nicely with git.And it doesn't force you to use windows. Startup time of Eagle and memory usage is superior.Eagle can work nicely together with other software or, if you wish, you can write your own extensions and customize it.

author: Karel
author_rank: Super Contributor
timestamp: December 11, 2016, 04:11:58 pm
content: Quote from: blueskull on December 11, 2016, 03:59:33 pmI have seen engineers strugling with altium exactly because of this. Results were layouts that weren't updated after the schematicswere modified or missing connections to groundplanes, etc.At first it looks like altium is "userfriendly". Then you discover that your prototype isn't working as expected...Oh, did I mention that stupid "compile" button?

author: Kalvin
author_rank: Super Contributor
timestamp: December 11, 2016, 04:45:41 pm
content: Quote from: blueskull on December 11, 2016, 03:59:33 pmThis is equivalent to rock-climbing with the safety gear but not using it because you want to climb faster. Some people might call this just plain stupid thing to do**Good engineering and rock-climbing require discipline.** Done that (ignoring the ERC rules), too.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 11, 2016, 05:08:18 pm
content: Quote from: Karel on December 11, 2016, 11:35:37 amHm, how would you go about breaking out a 484 ball BGA on a 6 layer board with Eagle, without hours of drudgery?I found scripts online, but none of them do much of use.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 11, 2016, 05:10:55 pm
content: Quote from: Karel on December 11, 2016, 03:47:06 pmOh, and how usable is Git there?Can you view the diff graphically somehow, or is it only for rollbacks?

author: Karel
author_rank: Super Contributor
timestamp: December 11, 2016, 05:38:49 pm
content: Quote from: Artlav on December 11, 2016, 05:10:55 pmGit is very usable with Eagle, as Git & whatever software development. Not just for rollbacks.If you prefer a graphical view, use gitk.Attached a screenshot of an example where a transistor has been substituted.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 11, 2016, 06:05:16 pm
content: Quote from: Karel on December 11, 2016, 05:38:49 pmNo, i meant a graphical view as in a highlighted diff of what changed in the schematic or layout, not graphical view of GIT itself.I've been trying to use GIT with Eagle a while ago, but all i see in diffs is usually a mess of mostly meaningless tags and numbers.

author: Karel
author_rank: Super Contributor
timestamp: December 11, 2016, 06:13:27 pm
content: Quote from: Artlav on December 11, 2016, 06:05:16 pmWell, in your case it's probably better if you use something different...And you have been hacking the universe since 2008, really?

author: nctnico
author_rank: Super Contributor
timestamp: December 11, 2016, 06:47:09 pm
content: Quote from: blueskull on December 11, 2016, 01:31:06 pmThat depends entirely on how you setup the interrupt priorities. I don't see why it can't work with some clever hacks if the CPU has support for high priority interrupts. Then again on a SoC interrupt handling may not be deterministic at the nanosecond level due to cache flushes/fills and DDR memory access but any OS will face those problems.

author: John Coloccia
author_rank: Super Contributor
timestamp: December 11, 2016, 08:31:08 pm
content: It usually makes more sense to stick real time stuff on a separate processor, or maybe even something like a Mircroblaze, and run it with no OS, or at least some sort of real rtos if you absolutely need an OS for some reason. Save Windows/Linux for systems programming if possible.I don't think I've ever done a real-time system with Linux or Windows. I've done embedded systems with both and more, but not real-time. I think the only real-time systems I've ever worked that had operating systems were either using VXWorks, pSOS or SuperTask! (no one probably remembers the last two), and that was really just because we wanted one processor to do everything, including provide things like disk access, terminals and things like that.

author: nctnico
author_rank: Super Contributor
timestamp: December 12, 2016, 12:56:40 am
content: When it comes to PCB design some like to have strict rules in place and others want a PCB layout program to be like MS Paint. However with more people and/or a bigger volume of designs having the logistics (parts database), good rules about clearances and a well made library in place helps a lot to prevent mistakes.

author: KE5FX
author_rank: Super Contributor
timestamp: December 12, 2016, 01:41:05 am
content: Quote from: blueskull on December 11, 2016, 01:31:06 pmAnd I'm supposed to ship this to customers?That is going to be an awkward page to write in the manual.

author: LokiChaos
author_rank: Contributor
timestamp: December 12, 2016, 03:26:36 am
content: Either prospect is rather troubling, overall "mandatory updates" strikes me a draconian, even on a desktop. For all the of the good reasons users should get updates, it doesn't justify denying the user control over their systems. MS seems to continually make me even happier I ditched them years ago.Linux is certainly worth familiarizing yourself with, both to use within devices and as the most pleasant dev environment imaginable.

author: edy
author_rank: Super Contributor
timestamp: December 12, 2016, 03:49:07 am
content: The original question "Is Linux useful for an Electrical Engineer" is really difficult to answer without knowing the specifics of what you are trying to achieve. For example, are you asking is it useful as far as running PCB-design software, or programming chips, etc... Well the best OS to use will depend on what software you want to use for the design. If there are only Windows versions available, then Linux won't be useful to you. On the other hand, are you looking to use Linux in an IoT or some embedded device, perhaps as part of the control of an appliance or other system? Then of course Linux will be useful to learn, and you will want to build your skills using a Linux OS, perhaps even with a desktop environment, to then practice the necessary coding and understand the parts of the system better as you set up the code in your embedded system.Also, if it is important to you to have a more open system where you can see the source code and compile the kernel and basically have much more control and access to the entire way everything runs, you are not going to get much better than Linux unless you build an entire OS from scratch on your own. All the others are closed to various degrees and that may be good enough for your application if you find it easier to use, or you find the tools on them more robust. However, I have found Linux systems can be configured to be very lean and fast and less likely to have problems, and run on a huge variety of hardware.If you are an Electrical Engineer, it is probably a good idea to explore Linux and know it as well. I can't imagine it being a bad idea to know more about it and see if it offers solutions to particular engineering problems you will be encountering down the road.