Any hobbyist clubs in the Northern NJ area?

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
russosv
Posts: 24
Joined: Thu Jan 03, 2008 7:16 am
Contact:

Post by russosv » Mon Jan 14, 2008 10:34 am

Hi MrAl,

Re-sent the PM. I don't know why it didn't work-- it seems to be in my "outbox" here at N&V.

I'm in the process of working through your online course. I took all of the self tests through Lesson 9 to make sure I remembered all of the math. I had to refresh my memory on the sums of powers... other than that I'm doing ok.

I've started reading carefully at Lesson 10. I suspect that most of this course will be review, nevertheless it will be very helpful because I haven't hand-analyzed a circuit in probably 6 or 7 years. I've done a little computer analysis, but the digital circuits I've done are so simple that I haven't had to do much of anything. That said, I'm sure my solutions aren't ideal in terms of power performance, but they usually do work. But I feel like I'm ready to take it to the "next level".
Also, does the Microchip demo require a C compiler for the PIC?
Yes, it does... however you can download the C18 compiler for free from their web site. Get the "student version". It's unlocked for the first 60 days, and then it becomes a limited version which essentially disables optimization.
Yes i wondered about soldering those BGA chips too, if they could
be done with perhaps a heat gun on the back of the pc board.
The best homebrew solution I've seen so far is here.

I haven't tried it yet, and I don't know if it would work with home made PCBs. But I would like to try it at some point in the future. It also seems like an easy way to mount other SMT parts.
The AC transfer switch is a solid state relay...
It sounds a lot like a UPS system to me, but I'm sure it's more complicated than just that. When I think of a "solid state relay", I think MOSFETs. Is this what comprises it?
The PC scope used memory chips...
This sounds very similar to the digital oscilloscope project at FPGA4FUN.com. I tried this project, but I destroyed my ADC card because it does not have overvoltage protection. For a while, though, I had a useful 1-channel 100MSPS oscilloscope. Now I don't currently have a scope. As you said, USB would probably be good for this kind of project, but the protocol gets very involved so it's just not as simple as using a UART (unless of course you are using USB-to-serial, but then I don't think you are taking advantage of the full device speed).

Hey, if you haven't played with FPGAs yet, I highly suggest that you do. Try one of the cheap Pluto-II cards from FPGA4FUN.com. It's a very interesting technology.

I like your user interface a lot for the voltage meter. It's very "clean". Sometimes people can get carried away with all sorts of crazy controls so that their UIs look like the inside of an F-15 cockpit.
The cells were made by Energizer and it is known to be a problem
with some of them now.
Yes, I have heard of that problem with Energizer cells... that's really interesting!
Still, i think we should start off with something more
basic to get a feel for the basic properties of things.
Yes, I agree... I am willing to do the work to get there, though i have to admit that the "hands-on" stuff has always been the most appealing part of electronics to me.
Since you have some programming experience too then you wont find it hard to pick up a new language that is easier to use than C.
Yes, this seems very close to C... looks like a combination of Basic or Pascal and C. What's the name of that language? Would this be for working through examples?
Sorry to ask so many basic questions
Don't be silly... Actually it took me quite a while to actually get a "feel" for voltage and current. It's one thing to know what they are, but another to grasp how they actually work. I think the most confusing thing for me was that you can have a high voltage but a low current and vice-versa. Strictly according to Ohm's law-- the higher the voltage, the higher the current for a given resistance. In reality there are current limits to the sources you are using.

This is a simple point that really isn't covered by basic electronics courses that just touch on the "theory" and not the hands-on.
The eigens of a matrix are sometimes used to determine the transfer function in the time domain. We dont really have to do this...Ok, we wont worry about the State equations just yet.
I'm not opposed to learning anything, as long as it leads to something practical that can be used in an application.

That sounds like a plan... start with the linear stuff! No, I don't know how do design an inductor though it would be cool to learn how to do it!
rather than the HP calculator because that can be
somewhat hard to use...maybe that's why everyone gave up.
Yeah, don't those HP's use RPN or something like that? That is a little confusing to learn if I recall. I think it has a built-in stack or something? Stacks can be very confusing for non-computer oriented individuals.
I didnt think you would drop out as you seem to have a
big interest in analog and digital circuits, maybe as much as
i do?
I think so! Actually making stuff yourself is incredible. When I first discovered about a year or so ago that you could use microcontrollers to interface with PCs, I was shocked and amazed. My first PC was a VIC-20, back when I was about 7 years old. Ever since then, I have been imagining all sorts of different devices... and to find that you can actually build them yourself is incredible!

russosv
Posts: 24
Joined: Thu Jan 03, 2008 7:16 am
Contact:

Post by russosv » Mon Jan 14, 2008 10:57 am

By the way: regarding small SMT parts, have you seen the Schmartboards yet?

They make soldering SMT parts easy because the footprints are physically indented into the circuit board. So when you solder, the IC stays put.

To me, they are a little on the expensive side to be useful (I have a lot more time than money!). However if you have extra money they might be worth using. They do have one that allows you to solder BGAs, which is cool but very expensive (I think it's like $40 for a single board). Too expensive to be helpful to most hobbyists.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Tue Jan 15, 2008 1:05 am

Hi again Steve,


Got the PM this time, thanks. I'll reply there also.

Oh you like the course? That's great, but i hope that
calculator doesnt throw you, if it's a problem then
we'll use the programming language i told you about.
It's called "Euphoria" (strange name i know). The
main page is:
http://www.rapideuphoria.com/
where you can download the interpreter and just about
everything else for that language, including the source
code as it is now an open source project totally free.
Adding a few simple routines and it will do matrixes
just fine. I can provide the routines also no problem.
This is a very useful language that's why i tell people
about it. It's very good for doing problems where you
just want an answer and you dont want to have to keep
compiling the program to get it or set up complex
data structures to handle more advanced problems.
The basic data structure of this language is the
"sequence". Ever work with a sequence before?
Here's an example:

sequence s
s={
{"Jim",39,"123 West Main Street"}
{"Greg",20,"35 Every Road"}
}

This is just a list of names with ages and street addresses.
The elements are accessed similar to arrays, for example
the age of Jim would be retrieved like this:
atom age
age=s[1][2]
where
the 1 points to the first sub sequence (starts with "{Jim")
and the 2 is the second item of that sub sequence.

The sequence has no limit on its depth:

s={{{{{4}}}}}

so i guess in theory it can hold just about any information
you can possibly come across, and in a structure that is
appropriate for that kind of information and perhaps matches
the real life structure to some degree.

The C18 cimpiler sounds good enough for me. I guess that only
works with the 18F chips then, or how about the 16F chips?
I mainly program in assembler now because i like having such
control over the program.

The soldering info is good, thanks for the link.

The scope project looks interesting too, mine is a bit different
though, using mostly dip packages and might have more memory.
BTW, they are calling that a 100MHz scope right, but you really
cant call a 100MS/s scope 100MHz because of the Nyquist Theorm.
No big deal i guess though, as long as they state the sampling
rate.

FPGA sounds cool too. I'll look into that board you
are talking about.

About the user interface for the voltage monitor...
Yes, i wanted to keep it as simple as possible so that
anyone could use it. Unfortunately, after starting the project
i realized that to add functionality means to add more complexity
as well, so i ended up wanting to add the ability to work with
algebraic (and perhaps calculus based) formulas. This would
allow the user of sensors of any origin to be used with it.
Right now there is an assumed form of the equation for a thermistor
for example, but if it could evaluate an arbitrary origin equation
the user could enter in their own equation and go from there.


The HP calculator used in the course uses RPN yes, but it also
uses infix (standard algebraic notation). This means it's not as
hard to use as an RPN calculator, but it's still not that straightforward.
Maybe you can try it if you like to see how you like it.
Working the buttons on the computer isnt the same as actually
having the calculator right in front of you either, maybe that's
part of the problem.

My first PC i had to build myself, 8080 based :smile:
I also tried out the Sinclair (dont know if you rem that one).
It was cute but too small and not enough memory (2k i think).

Yes i've looked at the Schmartboards and came to the same
conclusion as you did: that they might be useful for a one
of a kind project, but you cant expect to make things for
lots of other people and expect to charge them the extra
money for those boards, it would just be too expensive.
Thus, i doubt i'll ever use one.

Maybe you can take a look at that language and let me know
what you think about it? Im sure we'll get through that in
a day or two or maybe just a little more as you get it set
up on your comp. You run Windows i hope?
LEDs vs Bulbs, LEDs are winning.

russosv
Posts: 24
Joined: Thu Jan 03, 2008 7:16 am
Contact:

Post by russosv » Wed Jan 16, 2008 12:48 pm

Hi MrAl,
Sorry things have been busy the last couple of days.

The course is excellent so far but I didnt get a chance to look at it yesterday.

I'll check out the Euphoria language as soon as I get a chance. Are sequences similar to arrays?

Yes, the C Compiler only works for the C18 chips. The way I understand it is that the 18F chips are specifically optimized to allow C programming. I don't know exactly what this means-- probably something to do with the way the memory is laid out-- but I do know there is a 3rd party C compiler for PIC 16 chips (maybe PICC?)

FPGA stands for "Field Programmable Gate Array". What it allows you to do is create an "on-the-fly" ASIC. You use a programming language called a Hardware Definition Language (like Verilog or VHDL), and you can program the 'logic' to the chip. Different logic can run in parallel on a single chip, so it makes it very easy to do certain things like creating a VGA controller, and even a full core (depending on the size of the FPGA) running in combination with other peripherals.

Yes, I sure do remember the Timex Sinclair. I was a Commodore person, and had the VIC-20, then the C-64, and finally and Amiga 500. But I grew up on Compute! and remember hearing a lot about the other brands. They always printed their programs with listings for different computers.

My requirement for a computer at the time was that the keys had to make a "clickety-clack" sound, which is why I didn't want one that had the soft keys or membrane type keys! :grin:

Talk to you soon!

Steve

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Thu Jan 17, 2008 2:05 am

Hi again,


Hmmm, i'll have to think about getting involved with the 18F series.
They do offer more than the 16F and lower so that's good.

The sequences in that language are a bit difficult to explain.
For example, in C an array might be set up like this:
int a[4][3]
which would give us 4x3 storage places for int's.
Written out with all zeros, this would look like this:
[0][0][0]
[0][0][0]
[0][0][0]
[0][0][0]

Now lets say we actually store something in this matrix:

[0][0][1]
[2][0][0]
[3][0][0]
[0][0][4]

Above i've stored the numbers 1 to 4 in four locations and have
not used the other locations, so for this data we have used up
12 locations in memory yet only used 4 locations for anything
that the program actually needs.

The sequence, on the other hand, has the ability to store stuff
just like the array, but also can have a variable structure.
We could set up the sequence the same way:

[0][0][1]
[2][0][0]
[3][0][0]
[0][0][4]

*or* we could instead set it up like this:

[0][0][1]
[2]
[3]
[0][0][4]

where we dont actually even allocate 4 of the locations we needed
to with the array.

Let me show the actual typical code that would do this...

For the full array using all original bytes:

s=
{
{0,0,1},
{2,0,0},
{3,0,0},
{0,0,4}
}

and now for the actual data we need for the program:

s=
{
{0,0,1},
{2},
{3},
{0,0,4}
}

Note how we were able to eliminate 4 of the storage locations.

Note also that all of these structures access elements the same way...
for the first number '1' would be either
a[1][3] for the array or
s[1][3] for the sequence
and the number shown as '3' would be either
a[3][1] or
s[3][1]

But to stop here would leave a lot out, because one of the other
advantages is to be able to *change* the structure of the storage
at any given time in the program.
For example, say we wanted to add another element between the 3 and
the 4, with 5 elements of it's own instead of three... we could do this:
s=s[1..3]&{0,0,0,0,5}&s[4]
which would change the total sequence to this:

s=
{
{0,0,1},
{2},
{3},
{0,0,0,0,5},
{0,0,4}
}

This shows a lot of the way the sequence works, but here's another
interesting point. At any given time you can also change the
'type' of element that is stored in a location. For the sequence
above, say we wanted to store the text "hello" just before the 5.
We would just do something like this:

s[4][4]="hello"

and that would change the sequence to this:

s=
{
{0,0,1},
{2},
{3},
{0,0,0,"hello",5},
{0,0,4}
}

Note that now we've not only loaded the sequence with some data,
we've also changed the 'type' of item it was, from int to string.

But it doesnt stop there. We might instead have wanted to add two
strings and have them in their own subsequence like this"
{"hello","goodbye"}

To do this, we simply load that sequence element with the new
data:

s[4][4]={"hello","goodbye"}


and now the structure of the sequence looks like this:

s=
{
{0,0,1},
{2},
{3},
{0,0,0,{"hello","goodbye"},5},
{0,0,4}
}

and of course if we wanted to print that subsequence we could
do this:

?s[4][4]
and that would print something like this:
{"hello","goodbye"}

and if we wanted to print each one individually,

printf(1,"%s\n",{s[4][4][1]}) --prints "hello" without quotes
printf(1,"%s\n",{s[4][4][2]}) --prints "goodbye" without quotes

where we accessed the first word (hello) with the '1' and we
got the second word with the '2' in those print statements.
LEDs vs Bulbs, LEDs are winning.

russosv
Posts: 24
Joined: Thu Jan 03, 2008 7:16 am
Contact:

Post by russosv » Thu Jan 17, 2008 10:33 am

Hi MrAl,

Thanks for the info on Sequences in the Euphoria language.

I've done up through Lesson 12 (started 13) in your tutorial. Good stuff!

I'll keep you posted on my progress.[/quote]

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests