|
Thanks for the comments, Mike. The choice isn't mine, but a client wants some technical software written that will likely run on the microcontroller. I'm thinking that may be a major hurdle. We're talking about finite difference solutions to the non-linear wave equation using data from the ADC's as input, so the computations aren't trivial. I currently am using C# to do the calcs and it works fine. I can translate it to C, but my concern is whether it can be ported to a uCPU.
This application would take about 10 position and load readings per second, differentiate the position to get velocity, then use the velocity and load as boundary conditions. I need to store enough cycles of data (5 to 10 cycles per minute) to spot changes and estimate the nonlinear parameters. If the parameters are estimated correctly, then the calculated cycles should repeat. All in real-time. On a PC this would be a piece of cake, but on a uCPU with limited memory, I'm not sure.
I think it's likely beyond what the Raspberry Pi could handle, but maybe not. I'm not familiar with the other uCPU's - I generally haven't done much of that other than play with some of the Microchip PIC chips - that was a lot of fun, but nothing sophisticated.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Walt Fair, Jr. wrote: I generally haven't done much of that other than play with some of the Microchip PIC chips - that was a lot of fun, but nothing sophisticated.
I haven't done any real intensive or critical real time collection on a uController yet and have only worked with the 8-bit Atmel chips so I can't comment on much else.
Good luck!
|
|
|
|
|
Never used such microcontrollers, sorry. Memory size doesn't look that bad, however it strongly depends on your needs.
Veni, vidi, vici.
|
|
|
|
|
Thanks for the comment. Yes, I think there may be memory limit problems, or maybe I'd have to go back to the olden days of counting bits and bytes and using trickery to squeeze data in limited systems.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Walt Fair, Jr. wrote: I'd have to go back to the olden days of counting bits and bytes and using trickery to squeeze data in limited systems.
It is a microcontroller, isn't it?
Veni, vidi, vici.
|
|
|
|
|
It sounds like 1mb or 256kb of storage isn't much, but that is a LOT of code. I would be very surprised if you had so much code you couldn't fit it in there. I've designed some very complex systems that took less than 128kb of storage on the chip, including TCP/IP stack, CAN, etc.
Really if you are butting up against the 1mb barrier, you are better off using a chip that doesn't have onboard storage (or a few KB for startup), then connect up a NAND device and run off of that. Usually when you get to that point you are looking at POP or BGA chips and have people to help work that out...
|
|
|
|
|
Thanks for the comment, Ron. I'm not overly worried about the program code memory, although that might be a consideration in the end. It's the data memory for lots of floating point arrays that has me (perhaps needlessly) concerned. I'm guessing I need about 10,000 FP numbers in a rotating buffer to fully describe the system and I need at least 3 or 4 additional arrays for comparisons. It sounds like I'm creeping up on around 250 KB just for data storage, not to mention program code and other odds and ends.
I also need to find out how the FP arithmetic will be handled to see if that presents a precision problem or not.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
10,000 FP values, considering single precision FP, takes up about 40kb of memory (4 * 10000 / 1024, so 39.06kb).
The biggest issue I would see you having may not be RAM, since you can easily get external memory and use that, but MCU's aren't known for speed in floating point operations, mostly because they don't usually have floating point coprocessors (FPU's), so they have to do the operations in integer registers.
The FP arithmetic is typically as accurate as the data type is, so I wouldn't worry too much about that. If you are using an analog input to read the data they publish how many bits they are and how many bits are usually "jitter" or accuracy bits (typically 2 or 3).
|
|
|
|
|
I think we're pretty much thinking the same, Ron. I estimated about 40k per array and about 5 arrays to do the calcs and comparisons. That would use about 200k right there in single precision. My C# code needs double precision, but that may mainly be due to my laziness. I may need to dust off some scaling methods, etc. to make things work in single precision. If not, then array memory will be proportionally larger.
Right now I have no idea what FP library they'll be using, but most of them slow things down, so that is also a concern ofr real-time coding. Fortunately I've done more time critical things in the past, but it's been a long time, so I'll likely have to relearn a few things.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
"It is as devoid of thermal excitation as the dextro mammary of a female necromancer"
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
It's unseasonably warm here - but that won't last: we will probably be frozen solid (or at least unable to move except on foot due to 1 inch of snow) by next week.
Stay in, stay warm, cuddle your SO. Wait for cold to pass!
Never underestimate the power of stupid things in large numbers
--- Serious Sam
|
|
|
|
|
Colder than a witch's teat, eh?
Marc
|
|
|
|
|
This morning the wife wakes me up (she leaves for work very early)...
"There is frost on the inside wall"
In my groggy state I said OK and proceeded back to sleep.
Well when I finally got around to it, I went into our master bathroom and indeed there was a large amount of frost[^] around my tub surround and trim.
So, apparently it got windy enough to find some kind of hole in my house wrap, near where the services enter our house, blow cold air in and somehow moisture, and freeze over that area.
So I get to have a contractor come in tomorrow and see what kind of fortune this will cost me 
|
|
|
|
|
I had a similar issue in my present house with a frigid inside wall (actually several of them). I finally discovered the issue was that the wiring was pulled down from the attic and that they did not seal around wires with expanding foam like they are supposed to. Sealing the wires properly, while a miserable experience of trying to trace wires under 18 inched of blown fiberglass, cut the heating bill by 10 percent.
|
|
|
|
|
I sealed my wires through that wall in the floor joist a couple weekends ago since there was a breeze in the sill box under the floor. I will have to check to see if the wires go up through the attic there, I hope not. Its all blown insulation and very difficult to get to.
|
|
|
|
|
Good luck - the last time I saw that, we ended up with mold in the wall. Hopefully you can get it dried out fairly fast.
--------------
TTFN - Kent
|
|
|
|
|
TnTinMn wrote: cut the heating bill by 10 percent Wow, that is quite something.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
It lends credence to the claims that drafty windows and doors can waste about 20% of heating/cooling efforts. I got about another 5% savings by pulling all the window and door trim off and properly insulating/sealing them in. The worst was the entry door to my walkout basement. They did not appear to make any attempt at insulating that; there was essentially a 3/4" wide gap that was covered on the outside by the siding and on the inside by the trim.
|
|
|
|
|
Last night I threw a load of wash into the dryer and I forgot to turn it on. Imagine my surprise when I went to grab a shirt this morning and found a frozen pile of clothes. On the bright side, it has warmed up to 4°F.
|
|
|
|
|
Wow. It looks like I wasn't the only one to find such a surprise this morning. Outside temp was -10F(-23C) with wind chills down to -35F(-37C).
On the bright side, I did get to wear jeans to work because of it!
|
|
|
|
|
"In an undergarment made of a metal alloy"
Steve Wellens
|
|
|
|
|
It gone from minus double digits to minus quad letters her in Toronto.
|
|
|
|
|
Not to sound mean, but I lived for four or five years in Chicago. We could always look to International Falls, Michigan, to fell better about our insanely cold temperatures.
We then quite rightly realized that Canada lies North of International Falls.
So, don't take this the wrong way, but you guys are quite nuts.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
International Falls is about 5 degrees North of Toronto. Chicago and Toronto are within 1 degree or so or each other.
|
|
|
|
|
Stupid doctors! Herself has arthritis in her hip, and has been on Buprenorphine patches for a few years - they slow release a tiny amount of morphine (20ug/hr, or 0.48mg/day) from a patch that lasts a week. But...in the interests of cost saving the local doctors practice is moving everyone away from the patch (which works) and onto sustained release morphine capsules - 60mg/day (which don't work as well at all and does rather attract the attention of drugs dogs).
So, it's time to organise her repeat prescription on the medical computer system - which works, much better than the paper system was - and...no patches, no capsules, just the other bits and bobs she takes on a regular basis...
So now I have to go down there and ask for seriously controlled drugs tomorrow because the stupid doctor hasn't updated her end of the system! Grrrrr....
Never underestimate the power of stupid things in large numbers
--- Serious Sam
|
|
|
|