Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharing Memory Between Processors? 2

Status
Not open for further replies.

eromlignod

Mechanical
Jul 28, 2006
402
Hi guys:

I'm an ME and I have an application where I'd like to use two Basic Stamp microcontrollers working together. One is the main processor that runs the show and does calculations; the other is a dedicated slave that constantly distributes a series of 16-bit numbers to
various devices in a continuous, timed loop. The first processor calculates what these numbers are based on feedback sources.

The reason I use a dedicated second processor is that its stream of numbers can't be interrupted...it has to provide a continuous series of values on a clock. The problem is that I can't even interrupt it long enough to pass numbers to it from the other processor without messing up the sequence.

What I'd like to try (if possible) is to share the same memory between the two MCU's. So the first Basic Stamp is calculating values and storing them to memory and the second Basic Stamp is using them as if they were in its own memory bank simply by referring to a value by variable name (or address??...I don't know).

Is this possible and, if so, what would be a good way of going about it? I'm also open to alternate suggestions to solve the problem including using a different processor (I would like to avoid investing in another development kit or chip burner if possible though).

Thanks for any help you can provide.

Don
 
Replies continue below

Recommended for you

The Propeller looks interesting, but I guess I still don't understand how I can get 88 inputs and 256 outputs connected to it.

Don
Kansas City
 
A lot easier than to a Basic Stamp. That's for sure.

I did not say that you can use it standalone. I am just pointing to a new device that has very few limitations and that answers your question about shared memory in a very powerful way.

There are many standard ways of expanding ports. A decoder and a handful of 8 bit latches, a shift register, specialized devices like the NS LED driver mentioned in an earlier post, multiplexers - just about any method you find suitable, economical or fun.

But do not get stuck with a terribly slow and primitive device like the Basic Stamp. No memory in the world, shared or not, will make that elephant fly.

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
Wow. I just had a thought experiment about what this piano might sound like as it "tunes up"... could you adjust the volume of the excitation, so that it starts soft then increases in volume, with all 88 keys going from out-of-tune to progressively in-tune...kinda like that Dolby sound that plays at the start of some movies...add some LED's that slowly increase in brightness...way cool.

Okay, back to engineering now.
 
To tune you have to measure the frequency: until you hit a
key, you have no way to know it.

If one music piece doesn't use one particular key
it is not updated.

You would need a permanent memory ( e.g. flash) so the
tuning data is not lost on power-down. Ofg course, if the
temperature of the room changes, all bets are off.

I don't believe it is practical, economical, etc.
It certainly won't competye with the electronic piano.





----------------------------
Please read FAQ240-1032
My WEB: <
 
nbucska,

If you read his patent, he is electronically exciting the strings prior to the piano being played. Assuming the environment (temperature, RH, radiant sources (stage lights)) changes slowly enough, the piano will stay in tune throughout a performance, and can be re-tuned very quickly prior to the next day's concert.
 
Hi eromlignod;

Since you seem hell bent on not distributing your solution and you understand FPGAs, and have the tools to develop one, why are you not tailoring one to provide your output, obscene serial shifting and all?? You can even get all 256 outputs out of one part!
2qu5d3o.gif


You really need to dump that stamp, and in my humble opinion, do this professionally or not at all. Don't good pianos cost $30K? I think you may risk your entire effort by fielding a flaky jury rigged solution if you're basing this whole thing on essentially a learning toy. Do you realize there will be a lot of people watching this? A truck load of them hate it. They want it to fail. They will take any failure - especially - the roll out system and run with it! They will damage your business permanently if they can. Going out 1/2 cocked will hurt you badly.
Just an observation based on a long history, respectfully.

What voltage are you planing to run your heaters with?

Keith Cress
Flamin Systems, Inc.-
 
BT:
I have the feeling, you would need to add temperature
sensors, too.

Off course you have to tune it ine string at a time
to avoid coupling.

Well, it may be possible. Practical, competitive,
marketable ? I don't believe ...


----------------------------
Please read FAQ240-1032
My WEB: <
 
Wealthy music lovers here in SoFla who like to leave the windows open, or entertain outdoors, or live on a yacht, would love it.

At any price, so long as it works.

Get it right, Don.



Mike Halloran
Pembroke Pines, FL, USA
 
I get this all the time: people telling me how impossible it is when it's already a working device (and has been for several years).

All the strings sustain as if a violin bow is being drawn across them. I do this magnetically and tap the signal for evaluation. I don't measure the temperature because I don't care what it is. Only the pitch is used as feedback. I can tune a single string in about 20 seconds using a crude proportional feedback loop. Currently I have to individually poll the strings through one counter, which complicates and slows down the process. I'm hoping the FPGA will eliminate this sluggishness.

I'm not necessarily sold on the Basic Stamp; it's just something I'm already familiar with and have lying around. I don't need anything fancy if its sole lot in life is to generate a serial PWM loop. It would be really simple to do with a 32 I/O Stamp because the PBASIC language allows you to refer to groups of I/O pins as if they were a single variable. So I would have 10 address pins to the dual-port-RAM, 8 data pins from it, and one serial line, one clock line, and one strobe line to the shift register. Simple, and I can do it in BASIC and don't have to buy a chip burner. I considered using another FPGA on the output, but though the chip itself might have over 256 I/O pins, I never found one that would have that much I/O on a development board. And I don't want to think about trying to use just the chip without a good way to connect it to a board, etc.

I don't intend on this setup to be the working production design. I'm not qualified to even think about doing that correctly, and I don't have $50,000-$200,000 lying around to have experts like you guys do it for me. What I want is something that can tune quickly and fits inside the piano...something that I can show to prospective manufacturers without any wires hanging out of it or a three-foot-long PLC.

Hopefully a slicker, faster prototype will attract a manufacturer who can fund a real production design.

Don
Kansas City
 
Hiya-

If you run out of processor power with the stamp that you are using, there is an ARM based stamp that's about $25.00 that looks interesting to me. I haven't researched it in any great detail, but shows promise.

I am not affiliated with the vendor. The link is:


Hope this helps.

Cheers,

Rich S.
 
A good used concert grand goes for over $60k here in the Pacific NW. A low-end baby grand goes for $30k and a quality upright is $10k or more. The boys just got to play a true concert grand for their recital; and no, an electronic piano can't duplicate that sound, nor the nuances that a good pianist can generate with an "analog" machine, sorry.

Making the price of the system competitive? Call a piano tuner, and ask him to drop by next week (or even next month) and tune your piano...and sit down first. That's for the guy down the street. The really good tuners, who work once or twice a week for the orchestras/concert halls live in much nicer houses than I do.

Don's got the right approach I think, and you'll notice he didn't ask us how to market the device, just how to make it work a little better or smaller package than it currently does.
 
"Making the price of the system competitive?"

The uP (which ever one is chosen) is probably cheap compared to the power circuits. I'm fairly certain that the 16x16 matrix can't be beat for price. The only remaining design challenges are in the software (fairly easy and lots of room to be clever).

===
1 : 10 : 100 : 1000 : 1,000,000
The relative value ratios of:
Idea, Patent, Prototype, Manufacturing and Marketing.
As they say on The Tube, "Mind the gap."
===

 
Don,

Your invention reminds me of a local concert I took part in in the summer. Small, and packed church hall with limited ventilation and no AirCon on the hottest evening of the summer. Lots of people taking turns to do their party pieces. Mine was unaccompanied, so it didn't really matter much (the heat that is - the lack of practice was another thing altogether), but the poor girl who'd brought her bassoon couldn't tune it down far enough to reach the piano (wind and strings going in opposite directions as they heat up).

A piano you could retune between items and adjust to suit the vagaries of the solo instrument could be an accompanist's dream.

Do you have scope to chase hot woodwind, or would that justneed to big an initial uptune for the health of the frame?

A.
 
Thanks for all the help (and encouragement) so far everyone.

As I'm contemplating what my next move is, I had an idea that I thought I'd run by you guys.

I'm already using an FPGA to multiplex and measure the incoming wave signals from the strings. It still has a lot of I/O left and I'm wondering if there is anything else I can use it for in this application. There's not enough left to drive the outputs, but I'm thinking that it might be possible to create the dual-port memory bank (RAM) with what's left over (8 data, 13 address). I wish the FPGA could be my entire processor, but I don't think it's practical to do PID or serial communication with it...is it?

Don
Kansas City
 
A critical factor is the thermal (pitch) time constant of the strings (in the worst case). Not the 1/e time constant, but within the required accuracy of the pitch (probably with a several:1 safety factor).

In other words, if the strings maintain their pitch for several seconds in the absense of power being applied, then the required speed of your entire end-to-end process drops down (probably use relay logic ;-) ). If the strings need to be constantly hit with heat every couple of milliseconds, then you need a much faster scheme.

