Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
What can an Arduino do that a Raspberry Pi can't?
Arduino is a microprocessor, not a computer. It means that Arduino has inputs and outputs that you can connect to different electronic components such as motors, lights, sensors, etc.
Those inputs and outputs are only pins that you can send or receive a certain amount current.
Arduino has a pretty limited memory so you can only store a simple program on it, not a OS. It is mostly used in automation. For example you want to automate a garden so you have sensors to detect the amount of water in the ground and then use this information to enable a motor that will turn the water on. There is a complete API to simplify the coding between the programmer and the device.
For example, you have a function that will control the speed of the motor in rpm so you only have to give the speed as a parameter of that function.
Raspberry pi is a complete computer, so you can plug a screen, mouse, keyboard to it. There is some OS available for it. It is not just only pins as inputs or outputs, but HDMI input or usb port.
So Raspberry pi and Arduino are completely different and have both a different field of interest.
You will not order a Raspberry Pi to automate the temperature of your coffee as you will not use a Arduino to make a OS.
I hope this will help making the difference between the two.
Good luck!
I would say that the functions and capabilities of the Pi Zero and the Arduino boards have started to overlap, as have the prices (although where I live the Pi Zeros are still somewhat more expensive that Arduinos). Perhaps we will see the applications start to overlap, too.
Conventionally, the Pi has been used in situations that demanded, or at least benefited from, running a full operating system, while the Arduino was more for running a single, custom program. I don't think there's been much interest in running code on a Pi that does not run under an OS, but it seems to be possible, up to a point. I'm not whether all the hardware is accessible this way, because some of it requires proprietary drivers, IIRC.
Because the Pi conventionally runs a full Linux kernel and utilities, it's been slower to start up in embedded applications, whereas the Arduinos essentially boot right into application code. The Pis have slightly greater power consumption (quite a bit greater, with the full-size models), and are a bit larger.
I suspect that, if you were planning commercial production, basing something around Arduino-type hardware is more likely to be productive that using a Pi. I have come across Pis being used for commercial products, but not (I think) for mass-market applications. The hardware and programming style of an Arduino is much closer to the kind of thing that you can miniaturize into a consumer product, even though the Arduino itself may be comparatively expensive.
In short, I would expect that for casual, home, and research use, it's increasingly easy to justify using a Pi Zero over any kind of microcontroller; but if I had to prototype a mass-market item, Arduino would still be closer to the final hardware spec.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
This will probably go -4 in seconds, but I'm genuinely curious and googling hasn't resolved anything.
My potential project:
Power on a device from my smartphone.
I know raspberry pi can do this, but as I was reading through Arduino docs it sounds like if you need a very basic command to fire/read then Arduino is your way to go. At this point is there any advantage in choosing an Arduino over a Pi3?
I know I'm ignorant, but I can't figure out why I would choose Arduino ever again.
Price: The cheapest Raspberry Pi is $5 USD but unless you happen to live somewhere that you can pick one up in person you're going to be paying at least that much again for shipping. Add another $1 for an SD card and say $2 extra for a power supply good enough to make it run reliably. You can buy an Arduino Pro Mini clone for about $1.57 with free shipping or a Nano clone for < $3 with free shipping, any power supply will work, no SD card needed. So you're saving at least $10 on each device you make. If you're already familiar with Raspberry Pi the extra expense may be worth it for the time you will save not needing to learn to use the Arduino.
Bare metal programming: There is no operating system to deal with on an Arduino. This simplifies things greatly and improves reliability. The lack of an operating system on the Arduino means you can easily get very precise timing when that is important, though likely this is not relevant to your current project.
Power consumption: It's possible to run at extremely low power consumption with an Arduino, especially if you make a few easy modifications to the circuit board (removing the power LED and voltage regulator). It is possible to reduce the power consumption of Raspberry Pi but I don't think you will ever get close to what you can do on an Arduino. This will be more of a concern for a battery powered application.
Size: This could depend on which accessories you need to attach to either board but lets consider the likely choice of WiFi as your method of communication between your phone and device. In the Arduino world the cheapest and easiest way to accomplish this would be to use a WeMos D1 Mini, which is less than half the size of the Raspberry Pi Zero.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
I wonder if is possible to adapt a low speed fault tolerant CAN network (100kbps) to a high speed CAN network. I need this to connect a newer infotainment board (CIC) to my K-CAN inside my BMW e60 car. I already managed to wake up and control (on a workbench) the CIC via Arduino and MCP2515 shield.
Do you have any idea if is possible ?
Thanks!
The easiest thing to do is probably to simply replace the CAN transceiver IC on the infotainment board you're putting into the car, to one that matches the bus type you already have in the car. The different transceiver ICs are usually drop-in replaceable, so no problem with that.
However, even with a matching transceiver, the data bit rate needs to match as well, so you need to determine the bit rate used by the board and the one used by the vehicle's bus.
If the bit rates don't match, there's no point in replacing the transceiver IC - in this case the only solution is probably to create a bidirectional store-and-forward adapter/gateway.
One may construct such a gateway using an Arduino, but it'd have to have two CAN bus "shield" daughter boards - one for each bus, where each daughter board carries a CAN transceiver appropriate for the bus it'd connect to, and its CAN controller configured to the appropriate bit rate.
Each of the CAN controllers connects to the Arduino via SPI. It is very much possible for multiple slave devices to share a single SPI bus, with the master device (e.g., the Arduino microcontroller) selecting the device it wishes to communicate with using the chip/slave select (CS/SS) lines. For more information about SPI communication, including multi-slave, see here and here.
For off-the-shelf Arduino "shields" relying on SPI, additional shields (beyond the first) might requires physical rerouting of their CS/SS line to a different control line coming from the Arduino microcontroller, to allow slave selection. Consult the boards' pinouts and/or schematics to determine which modifications are required. Specifically, if using seeed's CAN bus circuit, check the "CS pin" section of its Wiki.
In terms of software, the gateway would basically need to constantly copy messages received in one bus to the other, with a small FIFO buffer to keep a few messages in case the target bus is busy.
Some modifications to the CAN bus library's source code might be required, to support multiple CAN controllers and switching between them using the CS/SS lines.
BTW, Stack Overflow is probably the wrong place for this question, as it's not really a programming question.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying to determine whether IBeacon technology would be useful in tracking equipment in an office building.
Everything I've read required a beacon, a smart phone (i phone, i pad, etc), and the app that is running. If I understand correctly, a person would walk around with a smart phone "searching" for beacon signal. When in range of a signal, it would then register on the phone. This involves walking around and searching for the signal.
What I am wanting to do is have stationary receivers located around the building. Each receiver would a specific ID number. A beacon would attached to the piece of equipment. As the equipment moves around, it's signal would be picked up by the individual receivers. The equipment's location could then tied to a specific receiver.
Some of the problems would be:
1) I would like to use bluetooth technology so that I do not have to be tied into an existing wireless network. This eliminates network and configuration problems.
2) When a signal is identified by a receiver it needs to be "relayed" between multiple receivers until the data is received by the computer that runs the tracking database software. The original beacon ID and location needs to be transmitted.
3) The receivers/transmitter signals must go through floors and walls.
4) All this needs to be done a a relatively low cost per beacon and per receiver.
I think that this can be done with I Beacon technology,it's just finding the right setup.
Any thoughts would be extremely help.
You can do this with iBeacon technology (I have built similar systems) but there are some difficulties:
The stationary receivers must be constantly powered, so they must be near outlets. If sonebody unplugs them (think the cleaning crew to use a vacuum) they go offline until you detect the system isn't functioning and plug them back in. You need tools to monitor this.
The stationary receivers won't be super cheap. You can make them out of a raspberry pi and a bluetooth dongle (~$40 including power supply) an Android mini computer (similar cost) or an iPod touch ($200). Whatever your choice, it is a fair amount of software to write. These detectors need monitoring software to make sure they stay up 24-7.
The Bluetooth info relay to the database adds the biggest level of complexity. You are building your own mesh network, which is possible, but nontrivial. Using WiFi to a web service would be much easier.
This is all possible, but it is a big job. Don't underestimate it.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
One difference is microcontrollers are usually designed to perform a small set of specific functions whereas microprocessors are for huge, general functions.
Anything else??
A microcontroller is a microprocessor (a.k.a. CPU core or cores) with additional peripherals on-chip. The terms come from the 1970s, where a microprocessor (e.g. Motorola 6800 or Intel 8086) would have an address bus, a data bus, and control lines, and a microcontroller (e.g. Motorola 6801 or Intel 8051) would have peripheral I/O pins (serial ports, parallel I/O, timer I/O, etc.) but no external memory bus (you were stuck with what was on the chip).
Additionally, microprocessors executed their programs from external ROM and microcontrollers would use internal masked (as in "programmed at the factory by changing the IC photo mask") ROM. The only practical erasable ROMs were UV-erased EPROMS, electrically erasable PROMS (EEPROMS) were expensive, slow, and not very dense, and "flash" meant the bits of plastic sticking out of the mold seam lines on the chip.
Honestly, the line between them is fading away. Modern microcontrollers such as the Motorola 6812 series have an external memory bus and peripheral I/O pins at the same time, and can be used as either a microprocessor or microcontroller.
From
http://wiki.answers.com/Q/What_is_the_difference_between_a_microprocessor_and_a_microcontroller
A microcontroller is a specialized form of microprocessor that is designed to be self-sufficient and cost-effective, where a microprocessor is typically designed to be general purpose (the kind used in a PC). Microcontrollers are frequently found in automobiles, office machines, toys, and appliances.
The microcontroller is the integration of a number of useful functions into a single IC package. These functions are:
The ability to execute a stored set of instructions to carry out user defined tasks.
The ability to be able to access external memory chips to both read and write data from and to the memory.
Basically, a microcontroller is a device which integrates a number of the components of a microprocessor system onto a single microchip.
So a microcontroller combines onto the same microchip :
The CPU core (microprocessor)
Memory (both ROM and RAM)
Some parallel digital I/O
Also, a microcontroller is part of an embedded system, which is essentially the whole circuit board. Look up "embedded system" on Wikipedia.
The difference is that microcontroller incorporates features of microprocessor(CPU,ALU,Registers)along with the presence of added features like presence of RAM,ROM,I\O ports,counter etc.Here microcontroller control the operation of machine using fixed programme stored in Rom that doesn't change with lifetime.
The other difference is that the micro controllers usually has to handle real time tasks while on the contrary the microprocessors in a computer system may not handle a real time task at all times.
A microcontroller is much more of a complete computer system. A microprocessor is just that -- a processor. A microcontroller will normally include memory (often both RAM and some sort of ROM) as well as peripherals such as serial ports and timers, and (in some case) more specialized hardware. For example, a microcontroller intended for motor control will typically include some PWM ports, while one intended for communication use might include encryption hardware.
In short:
Microprocessor= CPU
Microcontroller= CPU+ peripherals+ memory
This link was useful too.
Micro-controller is a general purpose processor having 40pins. It is used as CPU in computer. It uses memory devices like RAM or ROM externally.
Micro-controller is also a processor designed with memory internally. It may be a computer.
General use
Microprocessor - generally use in computers as a general purpose programmable device.
microcontroller- generally use in Robotic system or a Traffic signal control system.
Ref -Difference between Microprocessor and Microcontroller
In the short word, microprocessor is the one part of microcontroller.
What is the difference between a Relay Controller and a Microcontroller?
I'm looking into Arduino boards and am just getting into electronics, so I wanted to know the difference.
I know this is not a programming question, but I am developing in PHP and would like to know what the difference is before I start to code to make sure I'm going down the right path.
Those two devices are very different. Depending on exactly what you're trying to do, you may be able to use either, however. You'll have to tell more about your goal.
If you're switching high-current or high-voltage loads on and off, you'll need some sort of relay (or perhaps a large FET). If your current and voltage requirements are sufficiently low (5V, 40ma), you may be able to drive your load directly with the Arduino's output pins.
The Arduino is a microcontroller. That means it's an entire computer, just simplified. It has RAM, registers, an ALU, etc. Microcontrollers are generally specialized such that instead of interfacing to peripherals using some kind of bus like in a desktop computer processor, they have I/O capabilities built in, often simply in the form of outputs that can be set high (the input voltage, usually 5V) or low (0V) programmatically. The Arduino probably uses its own programming langauge, although there may be more than one language available for it (I've never used one). I doubt PHP is one of those langauges.
The relay controller is exactly what the name implies -- a simple circuit that controls some relays. Relays are electrically actuated switches. There's no intelligence in the relay controller. It can't be programmed; it must be controlled externally via USB. If you're attempting to interface with it from PHP on a desktop/server computer, this is probably your best choice. You're right that it's expensive. You could probably build your own for a fraction of the cost, especially if you're willing to use the parallel port on your computer (googling for how should give simple instructions). It's worth noting that that relay controller, and presumably most others, likely contain some kind of microcontroller with the I/O pins connected to circuitry that increases the current and/or voltage to the point where it can drive the relay, which in turn switches the load.
Hmm... only very vaguely programming related :) I think we may need another StackOverflow for electronics. Maybe SparkOverflow?