I am working on embedded software for an industrial System. The system consists of several stepper-motors, sensors, cameras, etc. Currently, the mechanics as well as the electronics are not available - only specification.
I've implemented the simulation for some parts of mechanics/elektronics, but it takes a consiredable amount of efort. So my question:
Are there good portable (Win/Linux) Hardware simulation frameworks? Easy to install/use and affordable in prise?
My basic requirements are:
Send command to stepper -get interrupt from light-barrier
recognize object with camera ( not necessary)
mechanical parts should move according to steppers but stop
on obstacles.
objects should fall, if there is no ground underneath
fluids should increase/decrease volume in bassins according to
physical laws
My Application is in C++/Qt, so it would be the best, if such a framework had C/C++ bindings.
Thank you for any advice!
I face the same problem as I have to develop systems to interface with several types of automation devices (robots, firmware devices, etc). I still want to provide unit test for my code, but after writing 3 or 4 simulated devices, I thought it got to be a better way.
Fortunately in my case, my code was all in C# and the final solution was to use Moq to create simple mocks of those devices. I'm not familiar with mocking frameworks for C++/Qt, but a simple search rendered a couple of results, including one made by google (googlemock).
Related
I want to make a machine for coconut tree maintanence, comprising of
1. Hydraulic/knumatic lift
2. Electrical cutting machine
3. Small pressing pliers
4. Remote controlling system
Process:
Note: Consider all the above mentioned units are attached on top of the lift.
Lifting the lift and start cutting the coconut leafs
Applying pressure in some part of the tree's head
I plan to do these entire process through automation. I need some ideas about automation tools/products suit for this automation.
I am good in java and similar programming concepts. I have some knowledg on plc/aurdiono by browsing.
Thanks in advance.
You can use any PLC or PC based control. Since you have Java knowledge you can try "PLC Open" controllers with ST (Structured Text) programming language.
Beckhoff TwinCAT 3 has a good implementation for that matter. TwinCAT 3 is OOP language, but is more similar to C++ than to Java. It also connects to every EtherCAT enabled device. Keep in mind that it will probably be more expensive then cheap stand-alone PLC supporting only Ladder Diagram and own hardware.
EtherCAT (remote) I/O will operate same on top of lift as near the controller (PC).
To design the device you described you will need suitable hardware and
electrical components as I/O units, contactors, valves, sensors, etc...
Safety is very important when you have heavy moving parts and hydraulic pressure. Beckhoff TwinCAT 3 has safety module but it is only programmed as functional diagram. Per my experience safety should be the first thing in mind.
What is mean by embedded system?
If a system/machine or product which we are making is for multiple purposes, then can we consider it as an embedded system? Or is it that only a system dedicated for a particular task that is considered as an embedded system? Can a PC/mobile/laptop be considered as an embedded system or not?
Generally an embedded system is one placed into operation for a specific, narrow purpose, and lacking the kind of general purpose user interfaces you would find on an ordinary desktop/laptop.
That is not to say though that an embedded system cannot have these - I've seen test equipment such as network analyzers running desktop operating systems, with mouse/keyboard ports. One could probably hack one of those to use it for general purpose computing, but it would not be cost effective.
Going the other way, you can take a general purpose computer and shove it into an embedded application. However, systems optimized for embedded use may be more robust, support better real-world I/O (often retaining legacy ports), and use parts expected to be available over longer lifetimes than used in commodity PCs (if one fails, you want to be able to replace it with the exact same thing).
Often embedded systems are smaller - 8 bit processors (even 4-bit or serial-core historically) with limited memory; though 32 bit cores such as the arm family are now inexpensive and commonplace. Nor are tens to hundreds of megabytes of memory unknown.
Older cellphones would have a lot in common with embedded systems, but rather obviously contemporary smartphones are catching up in power and versatility, though still often constrained by user interface. Software wise some "think small" habits endure - for example, Android's compact bionic C library and toolbox shell have similar design goals to embedded C libraries and busybox. In other ways though, expansive resource-gobbling user experiences are now the norm on phones. Toss tablets based on the same processors and accessorized with keyboard into the mix, run a kernel designed originally for desktop computers on them, and the real difference is between UI software stacks designed to run segregated "apps" on a touch interface, vs one designed to run more traditional programs.
This is a question that even embedded systems experts often ask and discuss. There is as with many things a spectrum, and simple definitions are difficult.
My preferred definition is: a system containing one or more computing or processing element that is not a general purpose computer.
Some systems are inarguably embedded within that definition, and include such things as washing machine controllers, telephone switches, satellite navigation equipment, marine chart-plotters, automotive ECUs, laser printers etc.
Some are less easily categorised. A first generation digital mobile phone, is probably certainly an embedded system while more modern feature and smart phones however are somehow different. They can run apps chosen and installed by end-users allowing them to perform tasks not determined by the manufacturer. With increasing capabilities they are essentially hand-held computers and the range of apps sufficient to be able to regard them as "general purpose".
With these more ambiguous systems, it is useful to ask perhaps not what is an embedded system, but rather what is embedded systems development? For example, the manufacturer of your smart-phone deployed on it an operating system, the signal processing and communications stack required for it to operate as a telephone, all the device drivers and stacks for WiFi, USB, data storage etc., and this is certainly embedded systems development. However the guys writing apps for PlayStore or AppStore etc. are writing to a defined common platform abstracted by all that embedded code - that is not embedded systems development by any definition that I would accept, unless perhaps the application were for some bespoke vertical market application - like the delivery signature apps UPS drivers have on PDAs for example - in that environment the "general-purpose" device has been re-purposed as a "special-purpose" device.
With respect to a PC; a PC can be the embedded computing element in a system that is not a general purpose computer. Industrial PCs are commonly found embedded in manufacturing and packaging machinery, CNC machine tools, medical equipment etc. Although they share hardware architecture with desktop PCs they do not necessarily look like desktop PCs and come in many different form factors of both boards, and enclosures. Even within a desktop PC however, there are many examples of embedded computing elements, and embedded software such as the BIOS responsible for bootstrapping the system, the keyboard controller and disc drive controllers for example.
An embedded system is any electronic system that uses a CPU chip, but that is not a general-purpose workstation, desktop or laptop computer.
An embedded system is a special-purpose computer system designed to perform a dedicated function. Unlike a general-purpose computer, such as a personal computer, an embedded system performs one or a few pre-defined tasks, usually with very specific requirements, and often includes task-specific hardware and mechanical parts not usually found in a general-purpose computer.
Read more: http://romux-loc.com/tutorials/embedded-system#ixzz3113gchPt
Embedded system are devices that do some specific job not like our laptops which can play music, click pictures and format documents. They are devices like water filter , washing machines, vending machine etc.
They are programmed for some specific work and they do that work in a super loop depending on the user input.Like the vending machine always perform same thing when you opt for coffee in it with the help of button provided in it.
So in that way mobile phone is not an embedded system because it has no super loop and it can do various general purpose things just like a computer.
An embedded system has memory constrain, timing constrain and they do things in limited space.
Embedded system is any device that includes a programmable computer put it is not itself a general-purpose computer, so the mobile is not an embedded system because it has no super loop and it can do various general purpose things just like a computer, and an embedded system has memory constrain timing, constrain and they do things in limit space.
The embedded system is a microprocessed system in which a computer is attached to the system it controls. An embedded system can perform a set of tasks that have been predefined. The system is used for specific tasks, and thus, through engineering it is possible to optimize a given product and decrease the size, as well as the computational resources and its final value.
Embedded systems are all around us, and for that reason, we are not aware of their computational capacity, since we are so involved with such mechanisms. Embedded systems operate on machines that can work for several years without stopping, and which still, in some cases, have the ability to self-correct.
An excellent example of items that use embedded systems are the famous smartphones, which perform specific functions, and which have more limited mechanisms than computers.
Check below a list with some examples that receive the application of embedded systems:
Electronic ballot box
Video games
Calculators
Printers
Hospital equipment
In vehicles
Some home appliances
Cellular apparatus
Routers
A definition that may help to get the difference.
An embedded system can be considered as a system with which another embedded system cannot be developed. So presently, using a mobile phone, one cannot develop an 'embedded system'. If it is possible by the mobile device, then it should be considered as a general purpose system.
An example of an "embedded system" is a chip that is inserted underneath a dog's skin for identification purposes. Words like "embedded system" have specific meanings that only specialists understand. Such ambiguities make understanding technical language difficult for ordinary people.
embedded (ɪmˈbɛdɪd)
adj
fixed firmly and deeply in a surrounding solid mass
constituting a permanent and noticeable feature of something
(Journalism & Publishing) journalism assigned to accompany an active military unit
(Grammar) grammar inserted into a sentence
(Computer Science) computing (of a piece of software) made an integral part of other software
I'd like to start messing around programming and building something with an Arduino board, but I can't think of any great ideas on what to build. Do you have any suggestions?
I show kids, who have never programmed, or done any electronics before, to make a simple 'Phototrope', a light sensitive robot, in about a day. It costs under £30 (GBP) including Arduino, electronics and off-the-shelf mechanics. If folks really get into mobile robots, the initial project can grow and grow (which I feel is part of the fun).
There are international robot competitions which require relatively simple mechanics to get started, e.g. in the UK http://www.tic.ac.uk/micromouse/toh.asp
Ultimate performance require specially built machines (for lightness) , but folks would get creditable results with an Arduino Nano, the right electronics, and a couple of good motors.
A line following robot is the classic mobile robot project. The track can be as simple as electrical tape. Pololu have some fun videos about their near-Arduino 3PI robot. The sensors are about £1, and there are a bunch of simple motor+gearbox kits from lots of places for under £10. Add a few £ for motor control, and you have autonomous robot mechanics, in need of programming! Add an Infrared Remote receiver (about £1), and you can drive it around using your TV remote. Add a small solar cell, use an Arduino analogue input to measure voltage, and it can find the sun. With a bit more electronics, it can 'feed' itself. And so it gets more sophisticated. Each step might be no more than a few hours to a few days effort, and you'll find new problems to solve and learn from.
IMHO, the most interesting (low-cost) competitions are maze solving robots. The international competition rule require the robot to explore a walled maze, usually using Infrared sensors, and calculate their optimal route. The challenges include keeping track of current position to near-millimeter accuracy, dealing with real world's unpredictably noisy environment and optimising straight-line speed with shortest distance cornering.
All that in 16K of program, and 1K RAM, with real-time interrupt handling (as much as 100K interrupts/second for some motor systems), sensor sampling, motor speed control, and maze solving is an interesting programming challenge. (You might make it 'easy' with 32K of program, and 2K RAM :-)
I'm working on a 'constrained' robot challenge (based on Arduino) so that robot performance is mainly about programming rather than having a big budget.
Start small and build up to something more complex. Control servos. Blink LEDs. Debounce inputs. Read analog sensors. Display text on an LCD. Then put it together.
Despite the name, I like the "Evil Genius" book for PIC microcontrollers because of the small, easily digestible projects that tend to build on one another. It is, of course, aimed at PIC programmers rather than the Arduino, but the material covered will be useful no matter what you're developing on.
I know Arduino is trendy right now, but I also like the Teensy++ development board because of its low price-point ($24), breadboard-compatible PCB, relatively high pin count, Linux development environment, USB connectivity, and not needing a programmer. Worth considering for smaller projects.
If you come up with something cool, let me know. I need an excuse to do something fun :)
Bicycle-related ideas:
theft alarm (perhaps with radio link to a base station which is connected to a PC by Ethernet)
fancy trip computer (with reed switch or opto sensor on wheel)
integrate with a GPS telematics unit (trip logging) with Ethernet/USB download of logged data to PC. Also has an interesting PC programming component--integrate with Google Maps.
Other ideas:
Clock with automatic time sync from:
GPS receiver
FM radio signal with embedded RDS data with CT code
Digital radio (DAB+)
Mobile phone tower (would it require a subscription and SIM card for this receive-only operation?)
NTP server via:
Ethernet
WiFi
ZigBee (with a ZigBee coordinator that gets its time from e.g. Ethernet or GPS)
Mains electricity smart meter via ZigBee (I'm interested now that smart meters are being introduced in Victoria, Australia; not sure if the smart meters broadcast the time info though, and whether it requires authentication)
Metronome
Instrument tuner
This reverse-geocache puzzle box was an awesome Arduino project. You could take this to the next step, e.g. have a reverse-geocache box that gives out a clue only at a specific location, and then using physical clues found at that location coupled with the next clue from the box, determine where to go for the next step.
You could do one of the firefighting robot competitions. We built a robot in university for my bachelor's final project, but didn't have time to enter the competition. Plus the robot needed some polish anyway... :)
Video here.
Mind you, this was done with a Motorola HC12 and a C compiler, and most components outside the microcontroller board were made from scratch, so it took longer than it should. Should be much easier with prefab components.
Path finding/obstacle navigation is typically a good project to start with. If you want something practical, take a look at how iRobot vacuums the floor and come up with a better scheme.
Depends on your background and if you want practical or cool. On the practical side, a remote control could be a simple starting point. It's got buttons and lights but isn't too demanding.
For a cool project maybe a Simon-style memory game or anything with lights & noises (thinking theremin-style).
I don't have suggestions or perhaps something like a line follower robot. I could help you with some links for inspiration
Arduino tutorials
Top 40 Arduino Projects of the Web
20 Unbelievable Arduino Projects
I'm currently developing plans to automate my 30 year old model train layout.
A POV device could be fun to build (just google for POV Arduino). POV means persistence of vision.
As a hobbyist that works on embedded systems/robotics. What would you like to see as hardware features of a Micro Framework development kit? I have seen plenty of questions about what is available, and nothing really about what is missing. I also find most existing kits to be aimed more at product development than the hobbyist.
Are modular designs using IDC/jumper blocks better or do you prefer built in components? How many GPIO pins? Would some form of memory mapped devices be useful? Would you see a use to more than one SPI bus? What wireless/serial protocols would you like to see?
Are you talking about things like the FEZ boards or Netduino?
I think they've done some insanely great work.
For robotics I would like the development board to have a built in H-bridge (for motor control), I2C, SPI, serial, small LCD (for menus, etc.), ZigBee and/or Bluetooth.
I've always loved my Parallax Development board. I couldn't find the exact one i bought a few years ago... but this is close.
http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/123/Default.aspx?txtSearch=Prototype+board
To improve upon it, it'd be nice if it had a some more opamps. I like how you have all the peripherals around the outside that you can quickly wireup to the breadboard.
What do most cellphones use to run the hardware? C?
I'm just talking about the "common cellphone", not smart phone/android stuff.
I work for wireless semiconductor chip provider, and we work on variety of phone platforms from ULC (ultra low cost ) segments to Smart phones.
In our Reference phone design, the entire code (including Protocol stack, Kernel, Middleware, Application and MMI) is written purely in C. AFAIK even first tier customers use C language for their framework, atleast for ULC and Mid category phones, as the memory size tends to be a big requirement.
Phones running a variety of the Symbian OS will very likely have all core OS functionality written in C++, as that is the "native" language of Symbian.
When talking about cellphones, there are usually two processor components in it.
The "main" processor that covers the user interface.
The "baseband" processor that powers the cellular modem. It handles the low-level radio interface, switching towers, etc.
The code for #1 tends to be higher-level (C, C++, Java, etc). The language used really depends on the OS that it is running (Windows Mobile, Symbian, Linux, something home-grown, etc). Of course, there is almost always SOME low-level assembly for the boot loader.
The code for #2 is pretty low-level. Baseband Processors tend to be little more than microcontrollers. Mostly assembly language and C. Very unlikely to find anything higher level here. (Although I have seen a few cell modems with a Python interpreter built-in.)
Usually the Baseband Processor is running some kind of minimal RTOS, or in some cases OS-less. They are very often running an RTOS called Nucleus from Mentor Graphics.
On some low-cost cell phones, #1 and #2 are joined together to cut costs (only one processor & OS in the system).
Hardware things, like setting registers and handling interrupts to run the radio, are all done in C.
Two problems with C++ are, in my opinion, that
It is harder to design efficient programs in it. The CPU may only be a few hundred MHz.
The compilers for more exotic CPUs barely work in C, so running them in C++ would be a miracle.
Phones running Android will use mostly C under the java machine, and the Java in the top layers.
But if you look on most phones they are just like the rest of the embedded market,
it is a lot of c and in some project some c++.
And the smaller they are, the more c you will find.
/Johan
Most Cellphones have different layers of Software, Largely we can divide this into three parts.
1.Application Layer : anything like BREW,C++ or Android
2.Middle-layer : Consists of real time OS code : C code[mostly as I have seen]
3.Lower-Layer : Device Drivers : Written in C.
please note :Most Common Cellphones are likely to use C++ as an application layer ,Brew is largely used by CDMA phones for application layer
Nokia bought Trolltech, the makers of Qt - a cross-platform application and UI framework for desktop and mobile applications. Presumably this includes cell phones. Qt is written in C++. http://www.qtsoftware.com/developer/getting-started