Author Topic: [AXE] electricity simulator  (Read 9951 times)

0 Members and 1 Guest are viewing this topic.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
[AXE] electricity simulator
« on: November 29, 2012, 12:36:51 pm »
Hi guys

I'm new to AXE programming, so don't be to hard on me for my noobie mistakes i made.
So what i want is a program that can simulate an electrical circuit, like this:



And i want to be able to give values to all the components that i know, and then i want it to be able to calculate all ungiven vars.
And maybe let lines auto connect the components instead of letting the user do it? (optional choice)

Ok, so here's a little gif of what i already made so far.
I know, the map routine could probably be a lot smaller and more optimised, idk

I'll add the source as well...


« Last Edit: November 29, 2012, 01:02:28 pm by stevon8ter »
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [AXE] electricity simulator
« Reply #1 on: November 29, 2012, 01:36:14 pm »
I like the concept, it seems a bit like the Proteus software :)

If you're having troubles just ask around, there are many Axe coders which can help you (including me :P ).

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [AXE] electricity simulator
« Reply #2 on: November 29, 2012, 01:55:09 pm »
well i've got some problems... (+ got to recode the while thing) but TheMachine02 is looking into it....
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: [AXE] electricity simulator
« Reply #3 on: November 29, 2012, 01:57:58 pm »
Do you even know how to make this kind of simulation software using a different language?

Edit: Do you know analysis techniques to analyze networks?
« Last Edit: November 29, 2012, 02:06:34 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [AXE] electricity simulator
« Reply #4 on: November 29, 2012, 02:17:41 pm »
Do you even know how to make this kind of simulation software using a different language?

Edit: Do you know analysis techniques to analyze networks?

No that's something i don't know, the way i'dd do it would take up a lot of space :/ and vars :/
but i just have the tileplacing and i need to know how i could do the Values pointing to a component
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: [AXE] electricity simulator
« Reply #5 on: November 29, 2012, 02:55:22 pm »
So... you don't know anything about electronics and simulators and AXE and still you think this is a good idea :P No offense, but I don't see how this is possible at this moment. I study electronics and I know how complex these simulators really are.
If you like my work: why not give me an internet?








Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [AXE] electricity simulator
« Reply #6 on: November 29, 2012, 03:03:51 pm »
I know about electronics etc (elektronica, binair, binaire logica, and-or-not-xor-... poorten, elektriciteit (dutch))

Maar dat is juist de bedoeling... om te leren hoe ik zo een eenvoudige simulator maak...
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: [AXE] electricity simulator
« Reply #7 on: November 29, 2012, 03:10:32 pm »
A logic simulator is easier to make! With analog electronics you have to deal with impedances, transitions, tresholds, phasors, etc. I bet a TI84+ is not strong enough to handle that.
If you like my work: why not give me an internet?








Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [AXE] electricity simulator
« Reply #8 on: November 29, 2012, 03:12:18 pm »
I just need to emulate a: (spoel, weerstand, en condensator op ac, en dat zijn maar enkele formules) it's for school
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: [AXE] electricity simulator
« Reply #9 on: November 29, 2012, 03:15:43 pm »
What's the imput signal you want to feed trough those things?
If it's DC you just have to replace the capacitors with open ranks and the inductor coils with short circuits. Analyzing resistor networks is very easy :)
If you like my work: why not give me an internet?








Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: [AXE] electricity simulator
« Reply #10 on: November 29, 2012, 03:32:21 pm »
a good place to start with this would be implementing a linked list data structure. once you have that working, you're going to need to decide on what different attributes to have defined for each possible element (i.e., how long is the current stalled when passing through, what resistance level is there, what's the minimal voltage for it to work, etcetera). then, as long as you aren't looking for too much accuracy, and if each element is connected to only one other, it should be pretty easy. as soon as you start adding in branching and merging paths, however, things will get much more difficult. you will have to have multiple paths simulated in tandem. more complex elements, like capacitors, would also be problematic to implement. that's no reason to not give it a shot, though =)

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [AXE] electricity simulator
« Reply #11 on: November 29, 2012, 03:41:27 pm »
a good place to start with this would be implementing a linked list data structure. once you have that working, you're going to need to decide on what different attributes to have defined for each possible element (i.e., how long is the current stalled when passing through, what resistance level is there, what's the minimal voltage for it to work, etcetera). then, as long as you aren't looking for too much accuracy, and if each element is connected to only one other, it should be pretty easy. as soon as you start adding in branching and merging paths, however, things will get much more difficult. you will have to have multiple paths simulated in tandem. more complex elements, like capacitors, would also be problematic to implement. that's no reason to not give it a shot, though =)
Yeah i'll have to make some lists and then i'll have them store all the data, all components are in after eachother, i guess i'll figure it out once ;p

How do i create a 384 hex elements that are all the same without having to hardcode the thing?

So not: [0000000000000....

And also not: [00-> gdb0
For(A,0,384
00-> {gdb0 + A}
End
Cause that could corrupt the other ram...
Is there a possible way?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: [AXE] electricity simulator
« Reply #12 on: November 29, 2012, 04:41:08 pm »
Buff(384)->GDB0
If you like my work: why not give me an internet?








Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [AXE] electricity simulator
« Reply #13 on: November 29, 2012, 05:01:41 pm »
Ok thx ;3
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: [AXE] electricity simulator
« Reply #14 on: November 29, 2012, 06:35:49 pm »
Actually this is a really neat idea for a project. I can see this being extremely valuable for students and enthusiasts alike.

"My world is Black & White. But if I blink fast enough, I see it in Grayscale."