# Tag Info

9

The first thing to realise is that this is not a control problem, this is a planning problem. If you conflate the two, you are making life much more complex than it needs to be. Solution - Motion planning The traditional way to achieve what you want is to have two loops. The outer planning/supervisory loop generates way-points for specific points in time, ...

8

The processor has to execute something. You will always have an "endless" loop even if you're doing some work in an interrupt handler. The best solution depends on exactly what you're trying to do. The main advantage of using interrupts is they allow you to service events in real-time while your main program is doing something else. Timer interrupts ...

7

Yes this is entirely possible, and as FuaZe said, it's called a bootloader. You essentially have two programs on your chip, each with their own memory area; the bootloader and the application. Preferably, the bootloader area is write-protected to make sure you don't accidentally destroy it. With the bootloader, you can use any algorithm you want. If you ...

6

In general you don't need to learn assembly to be able to program a microcontroller. As long as you know C, it's enough for you. Knowledge of assembly of course would help. Specifically, it would help in writing optimized code (or rather, not writing stupid code) as well as having a good estimate of how fast or slow a piece of code could be. Sometimes in ...

5

This is one of those "open-ended" questions that the moderator doesn't like. So I'm going to leave you with some short, general answers. These are based on over 20 years in industry designing various bits of hardware and software for embedded systems: Learning enough about microprocessors so that assembly language programming comes naturally will be a big ...

5

The signals to the ESC's using PWM should be sent after the PID algo is done processing the errors. The output calculated from the PID is the PWM value to be sent to the ESC's to actuate the motors in such a way that they move to reduce the error thus obtaining the desired orientation So the right order is: Read RX signal Calculate desired pitch, roll, ...

5

There are 2 main reasons why the MER is still operating long after it's 90 Sol planned lifetime. The first is political, strategic, and can be summarized as 'Under promise, over deliver'. When a PI (principal investigator) proposes a high-risk scientific mission like this, they always frame the goals of the project such that their project is viewed ...

4

I would just like to add few points to other posts. My personal opinion is that endless while loop has no sense in systems which read from snsors or write to actuators as both has some physical constrains, eg. There is no point in reading from sensors at 1Mhz if the sensor has stability cycle before meassurent is accurate at 100Hz. Same goes to motor drivers....

4

Further to Guy's answer, using a timer interrupt to generate accurate intervals adds determinacy. For example, at any given time, you know exactly what the processor is doing, and all activities are performed at specified rates. You also should schedule at determined rates as otherwise you have no basis for time constants and such like, which will be ...

4

The simplest sensor you can build is a weight on a string. Lower it down until the tension of the string is reduced. I assume you want sonar. So just go buy one they are dead easy to interface to. You can buy these at marine hardware stores. They are not cheap. Look for a depth finder that has "NMEA" output. You may have heard of NMEA as the data format ...

4

Controlling a flying robot (or anything else) is a very complex subject (well, people are doing PhD on it..). I can recommend this free online course on the subject (I have taken it myself). It will give you a little taste of what it is.

4

As a professional robotics engineer (with an Electrical and Computer Eng bachelors, although I focused more on the CE side), this depends entirely on what aspect of a robotic system you'd like to work on. Robots are interdisciplinary systems by definition, and you will always need a team with a broad skill-set to build one. That being said, there are places ...

4