This factor has a huge effect because you can shift gears to a simpler architecture if the speed is low enough.

 
My current setup has a PWM cycle frequency of about 2 Hz, or two on/off cycles per second. This appears to be fast enough to get a steady pitch.

My accuracy needs to be at least +/- one "cent", which is logarithmically about 1/100th of a musical half-step (the pitch between a white key and the next black key). This is the accuracy piano technicians are tested to when they receive their RPT certification. In reality I should be able to get much better than this. I can measure the frequency (period) to tiny fractions of a cent and I plan to have 8 bits of PWM resolution (1 in 256).

Don
Kansas City

 
VE1BLL brings up a good point, that you may be able to investigate with the rig you have now, i.e., how low can you go with the heating frequency?

There may be a limit other than the thermal time constant, too. If the heating cycle happens to acoustically excite a string, and a good musician with young ears can hear it in a quiet room, that may become a problem.



Mike Halloran
Pembroke Pines, FL, USA
 
Can you add a small thermal mass to the heaters that could allow a much lower update rate? Say 1 or 2 seconds or even longer? Would seem (theoretically) that you could stretch it to minutes because the room ambient won't be able to affect wild rapid changes. This could allow really slow processing.

If you have the grits you can do anything with an FPGA! You can get processor IPs and stick multiple ones in. You can run PCI (horrible complex logic engines), you can certainly use them for shallow DPM. USARTS and other serial comm are often done in/with them. NIOS is a 32 bit processor you can get from ALTERA that runs in their FPGAs. You can get all sorts of 8051 cores, which are 8 bitters that can easily do your job.

