Go Back   Home > Forums > Design & Build > Software Tools
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 16th May 2007, 01:05 PM   #81
Bonsai is offline Bonsai  Taiwan
diyAudio Member
 
Join Date: Aug 2006
Location: Taipei, Taiwan
re MCU coding etc, I have done a bit and its great fun.

PIC is very popular and they have some great tools.

A great site for some practical PIC applied to audio is

http://www.mhennessy.f9.co.uk/index.htm

I happen to use NXP (formally Philips) LPC uC - great mix of peripherals and use the same architecture as the Intel 8051 which I am comfortable with.

If you go onto the Keil website, there are some good forums where you can pick up a lot of tips and code.

If you are in need of quite a bit more power, have a look at the NXP ARM products - built in USB ports, CAN bus etc and up to 500K flash memory. There are some great ARM forums on the web as well.



__________________
bonsai
http://www.hifisonix.com/
  Reply With Quote
Old 16th May 2007, 01:10 PM   #82
Bonsai is offline Bonsai  Taiwan
diyAudio Member
 
Join Date: Aug 2006
Location: Taipei, Taiwan
I don't know if its been mentioned, but the 'Basic Stamp' modules are also great if you want something really simple and programable in Basic.

I code in C by the way, but would class myself as a 'longterm novice'. I just love being permanently attached to the steepest part of the learning curve.
__________________
bonsai
http://www.hifisonix.com/
  Reply With Quote
Old 16th May 2007, 01:25 PM   #83
Bonsai is offline Bonsai  Taiwan
diyAudio Member
 
Join Date: Aug 2006
Location: Taipei, Taiwan
Trawling thru this thread, I see there are strong views either side of the divide.

I doubt that spice is a 'great' tool for analyzing audio circuits. However, where is does help is to provide some feedback to 'what . . . if' questions and in that sense it is useful. It will never give a really accurate set of results for a complete amp. For small sections of a circuit it definitely can be beneficial.

I worked with a bunch of people designing switch mode power chips in the semiconductor industry and they were simulating 1 or 2 cycles (at 500Khz) on simple driver and mosfet power switch stages. They spent many man hours optimizing the models, but ended up with very accurate results - e.g. simulation of efficiency witihn 0.5% of practical chip measurements. In cases like these, where every iteration of silicon takes 3 months and a mask set costs minimum $50k, spice (and derivatives or similar tools) play an important role. Despite the views of the Natsemi guru, I'll bet they used simulation extensively in their product development.

Does SPICE work and is it a great tool? You bet, but be prepared to put the effort into your models and use it at device level or at systems level - but don't expect to put an amp circuit in with generic models and get anything out that resembles the physical amp measurements.
__________________
bonsai
http://www.hifisonix.com/
  Reply With Quote
Old 16th May 2007, 02:41 PM   #84
diyAudio Member
 
Edmond Stuart's Avatar
 
Join Date: Nov 2003
Location: Amsterdam
Quote:
Originally posted by Bonsai
Trawling thru this thread, I see there are strong views either side of the divide.
I doubt that spice is a 'great' tool for analyzing audio circuits. However, where is does help is to provide some feedback to 'what . . . if' questions and in that sense it is useful. It will never give a really accurate set of results for a complete amp. For small sections of a circuit it definitely can be beneficial.
......................
Hi Bonsai,

This makes no sense: it does work or it don't work, no matter how large a section is. The real problem is that some people misuse simulators, for example, by using the wrong models or ignoring the limitations of them.
As for audio, it's not enough using only standard transistor models, without some additions to mimic for example the Early effect or the influence of a stray capacitance or inductance. Of course, without such additions, much chance of garbage in garbage out.
Also, some people (no names) have based their opinion on totally obsolete knowledge about this subject. My advice: just ignore them.
As for accuracy, read my post:
Spice simulation #35

Cheers,
__________________
Een volk dat voor tirannen zwicht, zal meer dan lijf en
goed verliezen dan dooft het licht…(H.M. van Randwijk)
  Reply With Quote
Old 16th May 2007, 04:32 PM   #85
diyAudio Member
 
Join Date: Sep 2006
Quote:
Originally posted by PB2



You should understand that your statements are based on how you think real world engineering is done.