The first thing is to make sure that the cameras will get the coordinates of the object at the same time (I don't know if Pixy has a FREX or STROBE signal for synchronization), or that the object is not moving. Then, have a look at OpenCV, it has a section on 3D calibration and reconstruction (i.e. find the depth of an object based on the coordinates of two ...

4

As extension to this answer, I'd like to share with the community a Simulink model implementing the system described above. It does not represent a solution for the code reported by CroCo but it may give a better insight and, as such, it might be helpful. The system is depicted below: In red we have the blocks running at $1\,\text{KHz}$, which deal with ...

4

Not all fixed wing aircraft are inherently instable. That feature greatly depends on the center pressure and gravity center designed position. Passenger aircrafts are quite stable, and fight planes are just the opposite in order to achieve fast maneouvres, among other reasons. Read this aviation thread where this question was replied.

4

One of the most common controllers is a computed-torque controller, also known as the inverse dynamics. The preceding controller is based on the feedback linearization principle which is an approach that maps a nonlinear model into a linear one and treats it as such as we will show momentarily. Consequently, one can utilize linear controllers such as PD and ...

3

The major disadvantage of assembly language is that it is different for each processor that you use. Therefore there is a big learning curve whenever you change processor. Clearly, if you only ever plan on using a single processor (or family of processors) then this is less of an issue; however, life is rarely that simple. Equally, assembler allows you to ...

3

Complex systems of differential equations governing a physical phenomenon under study are solved by means of a computer always in a discrete way, meaning that the differential equations are integrated step-wise with the integration steps decided according to some smart set of rules. This does happen therefore also within Simulink and even when you select ...

3

"All I need to do".... Famous last words. This is a very complicated project to attempt for multiple reasons. I'll try to break down these challenges. For documentation, the datasheet has all the information that you need, but there is probably not any code available that is ready to use. Sparkfun has recently introduced a 'degree of difficulty' rating for ...

3

It certainly sounds like the joystick is broken, but in Robotics, nothing is certain. Some things to try: Swap over the X and Y wires going to the Arduino. Which axis exhibits the problem now? Disconnect the joystick from the Arduino, and power it up on its own. Using a multimeter, measure the voltage on the X axis wire as you move the joystick. Does this ...

3

You can control brushless motors 2 ways control with a hall effect sensor http://scholar.lib.vt.edu/theses/available/etd-09152003-171904/unrestricted/T.pdf sensorless(back emf) control http://www.pmdcorp.com/downloads/app_notes/BrushlessSensorConfig.pdf or you can buy an esc (elcetronic speed control) My advice If you are not knowledgeable about electronic ...

3

I'd also like to stress that the comparison between polling (i.e. checking if a interrupt flag has been set) and interrupt vectors (i.e. an ISR, or function that's loaded when a interrupt has occurred) should be more than just evaluating the efficiency/simplicity of executing a block of reactionary code. The interrupt controllers of most modern micros are ...

3

I would create a small sketch that allows you to communicate over serial port that will let you create a GUID on the desktop computer and write it to the EEPROM of your uno to a known location. Then later on in your networked arduino code you can use that saved value. I've done this before and it's pretty simple to implement. You can even copy / paste ...

3

The answer to this question depends entirely on the type of connection you are using to build your network. Assuming that when you say you have arduinos "on a network" you are using ethernet shields or similar to put them on an ethernet network, one way to accomplish your goal would be to take advantage of the MAC address on the ethernet shield as this is a ...

3

You've asked more than one question, so I'll try to answer them in order. The Robotics community has not yet hit the limits of current hardware, so very little work is being done on the exotic cutting edge like neuromorphic hardware. The exception to this is software neural nets, which have come in and out of fashion for decades, and the Nv artificial ...

3

I have done this myself, controlling the exact position of a brushless DC motor as its velocity ramps up and down. And I did it using a position controller only. Sounds obvious, but it worked extremely well. The integral term of the controller is key to this. Since you want the position error to be as close to zero as possible the whole time, but you need a ...

3

Ideally, when you raise the collective all the way up, all the ESCs put out their max power and the quadcopter goes straight up. Different ESCs will end up producing different maximum thrusts; and also will ramp up (and down) differently with sudden changes in control signal. As you probably already know, if one rotor of a multirotor vehicle has more (or ...

3

ROS is good for when you start writing code to run on a PC. It lets you write independent modules that interface through standard messages and service calls. Furthermore, it has a large user base with lots of off-the-shelf tools, drivers, and higher-level behaviors. What ROS is not good for is inter-microcontroller communication. (ROS's communication is ...

3

The course suggested by @Eugene Sh is a good one to understand in depth the relevant details. If you have general idea about how an aircraft (fixed wing) operates it will be actually helpful to you. Refer Small Unmanned Aircraft:Theory and Practice by Randal Beard, one of the pioneers in aerial vehicle research and T.Mclain. This is about fixed wing aircraft,...

3

Yes, as this motor is rated for 100amps stall at 12V you should probably be using a motor controller capable of supplying that amount of current. Regarding how to drive the motor, the following may be of use: A voltage regulator cannot be used to drive a motor. What it does is convert a certain voltage to another voltage, for example 5v to 12v. It does ...

Only top voted, non community-wiki answers of a minimum length are eligible