I'm not even going to say this is alpha software, 'cause that would be
rather demeaning to the Greek alphabet, but my Tuke EDA toolkit library
is in a good enough state to create an arbitrary sized series-parallel
LED grid and output gerbers in less than 100 lines of user code.
Dependencies are Python2.5 and the Numpy library. git is handy as well,
to get the source code, although a tarball is available too.
Unfortunately it's not pure Python, I use some C extensions for the
Element wrapping code, so getting it to work under Windows will require
a C compiler, I have not tried.
You can get the tarball for v0.1 here:
http://github.com/retep/tuke/commits/v0.1
Either click on the download link in the page above, or just use git:
git clone git://github.com/retep/tuke.git
To try it out, read the HACKING file and follow the instructions.
Tuke is rather slow right now, although fortunately there is a *lot* of
room for improvement. Currently the basic geometry is implemented in
Python and about 90% of the cpu time is spent just doing stuff with
vertexes, 80% in V._apply_context() and another 15% creating them in
V.__new__() leaving just 5% of the cpu time for everything else. Cython
looks quite promising for this sort of stuff, essentially it is a
dialect of Python that can compile directly to fast C code, while stil
being able to easilly interface with regular Python.
Aside from more trivial stuff like adding more footprints and the like
my immediate future plan is to start researching auto-routers and
geometry programming. While a good global auto-router is far off in the
future, far simpler forms would still be very valuable. For instance it
should be possible to give a list of connected points and route them
together. This will require some sort of global geometry state
information, allowing queries along the lines of "what's in this
bounding box that I need to avoid?" A simple auto-router that did
nothing but route around obstacles when trying to place a trace between
point a and b would still be quite useful.
That said, I've been working an average of about 20-30 hours a week on
this since the beginning of Febuary, and 40-50 hours since school ended
in early April. However I start a new full-time job in two days, so
don't expect me to get very far very fast with any of the above. :)
- --
http://petertodd.org 'peter'[:-1]@petertodd.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIFpKX3bMhDbI9xWQRArJ1AJ9RFCovY+ZiPhEVShQJLVT1cwlJCACdFBve
fSxTKkFAlgA7phkrTfI8toY=
=eZ3N
-----END PGP SIGNATURE-----
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Wish I had time to have a look at the code. Way too busy right now
though. Just a suggestion, have you considered using swig to wrap C
libraries to be used by Python? I've found it to be extremely useful.
Alex
On Mon, Apr 28, 2008 at 08:57:52PM -0700, Alex Harford wrote:
> On Mon, Apr 28, 2008 at 8:14 PM, Peter Todd <pe...@petertodd.org> wrote:
> >
> > Cython
> > looks quite promising for this sort of stuff, essentially it is a
> > dialect of Python that can compile directly to fast C code, while stil
> > being able to easilly interface with regular Python.
>
> Wish I had time to have a look at the code. Way too busy right now
> though. Just a suggestion, have you considered using swig to wrap C
> libraries to be used by Python? I've found it to be extremely useful.
I have looked at swig, and will likely end up using it indirectly in the
form of wrappers to some geometry libraries. That said, Cython looks
better for stuff I'm writing from scratch. For instance from this page:
http://www.perrygeo.net/wordpress/?p=116
cdef extern from "math.h":
float cosf(float theta)
float sinf(float theta)
float acosf(float theta)
def great_circle(float lon1,float lat1,float lon2,float lat2):
cdef float radius = 3956.0
cdef float pi = 3.14159265
cdef float x = pi/180.0
cdef float a,b,theta,c
a = (90.0-lat1)*(x)
b = (90.0-lat2)*(x)
theta = (lon2-lon1)*(x)
c = acosf((cosf(a)*cosf(b)) + (sinf(a)*sinf(b)*cosf(theta)))
return radius*c
Not bad 'eh? Yet, great_circle() is callable from Python, as a Python
function. This gets compiled down to raw C using the Python C-Extension
API, but in a *far* less verbose fashion.
Numpy is reportedly rewriting a lot of it's code in Cython, and
development on Cython itself, and Numpy for that matter, is sponsored by
the people behind the SAGE Open Source Mathematics Software project.
- --
htt://petertodd.org 'peter'[:-1]@petertodd.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIFqIv3bMhDbI9xWQRApQiAJ9EiuubCXAh8LBNhhsKEXhmyxgBewCfZuPc
vnW/fedkpxZtJi8qgMnN2SI=
=6Qac
-----END PGP SIGNATURE-----
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
How fast, how often ?
cc
Occasional switching? Maybe some vacuum relays.
Eg. this inexpensive Russian one:
http://www.nd2x.net/B1B.html
Two major Western makers are Kilovac and Jennings.
Consider also the possibility of series-connected photo-MOS SSRs (watch
that the input/output isolation voltage rating is sufficient to be safe).
Best regards,
Spehro Pefhany --"it's the network..." "The Journey is the reward"
sp...@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
Occasional switching? Maybe some vacuum relays.
Eg. this inexpensive Russian one:
http://www.nd2x.net/B1B.html
Two major Western makers are Kilovac and Jennings.
Consider also the possibility of series-connected photo-MOS SSRs (watch
that the input/output isolation voltage rating is sufficient to be safe).
Best regards,
Spehro Pefhany --"it's the network..." "The Journey is the reward"
sp...@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
--
Sean
>Cedric Chang wrote:
>>> On Apr 29, 2008, at 6:47 PM, Estevan wrote:
>>>
>>> Greetings all!
>>>
>>> I have been asked to find a way to switch between 2Kv AC and 3Kv
>>> AC (1.6mA MAX) (around 5W MAX) to a few different loads. Does
>>> anybody have a good supplier or any links for this type of thing?
>>>
>>> Thanks for your help!
>>>
>>> Best regards,
>>> Estevan
>>>
>>
>> How fast, how often ?
>> cc
>>
>1.6ma * 3kv = 48 watts :-(
>Roy
But a switch shouldn't have to handle anything like that...
vacuum relay is probably easiest - look at the high-end of reed relay sizes as you may find
something suitable there.
Otherwise, HV mosfets or IGBTS - maybe MOSFETS with photovoltaic optoisolators to simplify the gate
drive,