The fact is that many people can hack together a design on a bench and make it work, but most professionals know that a production design has to work over process, voltage, and temperature (PVT). Why is this so important in industry? Money and reliability ... If you do a design that makes it to production, ships, and a large percentage of the units are returned due to marginal failures, then that product might cause the company losses rather than profits. Big problem.

Small designs, and reprogrammable designs such as FPGAs can be built and tested in the lab, but this is not practical for large designs or chips being custom or semi-custom fabricated.

Simulation of complete systems, or even often subsystems was not practical years ago due to time constraints, however today in the last 10 to 15 years it is.

I worked in the semiconductor industry where we guaranteed chips (complex often more than 100,000 transistors) to behave the same as in simulation for both functional and (analog) timing behavior over process, voltage, and temperature. We used a variety of simulators, probably many that you never heard of, some for functional verification, and others for timing verification. Cells in libraries are characterized with SPICE, but SPICE is just part of the solution.

Designs were not accepted from a customer that had not been simulated since the simulation was part of the contract to fab (expensive) the part. If the part performed as simulated but did not work in the system then it was a customer's error, if the part did not behave as simulated then it was our issue. Test vectors were captured from a simulation run, and run against the real part on a tester.

We made mistakes from time to time, and it was usually an error in the model, or a bug in the simulator but most often the better tools did work well. Obvioulsy, one had to choose a quality tool set since bugs could mean failure/delays for a project. I did designs also as a customer and saw poor quality tools that nearly sunk several projects.

My point here is that people who claim that SPICE and simulation are useless as a blanket statement would be proven wrong by major segments of the engineering industry.

I have used SPICE for probably more than 20 years, and obviously if you do not have a validated set of models for your semis you cannot blame the simulator. You should also become familiar with the limitations of the models.

You are right, you don't know the temperature in the room, but the fact is that you should be testing over the full intended operating conditions to verify that your design is robust.

Pete B.

Hi Pete,

These are all great points.

Were you an IC designer? I was also.

Bob
  Reply With Quote
Old 16th May 2007, 05:45 PM   #86
diyAudio Member
 
Join Date: Sep 2006
Hi peufeu, and others!

You mentioned about using simulators without having to pay $$$. What is interesting to me is that the basic core of the simulation is really quite simple. You can "do it yourself" with C or Fortran to get started. The difficulty is that the core of the model might take perhaps a couple of page of code. But then you have to get your problem into it. This requires at the basic level a matrix entry which may take several pages to represent the circuit. Life is made easier with software for circuit drawing, schematic capture, netlisting, graphical results to prod internal nodes (although if you have your own code you can get all the node results in a text file, but that's hard going too...).
I've written a basic model which runs transient and ac analysis, but gave up when commercial simulators with the graphical front ends/back ends came out. I started on a netlist reading file which recognises a few components (bipolar, diodes, R & C) but that so far takes more code than the simulator. To give you an example of the situation.

On top of that there is the model itself. (This refers to two parts, the sub-circuit parameters, which most people take as "the model" but also the set of equations behind the parameters such as the classic Gummel-Poon (Level 3 type) and VBIC which have different characteristics.) Some of the contributors who dismiss SPICE more or less out of hand may appreciate just as much as some users clearly do that garbage in gives garbage out. Garbage in may be just the model parameters: I've simulated an amplifier using a commercially available model which gave WORSE results than the measurements! Then I wrote my own "model" (as in parameter set).
Garbage in may also refer to whether the set of equations accurately describes the electrical results. Generally they do not, because of the effects like temperature and so on, so we have to check the results. On the other hand, simulations are excellent at giving a first view of a circuit, and may pick up silly mistakes. My former boss always said
"if the computer says something is not possible, it is probably right; but if it says something works, you check it"

Maybe if enough interested users want to form an open-source syndicate ....


cheers
John
  Reply With Quote
Old 16th May 2007, 06:11 PM   #87
diyAudio Member
 
Join Date: Feb 2001
Location: Columbia, SC
Quote:
Originally posted by PB2


You certainly make numerous assumptions, and you would be wrong about most of them. You don't know anything about what I have designed (you've not asked) or of the thousands of other designs done in this industry. Further, you comment about my comprehension? You tested me? How arrogant. This is where I stop reading you, not worth my time.