What voltage are your heaters?(for the third time)

Now let me address your 'plan' as you are about to make a serious amateur's classic mistake.

I don't intend on this setup to be the working production design. I'm not qualified to even think about doing that correctly, and I don't have $50,000-$200,000 lying around to have experts like you guys do it for me. What I want is something that can tune quickly and fits inside the piano...something that I can show to prospective manufacturers without any wires hanging out of it or a three-foot-long PLC.

Hopefully a slicker, faster prototype will attract a [red]manufacturer who can fund a real production design[/red].

Why are you not working on the production version? You've said the method works. You're scheme for show-and-be-funded is um.. less than optimal! Actually, in your case, it's down right bad! You are going to put the buyer in the drivers seat, BIG TIME, using this plan. Is this what you want?

If they fund you for engineering to build the 'production unit' then they in-fact own a serious part of your design - the heart of the realised hardware. The legal precedence is very clear on this. When the Next Company comes along and wants your tuner there will be a big problem. You will have legal difficulties in using any of the prior design on a competitor's piano. You need to have a product that is done but only needs maybe some mechanical/aesthetic alterations to fit a particular company's piano. In the industry this is commonly referred to as "tooling" or "customization". This clearly defines what part of the work to be done just for that customer. Again they own that but it's only for their piano, and you won't care, because only they need that specific tooling. The Next Customer comes along and you charge them tooling also. Tooling can be a line item on a quotation and doesn't mean,(and better NOT mean), "thrashing out the production design"!

If the first company to fund you has one shred of business moxie it will be the last company you ever sell a tuner to. If you continue with this 'plan' you are going to be rather sorry in my opinion.

Keith Cress
Flamin Systems, Inc.-
 
The system cannot be practically implemented in a piano without warming the strings to tune them. This is a claim (among many others) in my patent and any device used to warm a piano's strings for tuning must be licensed by me or it will infringe. Anyone trying to claim rights to the technology because of the electronic design would be playing "dog in the manger". Their electronics are useless without a device for them to control.

What most of the piano manufacturers that I have talked to want is an exclusive for a year or two, then sublicense the patent to all other piano companies. The version leased to the other companies would be deliberately inferior (in speed and accuracy).

I get the same royalties no matter who produces it.

Don
Kansas City
 
...Oh, and to answer your question...currently I use 5 volts to warm the strings from a 5V, 1500W power supply. As I mentioned before, the string resistances are about a half an ohm.

The strings themselves literally *are* the heaters, and I can't add any mass to them without changing their timbre, so any increase in voltage would be accompanied by a corresponding increase in peak current and a decrease in duty cycle percent.

Don
Kansas City
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor