Jump to content



Photo
- - - - -

Electronic Interpret (Serial And Parallel)

solve electronic

  • Please log in to reply
12 replies to this topic

#1 sebest

sebest

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 July 2012 - 02:08 AM

I wrote a program to solve series and parallel from for the fx9860. It is an interpreter, has some bugs, but I hope to fix in the future.

Run the program: "EC'ELECT"
load the impedances, for example
if you want to solve: [10//10//(8*2)]+10 put:

(10,10,8*2)+10

and solve 13.809

or 2//[((10+10)//50)+2] put:

(2,(10+10,50)+10)

solve = 1.8478

The program solve de parallel separete by "," and then sover the rest.

This program use the NUM2STR program (thanx for this to every body).

http://theview.57o9.org/OP%27PARAL.g1m

And very thanx to Forty-Two for help me, and host the file!!!!

Edited by flyingfisch, 05 July 2012 - 04:19 PM.

  • MicroPro and flyingfisch like this

#2 Forty-Two

Forty-Two

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 528 posts
  • Gender:Male
  • Location:Well, The sign says "You are here"...

  • Calculators:
    Casio fx-CG10 Prizm
    Casio fx-9860GII
    TI-84+ SE

Posted 03 July 2012 - 02:32 AM

I'm not too sure what this does, maybe units could help? It does perform as expected, and outputs correctly for the inputs you gave. Maybe you could consider documenting the commands so that your interpreter can be used in the right way. If you polish it up, you could enter it in the Ucf Summer Contest.

#3 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 03 July 2012 - 04:17 AM

Ah, sounds nice, but like Forty said, its hard to find out what this program actually does.

Could you explain a little more?


@Forty-Two: Is this a shell of some sort? Or would it go in Educational?

#4 sebest

sebest

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 July 2012 - 01:07 PM

Well, in electronic when you want to know the resistent in any circuit, you need to sum the all resistent.
Posted Image
in series resistors are added
Posted Image

but in parallel the resistors are added like as admitances, for example.
Posted Image
In this example Rab= R1//R2//...//Rn
The "//" be read as "with parallel of"

The program.

The program interpret the parallels separated by ",", and too calc the expresions between ",", and interpret the "(..)".
When you input

7,5 (this is real 7//5 or ((1/7 + 1/5)^(-1)) = 2.9166

but you can input a expresion, for example 3+4 = 7 the prev example be write too like as:

3+4,5 = 2.9116 (in real 3+4 are 2 resistent in series R1 + R2 = 7, this expresion is equal to (R1+R2)//R3 )

Repeat this is a "Parallel interpret separeted by ',' " for this reason in this example not do first 4//5 then plus 3

And interpret "(...)" real is a loop when find "( ... )" solve this, replaces in the expresion and search for other "(...)", then solve the expresion.

((4,5)+3) , In this case first solve the 4//5, then plus 3

Summary: "," is the parallel of any.

Bye!

Edited by sebest, 03 July 2012 - 01:07 PM.


#5 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 03 July 2012 - 03:28 PM

Oh, OK, that is a much better explanation :)

By the way, if you want alternative hosting in case Forty-Two's site goes down, i can host it as well.

#6 sebest

sebest

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 July 2012 - 05:10 PM

i don't have any problem.
upload the file, then send me a link, and i edit the post.

When write the post, i said: "has some bugs"
  • The list of know bugs:All operation need operators, (10)(10) have bad interpretetion, the solve of this is = 1010. First interpreted (10) and reemplece in original string like this (10)10, then with the second 1010.
The correct way is (10)*(10) = 100
  • Other error, is imposible do (10,0), the parallel with zero do 1/0, math error. The parallel with zero is zero (10,0) = 0
I hope fix this errors

#7 Forty-Two

Forty-Two

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 528 posts
  • Gender:Male
  • Location:Well, The sign says "You are here"...

  • Calculators:
    Casio fx-CG10 Prizm
    Casio fx-9860GII
    TI-84+ SE

Posted 03 July 2012 - 11:42 PM

Oh, OK, that is a much better explanation :)

By the way, if you want alternative hosting in case Forty-Two's site goes down, i can host it as well.


It won't go down.

forty-two@trogdor:~$ uptime
 18:42:32 up 539 days, 16:06,  9 users,  load average: 0.00, 0.00, 0.00


#8 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 04 July 2012 - 11:12 PM

It won't go down.

forty-two@trogdor:~$ uptime
18:42:32 up 539 days, 16:06, 9 users, load average: 0.00, 0.00, 0.00


Sorry, didn't mean to challenge you or anything...


I just was saying that a backup is not a bad idea. Also, by "down", I meant hacked, server shutdown, etc.


i don't have any problem.
upload the file, then send me a link, and i edit the post.
....



Oh, don't edit the post. My upload would simply be a backup in case something happened to Forty-Two's. ;)

#9 Forty-Two

Forty-Two

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 528 posts
  • Gender:Male
  • Location:Well, The sign says "You are here"...

  • Calculators:
    Casio fx-CG10 Prizm
    Casio fx-9860GII
    TI-84+ SE

Posted 05 July 2012 - 06:15 AM

I have a backup, 2 in my inboxes, and on a gmail server. I can also stick it on google sites. That makes 4 backups as of now, and I can upload it to google sites as well.

#10 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 05 July 2012 - 04:18 PM

I have a backup, 2 in my inboxes, and on a gmail server. I can also stick it on google sites. That makes 4 backups as of now, and I can upload it to google sites as well.


Oh ok, i thought all you had was Juju's hosting.

#11 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 06 July 2012 - 12:22 PM

I like sebest's program, nice trick to solve resistive networks. :)

Maybe you could expand it so that it solves capacitive networks too?

#12 sebest

sebest

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 06 July 2012 - 01:33 PM

good question.

Suppose a network with C1 and C2 in parallel with this we add C3

The capacitors in series impedances are resolved as parelelo. The capacitors in parallel are resolved as impedances in series.
In this way you can calculate the capacitors like resistances.
Bone: C1 + C2, C3.

Or else working with admittance, you would have to do
1 / ((1/C1, 1/C2) +1 / C3)

I also wanted to add that I said before, this program can handle imaginary impedances. Such as:

1 +0.5 i, 1 +0.5 i = 0.5 + 0.25i

#13 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 10 July 2012 - 02:42 PM

So parallel resistors are simply series capacitors and vice versa. Very smart trick. :)

Do you know about the Modified Nodal Analysis algorithm? It's used to solve a resistive circuit with voltage and current sources (and can be used to analyze non-resistives too). As it's very basic in elec, and you're in elec, I thought maybe you wanna implement it?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users