Pete B.

I once witnessed an argument between a friend of mine who was a chemist and another chemist. It was one of those red-in-the-face, spittle-flying arguments that went nowhere once the two sides defined their positions. One of my degrees is in geology and they pump you full of chemistry along the way. I could somewhat follow the lines of the argument, and from what I knew it seemed that my friend had the upper hand, in large part because he had more hands-on experience. The other fellow was arguing from a completely theoretical viewpoint, which was fine as far as it went, but he wasn't including some things that my friend said were relevant. (It's been twenty years or more--I don't remember the finer points of the argument--something about solute deposition from an aqueous solution. Temperature was involved. Something about iron ions. I don't remember the rest.)
As for what you've designed...unless it's high end audio, I don't care. John Curl has earned my respect in this manner. Ditto for Nelson Pass and Charles Hansen. Electronics is a vast field. To assume that ability--even perhaps expertise--in another portion of electronics does not ipso facto grant you expertise in audio. There are too many quirky, weird things in audio.
Peufeu's memory distortion concept is one example. Simple, elegant, and quite reasonable, even from a theoretical point of view; doesn't require much, if any, hand-waving to see how it could apply. But does it show up in simulations? That's another matter entirely. I have no doubt that code can be written and spliced into simulation programs to cover this idea, but it hasn't happened yet.
Sooner or later simulators will address the things that matter in audio, but at this time it's still in the future.
Arrogant? No, just truthful.
It's all in attention to details. To take the superficial view that all that matters is reliability when thermal criteria are on the table is not at all helpful.

Grey
  Reply With Quote
Old 16th May 2007, 06:27 PM   #88
diyAudio Member
 
Join Date: Feb 2001
Location: Columbia, SC
Quote:
Originally posted by john_ellis


Maybe if enough interested users want to form an open-source syndicate ....


For some reason I'm thinking that I've seen something about this on the Linux platform. If true, you may find that a large portion of the work has already been done.

Grey
  Reply With Quote
Old 16th May 2007, 10:12 PM   #89
diyAudio Member
 
Join Date: Jul 2003
Location: berkeley ca
Bonsai, I have BSpice on the computer in front of me. I prefer MICROCAP which is Spiced based. I have used electronic simulation programs for more than 40 years. Before that, 45 years ago, I ran the biggest computer in the free world, the IBM 7094 for Lockheed Aircraft. Yes, 45 years ago, almost to the day, I was running computer programs to solve difficult problems in design. I was up to my ears in electronic simulation BEFORE SPICE was even developed, and I was THERE in its initial development.
Still, I have alternate skills, that don't need Spice to be useful. Please read up and understand this.
  Reply With Quote
Old 16th May 2007, 10:30 PM   #90
peufeu is offline peufeu  France
diyAudio Member
 
Join Date: Mar 2001
Location: Lyon, France
Quote:
Peufeu's memory distortion concept is one example. Simple, elegant, and quite reasonable, even from a theoretical point of view; doesn't require much, if any, hand-waving to see how it could apply. But does it show up in simulations? That's another matter entirely.
Actually it isn't "mine" ; the idea to apply this to audio comes from Gérard Perrot of Lavardin.

And it does not show up in simulations since the SPICE Gummel-Poon models don't handle non-constant temperature. You can add a function voltage source in the emitter and a RC circuit to model thermal inertia, but hFE and other stuff will not move, so it's really partial.

Still, self-heating of the output transistors is a clean and simple explanation of why amplifiers sound better with higher biasing while theory (and testing with sinewaves of constant amplitude) would predict optimal biasing at a much lower current that what your ears like.

output transistors heat -> Vbe multiplier compensates -> output transistors cool -> you now run in underbiased class B.

See Cordell's paper, for instance, he plots bias versus time after exercising the output stage a bit.

Oh yeah : http://ngspice.sourceforge.net/
  Reply With Quote

Reply


Hide this!Advertise here!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Spice simulation overmind Everything Else 4 23rd December 2002 04:58 PM


New To Site? Need Help?

All times are GMT. The time now is 12:59 PM.

Page generated in 0.14550 seconds (90.25% PHP - 9.75% MySQL) with 11 queries

Copyright ©1999-2012 diyAudio