Tim Wescott is the owner of Wescott Design Services. He specializes in pragmatic methods to apply control theory to embedded systems projects. Mr. Wescott teaches and consults in the area of control systems, with occasional digressions into communications systems. He is the author of Applied Control Theory for Embedded Systems, plus numerous magazine and on-line articles.
I've just spent over two weeks getting ready to do my next video. It was a combination of one of those vast underestimations one occasionally makes, combined with falling into a bit of an obsession.
I am, at this point, not only wondering if it was worth it, but questioning my sanity in carrying on even when the going went beyond tough to just plain crazy.
At any rate, a good video needs a visual aid, and I decided that my video needed to demonstrate stability with a pendulum....
There's a lot of information out there on what data types to use for digital signal processing, but there's also a lot of confusion, so the topic bears repeating.
I recently posted an entry on PID control. In that article I glossed over the data types used by showing "double" in all of my example code. Numerically, this should work for most control problems, but it can be an extravagant use of processor resources. There ought to be a better way to determine what precision you need...
I both consult and teach in the area of digital control. Through both of these efforts, I have found that while there certainly are control problems that require all the expertise I can bring to bear, there are a great number of control problems that can be solved with the most basic knowledge of simple controllers, without resort to any formal control theory at all.
This article will tell you how to implement a simple controller in software and how to tune it without getting into heavy...
Part 1 of this article was really more of an extended (and cynical) product review. In this part of the article, I actually take things apart (sometimes a bit more suddenly than I meant to) and show you some innards.First the globe. I knew there was a magnet in there someplace, because it's obviously plastic and it also attracts metal. I had intended to gently part the globe at the glue bond along the equator. I started by trying to gently flex the thing on my work...
I've been kicking some ideas around for a long time for a simple and inexpensive platform I could use for control systems experimentation for the beginner. I want something that can be controlled easily in a basic fashion, yet that provides some depth: I want to be able to present ever-more challenging goals to the student, that can be attained by fancier control algorithms all on the same device.
I'm currently looking at magnetic levitation. It's fun, it has the potential to be...
My first processor was an 1802, in a COSMAC ELF-II, obtained when I was in eighth grade. I come from a family that did not promote Christmas requests, and I basically...
I'm OK with squishy definitions.Mostly I'm interested in a definition that doesn't take processor capabilities into account, and that to some extent represents an...
So, if I'm working on some project that involves software that's running close to bare metal, with no UI beyond a button and a blinking light, and either a task...
You said the transformer was showing problems when "idle"? I took that to mean out of circuit -- is that not the case?That if it is the ECC82 the behavior shouldn't...
This is not at all a normal thing to be doing. What do you anticipate will be writing to the memory?Usually if you have peripherals that DMA to memory, there is...
If it's been said, forgive me.Don't think you need to get your arms wrapped around both "big iron" embedded Linux and embedded, no-RTOS work. They're highly overlapping,...
When to use a global or when to put something behind some sort of an information wall is a judgement call. In general, the shorter the program the more reasonable...
Heh. That reminds me. I used to work with a guy who hated breaking programs up into functions that would all fit in one page. He wanted to see everything laid...
Eh, so it is. It's been a bit since I've done this.His ADC sample time works out to about 0.5% of his total PWM cycle. Assuming that the current sawtooth is...
There's a good chance that your current is of fairly constant slope -- it depends on your motor inductance and resistance, but unless the motor is insanely small*...
Write your own startup code, and fill the heap and stack spaces with 0xdeadbeef. Or 0xF00D if it's a 16-bit processor. Or whatever.I'm looking at a newly-commissioned...
I'm going to define "bare metal" as a system with some sort of a non-preemptive task loop, whether it be an explicit superloop in 'main()', or some fancy C++ thing...
"Same as Avcc. I am using a development board, no pin available for Aref so cannot confirm the value, but i think it is connected to vcc."Double check that there's...
Either I'm really behind the times, or you're doing some weird combination of outsmarting yourself and underestimating the amount of work it's going to take to do...
If it's not the lack of decoupling caps, it's the 3.3V line into the circuit sagging when the motor turns on and screwing up program execution. The motor's going...
This here thread explains it:https://www.dsprelated.com/thread/1/welcome-to-the...The forum uses MathJax to embed LaTeX code.You can use the LaTeX construct \ (...
Just for sensibility:How long did you do the test for?What's the cost of a bit error?What recovery mechanism do you have for a bit error?What's the BER after someone...
I think that \(b = 1 - e^{\frac{\log(1-C)}{N}}\) is correct, but there's something wonky about the result you got when you plugged in numbers -- maybe you used \(\log_{10}\)...
My Google-fu has failed. I know a few ways to send an email from a remote device, but I'm looking for the best way to do it, that gives a good compromise between...
You've got "Don't use Linux", "Do use Linux", and "Use a mix" -- so, at this point, you can do what you want without fear.If I were going to build a system like...
Having worked in a number of different places over a number of decades -- it overlaps. And it changes. Walking into any new situation, you should always be sure...
Eclipse, Microsoft Code, and, of course, vim and Emacs.I prefer Eclipse, because it works for a lot of different languages and has good debugging support.
James Grenning is a conference acquaintance from when the Embedded Systems Conference was a worthwhile effort. He's got a programming challenge he's doing for...
With a voltmeter. Put the negative lead on the board's ground, and the positive lead on the pin in question. Unless you suspect that the board is faulty, you...
Definitely a problem with the input,then. I'd verify that the pin is actually getting pulled to the correct voltages. Then I'd double-check that I had all the...
Consider going back a pace and ripping out the sensor code and just trying to make the LED blink with a timing loop. I'd use something boneheaded like:while(1){ ...
Is the flash socketed, or is it soldered on?If it's socketed, can you find spare parts, and a flash programmer?We used the Borland compiler and Paradigm debugger,...
If you're asking if you can automatically talk to the memory via whatever is programmed into the microprocessor -- no, you can't, unless the program specifically...
Some additional points to ponder:In general, in a professional environment, it's typical that there's no one who can do both FPGA design work and software design...
I didn't know the answer to your question, but I got interested enough to search: http://xillybus.com/tutorials/pci-express-tlp-pcie.... Search within the page...
Since you mention const, allow me to point out thatconst volatile int foo;does not mean that foo is a volatile integer that never changes -- it means it's a volatile...
Additional thoughts, borne of much experience. This mostly applies to very small, deeply embedded processors:If you have a custom protocol (which you should think...
Yes, first time -- I logged on once with the wrong password, logged on again with the right one, the thing allowed me to open an edit window, then refused the edit...
This is trimmed down from a nice post that took me 1/2 an hour to write, because the system said that I was logged in, then lost my post at the end with a short...
"Heaters". All you need to make it happen is resistance wire and a voltage source. Because it's pretty easy, you're not going to find many pre-made ones: you'll...
The Art of Embedded Programming by Jack Gannsle.It sounds like you don't need a microprocessor book per se. There ARE books, and, in fact, entire college classes,...
I stopped counting how many times Intel has abandoned embedded processing the second time they did it, in the 1990's, because at that point I just decided "no more...
Ordinarily I'd suggest a link to the data sheet, but it looks like Microsemi wants a sign-in. I hate that. So I'm going to assume details, and it'll be up to...
Why do you want to use a processor that's been out of production for years on what appears to be a new project? There are so many superlative fast and modern processors...
Unless they've come out with newer versions, the AMD 188 has no internal memory -- you have to add everything externally. So you don't have to program the processor...
I've looked into IC's before, and unless you're building bazillions of units the cost to certify your board is going to eat you alive.I've used Laird and BlueRadio...
What board capabilities? What core? M-something, A-something, R-something?Processors with the Cortex-M or Cortex-R cores in that temperature range will be thick...
My raw is your cooked. Or visa-versa. As you go up the layers of control, one layer's "processed" will be some other layer's "raw". It's all about the angle...
Aaaand -- this is why I gave up on counting clock cycles a long long time ago. I benchmark code instead, and allow for a wide margin in timing in actual use. ...
If you have a good digital storage scope, look at the message sent by the second launchpad, then reconnect and look at the message sent by the bq76pl455A. Clearly...
Look to see if NXP or some other manufacturer has app notes showing the use of more than 4 backplanes.I haven't put together an LCD and a driver, but I kinda know...
To amplify: use someone else's protocol if it'll fit, because it'll be hugely less work. Only if you're doing something really specific, or if you're purposely...
Kind of specific to CAN, and probably assumes that you know some basics, but may be useful: "Controller Area Network: Basics, Protocols, Chips and Applications",...
This is not the sort of thing that is rich in example code on the Internet. You'll have to start from desired behavior and go from there.Most of the code will...
I just glanced at the "MSP430x2xx Family User’s Guide" from TI. It looks like this family of MSP430's, at least, supports both 9-bit data (they call it "Address...
I would recommend that you first try to understand the physics (possibly in the form of circuit theory) that underlies the problem. If you have a mathematical...
First, you can do whatever you want with the addressing scheme, as long as the hardware and software supports it.Second, if your hardware supports it, it's handy...
You didn't mention speeds, or what technology you're going to use (although I assume it's SPI). There needs to be some happy intersection of clock speeds and cable...
From the perspective of USB, you're describing a "Human Interface Device". Keyboards, mice, touchpads, etc., are HIDs.I would suggest that you find an evaluation...
Getting a serial link up and running is always a real pain in the behind. I've been in this embedded stuff for decades, and I still occasionally end up fumbling...
You're leaving lots of details out.I assume you mean two-wire RS-485, which means that communications are all half-duplex, and you have some protocol built on top...
Two solutions that I have used for this in the past (other than the one I mentioned):First, if the only thing that matters is the instantaneous value of the bit...
Thanks for replying, and being nice in the face of my strongly worded reaction to your suggestion.You remind me that I did not raise a concern with the OP: is he...
You should not be timing the controller in code with a bitfield -- you have an RTOS for that. Unless you're tightly resource constrained you should separate the...
Without knowing your code or your intent I can't be entirely sure what's going on.A suggestion -- which will probably take some work at this point -- is to hide...
I've worked on systems that built task loops inside of RTOS tasks. They were, uniformly, disasters. Why make a task loop if you've got a perfectly good RTOS?...
This is not a bad conversation to have after you get loop-back working. As long as the baud rate is not stupid-high or stupid-low it can be any old thing and...
I do not have an answer to your question.However, I've got a project on my bench, currently stalled, that uses FatFs. I also have a unit-test suite for FatFs that...
That's what I suspected. I was just too lazy to go RTFM (free advise, get what you pay for, etc.). I'm not sure that it would cause absolutely ALL the problems...
Given that it's all open source, there's a good chance that Tortise and SlikSvn are using the same underlying code with the same underlying bug. There seem to...
I can't help you. I use plain old svn in Linux, or if I'm forced to use a Windows machine I use plain old svn in Cygwin. I can't say that it's been trouble-free,...
Shouldn't you be updating from C:\Projects\my_workspace\my_working_copy ?Forgive me if you're ahead of me, but -- have you googled on the error messages? For most...
The fact that you're developing your own RTOS pretty much sweeps the "you should let the RTOS do this" comments off the table.Unfortunately, my experience with the...
> The total time is 9 clocks, or 75 nS, which should be short enough for almost any application.Short enough not to mess up other things, yes -- but if the Bad...
First, I echo everyone who's asking about an RTOS -- if you're using one, there's a mechanism for doing what you want through the RTOS.Second, I question whether...
I may be preaching to the choir here, but disable the interrupts for the least possible amount of time, and do it in a way that is interrupt safe (meaning, save...
That depends on the board. A well-designed automotive board should be able to survive glitches like that, but I couldn't tell you exactly what duration of glitch...
OK, I'm not a Beaglebone sort of guy (this question may be better asked on a Beaglebone forum, in fact).What I would do would be to get the relevant signal lines...
Not very informative. If it's not a license problem, the next suspect down on my list would be that for some reason the compiler doesn't have sufficient write...
So, if I have an interrupt that's attached to some piece of hardware that only matters to my most critical task, then the most dumb-ass task might service the interrupt?That...
Another thought:Anyone who wants to use this is going to be interested in safety. They may well want the software quality to be traceable back to some standard,...
Doesn't this demand a processor with an MMU, and either put restrictions on who gets to write ISRs, or put demands on the processor for letting ISRs be interruptable...
Having worked in industry designing software as well as doing systems architecture, I'm very cynical about anyone having an up-front commitment to software safety.Having...
One more wrinkle in an embedded system is that a variable "accessor" function may actually read a hardware value (such as an analog to digital converter).In that...
What is the cost of just calling this "low-level function" whenever you need the vehicle speed? It sounds like you've already got the function that shwami speaks...
If he's saying what I think he is, it's a variable that I'd call "of file extent", because "static" can be a confusing term. Because Brian Kernigan went and mixed...
Unless you've enabled long file names, you need to use "old DOS" names: meaning an 8.3 format where the characters used are limited to capital letters, numbers,...
The trend in modern microcontrollers is to have lots of interrupts. The S7G2 datasheet that I looked at lists 16 separate IRQ inputs that you can program. What's...
Unless I get about 1000 times more views, figure that it'll be one video toward the beginning of each month, and if I manage to get more out it's a bonus.
OK. You're the second person who's asked for a description of the trainer -- I think I'll have to make a video on it.I'm trying to keep the size of the videos...
If I was poking gingerly it was more because I didn't want to break the thing. The prop is small enough that it can hit a finger at full speed and not break the...
I'm just uploading a follow-on video about the making of the visual aid. It's over twice the length of the instructional video -- which makes sense, as the thing...
Stefan:You're welcome. A much less expensive, but less impressive, way to get a training mechanism is to buy a large, cheap, RC servo. Take it apart, throw away...
Hmm. That's a thought. It's a not-uncommon one:Linux on the PCarm-none-eabi cross-platform toolsEclipse editor (I like the GUI, particularly for debugging. Other...
Just got done posting this. As a video it's rough as a cob -- but then, I'm a beginner. I think the information content is right, and now that I've posted it...
You are leaving out quite a few languages, some of which are still in use -- COBOL, is, amazingly, still perking along in quite a few financial applications (to...
My one microcontroller? What alien concept is that? I'm a consultant -- I work on what my customer wants.Snarky evasions aside, when I can I use ARM Cortex parts,...
Use this form to contact Tim Wescott
Before you can contact a member of the *Related Sites: