Announcement

Collapse
No announcement yet.

How to Build the "Digital Tesla Switch"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Build the "Digital Tesla Switch"

    Hi folks, this thread is being started to help those who desire to build and program the "Digital" version of the Tesla switch. Discussions relating to theories on the "Use of the Tesla Switch" should be continued to be discussed in that thread.

    I will be posting an updated schematic and code shortly.

    Thanks

    Bit's

  • #2
    Here it is!!!

    Originally posted by Bit's-n-Bytes View Post
    Hi folks, this thread is being started to help those who desire to build and program the "Digital" version of the Tesla switch. Discussions relating to theories on the "Use of the Tesla Switch" should be continued to be discussed in that thread.

    I will be posting an updated schematic and code shortly.

    Thanks

    Bit's
    Ok guy's, sorry this has taken longer than I hoped. Here is the "No bells version" (without sensing) but it will get you up and going. I have attached the schematic, pcb layout and description below. The blue dots shown on the PCB layout are the ground points that need to be soldered to the filled ground plane. Use at your on risk!!!!

    Bit's


    The “PICAXE-18X Digital Controlled Tesla Switch” is comprised mainly of the following parts;

    1n4001-Q1 1n4001
    1n4001-Q2 1n4001
    C1 0.01uf 103
    Cap-Q1 1.0uf
    Cap-Q2 1.0uf
    D1 STPS8H100D 497-2737-5-ND
    D3 STPS8H100D 497-2737-5-ND
    D5 STPS8H100D 497-2737-5-ND
    D7 STPS8H100D 497-2737-5-ND
    D9 STPS8H100D 497-2737-5-ND
    D10 STPS8H100D 497-2737-5-ND
    D2-D6 30CPU04PbE
    D4-D8 30CPU04PbE
    DB9
    J1 Battery Connector DG126
    J2 Battery Connector DG126
    J3 Battery Connector DG126
    J4 Battery Connector DG126
    J5 J5 Connector DG126
    J6 J6 Connector DG126
    LED1 Red
    LED2 Green
    Q1 MJL21194
    Q2 MJL21194
    R1 150R 2 Watt
    R2 10k 1/2 Watt
    R3 10k 1/4 Watt
    R4 22k 1/4 Watt
    R5 330R 1/4 Watt
    R6 330R 1/4 Watt
    SW1 Reset E28
    U1 PICAXE-18X
    U-Q1 H11d1
    U-Q2 H11d1
    Z1 1N4733A



    Basically this circuit can be broken down to the following circuits;

    “Brains” – PICAXE-18X

    “Sensing” – LM324

    “Switching” – MJL21194 & H11d1

    “Power Supply” – Z1, R1, & C1

    ****** NOTE ******
    Due to the Sensing circuit not functioning at this time, most of the functions are remarked out. This code WILL still function to oscillate Q1 and Q2.

    Listed below is the code to give intelligence for the PICAXE-18X (U1) to operate. Do not let this code be intimidating. It is very easy if you walk through each line and understand what it is doing.




    Start:
    SYMBOL ChargeSense = W1 '########## Reserves buffer for ChargeSense Value
    SYMBOL BattLVLSense = W2 '########## Reserves buffer for BattLVLSense Value
    SYMBOL TotalCompare = W3 '########## Reserves buffer ChargeSense + BattLVLSense

    Main:
    ;readadc10 1, ChargeSense '########## Reserved for future use
    ;readadc10 2, BattLVLSense '########## Reserved for future use

    pause 500
    pulsout 4,500 '########## send 1/2 second pulses out of pin 10
    pause 100 '########### pause 100 milli seconds
    pulsout 6,500 '########## send 1/2 second pulses out of pin 12




    ;let b1 = 0 '########## All below is Reserved for future use


    ;let BattLVLSense = 128 '########## Used for Debuging
    ;let ChargeSense = 122 '########## Used for Debuging

    ;sertxd("The value of ChargeSense is ",#ChargeSense,13,10) '########## Used for Debuging
    ;sertxd("The value of BattLVLSense is ",#BattLVLSense,13,10) '########## Used for Debuging
    ;sertxd("The value of TotalCompare is ",#TotalCompare,13,10) '########## Used for Debuging


    ;let TotalCompare = BattLVLSense + ChargeSense '########## Reserved for future use

    ;If TotalCompare > 255 then '########## Reserved for future use
    ;high 3 '########## Reserved for future use
    ;else
    ;low 3 '########## Reserved for future use
    ;endif


    ;if ChargeSense > BattLVLSense then SwitchGroup1 '########## Batts 2 and 4 are low
    ;if ChargeSense < BattLVLSense then SwitchGroup2 '########## Batts 1 and 3 are low
    ;if ChargeSense = BattLVLSense then SwitchGroup3 '########## Batts 1,2,3 and 4 are at the proper levels


    ;SwitchGroup1: ' ########## Favors Oscillating Q1
    ;pulsout 6,700 ' ########## send 1/2 second pulses out of pin 12
    ;pause 40
    ;pulsout 4,750 ' ########## send 1/2 second pulses out of pin 10
    ;sertxd("The value of ChargeSense is ",#ChargeSense,13,10)
    ;goto Main

    ;SwitchGroup2: ' ########## Favors Oscillating Q2
    ;pulsout 6,750 ' ########## send 1/2 second pulses out of pin 12
    ;pause 40
    ;pulsout 4,700 ' ########## send 1/2 second pulses out of pin 12
    ;sertxd("The value of BattLVLSense is ",#BattLVLSense,13,10)
    ;goto Main

    ;SwitchGroup3: ' ########## We are holding our own, Let's get some work done
    ;pulsout 6,600 ' ########## send 1/2 second pulses out of pin 12
    ;pause 20
    ;pulsout 4,600 ' ########## send 1/2 second pulses out of pin 10
    ;sertxd("The value of TotalCompare is ",#TotalCompare,13,10)
    ;goto Main



    Description of the code functionality;

    Variables are set up to receive values from various pin readings through the READADC command. These Variables are;

    BattLVLSense - Holds the value of the voltage from Batts 1 and 3.
    ChargeSense - Holds the value of the voltage from Batts 2 and 4.
    TotalCompare- Holds the value of Batts 1 and 3 + Batts 2 and 4.

    Once all Batts are connected, power is applied (12V from Batt1) to R1 which supplies power to Z1. Z1 is a 5.1V zener diode that maintains the voltage to operate the PICAXE-18X chip. Cap C1 filters any noise.

    (3) SwitchGroups (subroutines) are setup to do the “pulsing” of Q1 and / or Q2.

    The process starts by the PICAXE-18X(U1) reading and storing information presented to pins 1 and 18 from the LM324 Op amp (U2). U2 senses the voltage at the points shown on the schematic and presents it to U1 as a voltage range from 0 to 5vdc. The U1 in turn, converts this to a value from 0 to 255. U2 is setup through the voltage divider resistors to output 2.5 volts on its output when the voltages are 18vdc between Batts 1 and 3 as well as 14vdc for Batts 2 and 4.

    We know that if we place different loads on the TS, this will affect the “Charge Process” of Batts 2 and 4 and the use of capacity from 1 and 3 or vise versa. The algorithm in U1 is such that it can compensate by utilizing any of the 3 SwitchGroup sub routines. (Illustrated below is just one of the scenarios).

    Let’s understand that if Batts 1 and 3 fall below 18vdc collectively, our reading of pin 1 of U1 will yield a value of something less than 127. This value will be stored into the BattLVLSense variable and the code algorithm determines that SwitchGroup2: is needed. SwitchGroup2: favors the pulsing of Q2 which places Batts 2 and 4 in series for a .5 second “Pulse” consecutive for 10 times. The algorithm jumps out of this subroutine and takes another reading at the U1 pins 1 and 18. This is a “Health” check of Batts 1 and 3 as well as 2 and 4.

    This scenario is repeated as long as U1 has power, but U1 also has the intelligence to understand other levels and adjust (by selecting the right SwitchGroup) to maintain all for Batts to the desired levels.

    Another part of the U1 algorithm is to determine if all of the Batts are healthy enough to place a load on them. Pin 9 output signal is turned high (5V) wich can drive a N FET that in turn can drive a relay coil to connect a load. This happens when the Variable “TotalCompare” has a value greater than 255 (Batt 1 and 3 = 19V or, 137 as U1 sees them) plus (Batts 2 and 4 = 15V or, 137 as U1 sees them). 137 + 137 = 274 so the algorithm turns pin 9 on U1 high and also through SwitchGroup3: will oscillate Q1 and Q2 to maintain the proper Batt levels.

    Caveats:
    Different load types (i.e. Inductive, Reactive, Resistive) will cause batteries to charge or discharge at different rates. The algorithm assumes the battery levels to be as mentioned above acceptable to maintain the batteries capacity. Adjustments can be made by changing the parameters both in the “pulse” duration within the SwitchGroups as well as the measurement level (in this case 127 for the desired level) for the batteries.

    Please use at your own risk!!!!!!!
    Last edited by Bit's-n-Bytes; 01-07-2010, 02:37 AM.

    Comment


    • #3
      Nice work!

      There's one thing i don't understand though:
      when Q1 is conducting, what prevents the current through Q1 to make a left-turn before batt 1 through D2, load at J5, D8, load at J6, batt 3 and Q1 again? Is this a wanted path or is it prevented in a way i don't understand?

      /Hob
      Hob Nilre
      http://www.youtube.com/nilrehob

      Comment


      • #4
        Originally posted by nilrehob View Post
        Nice work!

        There's one thing i don't understand though:
        when Q1 is conducting, what prevents the current through Q1 to make a left-turn before batt 1 through D2, load at J5, D8, load at J6, batt 3 and Q1 again? Is this a wanted path or is it prevented in a way i don't understand?

        /Hob
        Hob, thanks, you may have just pointed out a problem I have trying to track down. I have been unable to get the desired 14V from the anode of D3 to the common cathodes of D4 - D8.

        Bit's

        Comment


        • #5
          Hobs and Bits

          I have no idea what you guys are talking about, but my estimation of you both just went up a few hundred notches.

          I'm glad we have such brilliant minds working on this forum

          Atoms move for free. It's all about resonance and phase. Make the circuit open and build a generator.

          Comment


          • #6
            Originally posted by Inquorate View Post
            I have no idea what you guys are talking about, but my estimation of you both just went up a few hundred notches.

            I'm glad we have such brilliant minds working on this forum

            Thanks Inquorate

            Bit's

            Comment


            • #7
              Impressive Job

              Hi Bits,


              Your dedication and hard efforts to get a digital version of the tesla switch to work are an inspiration to the rest of us. You have certainly accomplished a lot in a short while. I am really impressed by your programing efforts and board design. I used to work in a design department so I know how much effort it takes.

              I do have a couple of questions about the circuit though. Hherby pointed out what he saw as a problem with the diode strings at the top and I have to agree with his conclusions. His post was several days ago on the other tesla thread and I was hoping John B. would comment but I think he has been too busy to read all the posts carefully. The concern about the diode string is that if you apply conventional electronic theory which is that electrons flow from negative to positive and from the cathode to the anode there appears to be a short circuit in the top diode strings. If you turn on Q1 current would flow from the negative of battery 1 through Q1 and into diode D5. From there it would go through D9 and then through D3. From there it would go through D10 and back to the positive of battery 1. With nothing to restrict the current flow you would quickly burn out either Q1 or one or more of the diodes. The same situation will occur in the other string if you turn on Q2. I have looked at this for several days now and I can't see how it could work like this. If I am looking at this wrong then please explain because I have made mistakes before where I just couldn't see clearly what was going on. Thanks for any clarification and congratulations on a great job so far.


              citfta
              Just because someone disagrees with you does NOT make them your enemy. We can disagree without attacking someone.

              Comment


              • #8
                Originally posted by citfta View Post
                Hi Bits,


                Your dedication and hard efforts to get a digital version of the tesla switch to work are an inspiration to the rest of us. You have certainly accomplished a lot in a short while. I am really impressed by your programing efforts and board design. I used to work in a design department so I know how much effort it takes.

                I do have a couple of questions about the circuit though. Hherby pointed out what he saw as a problem with the diode strings at the top and I have to agree with his conclusions. His post was several days ago on the other tesla thread and I was hoping John B. would comment but I think he has been too busy to read all the posts carefully. The concern about the diode string is that if you apply conventional electronic theory which is that electrons flow from negative to positive and from the cathode to the anode there appears to be a short circuit in the top diode strings. If you turn on Q1 current would flow from the negative of battery 1 through Q1 and into diode D5. From there it would go through D9 and then through D3. From there it would go through D10 and back to the positive of battery 1. With nothing to restrict the current flow you would quickly burn out either Q1 or one or more of the diodes. The same situation will occur in the other string if you turn on Q2. I have looked at this for several days now and I can't see how it could work like this. If I am looking at this wrong then please explain because I have made mistakes before where I just couldn't see clearly what was going on. Thanks for any clarification and congratulations on a great job so far.


                citfta
                I believe you guy's are right. I have an idea how to fix this. By the way thanks. The idea is to install 2 SCR's replacing D9 & D10. SCR(D9) triggered by opto U-Q1 and SCR(D10) tiggered by U-Q2.

                Your thoughts.

                Bit's

                Comment


                • #9
                  SCR replacement of D9 &amp; D10

                  Hi again Bits,

                  I think that would work fine except I think you have the triggering of the SCRs backwards. You want D10 to trigger with Q1 and D9 to trigger with Q2. Do you agree with that? I think you are on the right track. I wish I had a pickaxe18 to work with as I am still having trouble keeping the SG3524n working consistently. I will be traveling for a few days and when I get back I am going to order the pickaxe beginner kit as I haven't done any of that kind of programming. I used to be pretty good at programming PLC's. Programmable logic controllers for those reading this and wondering what we are talking about. I will still be around for a couple of more days before we travel if you have any more questions. John B. of course is much more qualified to give the correct answers, but he said something about being really busy for the next several days, so maybe I can help some.

                  regards, citfta (Carroll)
                  Just because someone disagrees with you does NOT make them your enemy. We can disagree without attacking someone.

                  Comment


                  • #10
                    Originally posted by citfta View Post
                    Hi again Bits,

                    I think that would work fine except I think you have the triggering of the SCRs backwards. You want D10 to trigger with Q1 and D9 to trigger with Q2. Do you agree with that? I think you are on the right track. I wish I had a pickaxe18 to work with as I am still having trouble keeping the SG3524n working consistently. I will be traveling for a few days and when I get back I am going to order the pickaxe beginner kit as I haven't done any of that kind of programming. I used to be pretty good at programming PLC's. Programmable logic controllers for those reading this and wondering what we are talking about. I will still be around for a couple of more days before we travel if you have any more questions. John B. of course is much more qualified to give the correct answers, but he said something about being really busy for the next several days, so maybe I can help some.

                    regards, citfta (Carroll)
                    Sometimes I get a little Dyslexic and get these turn around. I have fixed it and and will run some further test. Check it out;
                    Thanks.
                    YouTube - SCR test.MPG

                    Bit's

                    Comment


                    • #11
                      Video looks great!!

                      Hi again,


                      Your video looks great now! Can't wait to see what kind of charging you get after it runs a while. Keep up the great work!


                      best regards and a Merry Christmas, Carroll
                      Just because someone disagrees with you does NOT make them your enemy. We can disagree without attacking someone.

                      Comment


                      • #12
                        schematic

                        Bits, Have you posted a schematic of our digital T/S yet?
                        I did not see here
                        Thanks Kevin

                        Comment


                        • #13
                          Originally posted by redcar1957 View Post
                          Bits, Have you posted a schematic of our digital T/S yet?
                          I did not see here
                          Thanks Kevin
                          Here is the latest;

                          B/M


                          1n4001-Q1 1n4001
                          1n4001-Q2 1n4001
                          C1 0.01uf 103
                          Cap-Q1 1.0uf
                          Cap-Q2 1.0uf
                          D1 STPS8H100D 497-2737-5-ND
                          D3 STPS8H100D 497-2737-5-ND
                          D5 STPS8H100D 497-2737-5-ND
                          D7 STPS8H100D 497-2737-5-ND
                          D2-D6 30CPU04PbE
                          D4-D8 30CPU04PbE
                          DB9
                          J1 Battery Connector DG126
                          J2 Battery Connector DG126
                          J3 Battery Connector DG126
                          J4 Battery Connector DG126
                          J5 J5 DG126
                          J6 J6 DG126
                          LED1 Yellow
                          LED2 Yellow
                          Q1 MJL21194
                          Q2 MJL21194
                          Q9 MJL21194
                          Q10 MJL21194
                          R1 100R 2 Watt
                          R2 10k 1/2 Watt
                          R3 10k 1/4 Watt
                          R4 22k 1/4 Watt
                          R5 100R 1/4 Watt
                          R6 100R 1/4 Watt
                          R7 500 1/4 Watt
                          R8 500 1/4 Watt
                          R10 30K 1/4 Watt
                          R11 10K 1/4 Watt
                          R12 30K 1/4 Watt
                          R13 10K 1/4 Watt
                          R14 30K 1/4 Watt
                          R15 10K 1/4 Watt
                          R16 33K 1/4 Watt
                          R17 10K 1/4 Watt
                          R18 150R 2 Watt
                          SW1 Reset E28
                          TP1
                          TP2
                          TP3
                          TP4
                          U1 PICAXE-18X
                          U-Q1 H11d1
                          U-Q2 H11d1
                          U-Q9 H11d1
                          U-Q10 H11d1
                          Z1 1N4733A

                          And the Code;

                          Start:
                          SYMBOL ChargeSense = W1
                          SYMBOL BattLVLSense = W2
                          SYMBOL TotalCompare = W3

                          Main:
                          readadc 1, ChargeSense
                          readadc 2, BattLVLSense

                          ;pause 1000
                          ;If ChargeSense > 200 then '########## Reserved for future use
                          ;high 3 '########## Reserved for future use
                          ;pause 1000
                          ;else
                          ;low 3 '########## Reserved for future use
                          ;endif

                          let b1 = 0

                          ;let BattLVLSense = 128
                          ;let ChargeSense = 128



                          if ChargeSense > BattLVLSense then SwitchGroup1
                          if ChargeSense < BattLVLSense then SwitchGroup2
                          if ChargeSense = BattLVLSense then SwitchGroup3

                          let TotalCompare = BattLVLSense + ChargeSense '########## Reserved for future use



                          SwitchGroup1:
                          do
                          high 4, 5
                          pause 800
                          low 4, 5
                          pause 200
                          inc b1
                          loop while b1 < 10
                          goto Main

                          SwitchGroup2:
                          do
                          high 6, 7
                          pause 800
                          low 6, 7
                          pause 200
                          inc b1
                          loop while b1 < 10
                          goto Main

                          SwitchGroup3:
                          do

                          high 4, 5
                          pause 800
                          low 4, 5
                          high 6, 7
                          pause 800
                          low 6, 7
                          inc b1

                          loop while b1 < 30

                          goto Main


                          goto Main

                          Enjoy.

                          Bit's
                          Last edited by Bit's-n-Bytes; 05-25-2010, 02:53 AM.

                          Comment


                          • #14
                            Digital T/S

                            Thank You Bits
                            How is the testing looking?
                            are you still getting good charging results?
                            Kevin

                            Comment


                            • #15
                              my circuit

                              Hi, I had been designing a tesla switch for some while, and below is a circuit I designed. Maybe you will find it interesting.

                              http://www.energeticforum.com/renewa...html#post45415
                              Last edited by lanenal; 02-14-2010, 01:13 AM.

                              Comment

                              Working...
                              X