Announcement

Collapse
No announcement yet.

Stanley Meyer technology entering the age of the computer

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

  • #46
    Originally posted by bussi04 View Post
    hi tecstatic,

    I have installed code:blocks, version control and kicad in an xp environment and feel ready to start now.
    Installation was more than easy - no problem at all
    Anyone reading this thread can go this way in less than 1 hour
    If there should raise any problems under xp I will install the ubuntu under xp version, but I expect no need to do so.

    up yet I havnīt ordered the avr-can because I wanted to wait for the USBPROG decision. If there is no dependency I should order the experiment board immediately or the one you described in your recent post.

    I believe we are more than 3 persons up yet and to my opinion we should proceed.

    can I do something in general concept at the moment?

    greetings,
    bussi04
    @bussi04
    You also need to instal WinAVR, see AVRFreaks for how to do that.
    I will do the initial exercises on the PC, and for that you also need wxWidgets installed.
    You are on your own on how to install wxWidgets on M$, search the net.
    Besides these major tools the Ubuntu toolchain includes other programs that may be needed later.

    If you assume you had a magic box measuring all signals necessary, and providing all timing pulses to the complete system, then what you need is the power circuits.

    If you could give that a thought, you dont need to draw diagrams for the power switchers, just make a 3 terminal component with control in and the two power lines which is connected or disconnected. Then we get that overview.

    @ALL
    Initially you have to decide whether you are a downloader or a SW co-developer for the electronics.

    Downloaders:
    Just need to install the USBprog program, and buy the USBprog HW and AVR-CAN.

    Co-developers:
    You have two choices. A cheap preliminary solution, or the end expensive solution.

    The Olimex AVR JTAG ADAPTER COMPATIBLE WITH ATJTAGICE is 38 EURO ( approx.58$ )
    With this you can both program and debug the AVR-CAN prototyping uC.

    The final solution will probably have both an AT90CAN128 uC, and a XMEGA uC.
    The avr-usb-jtag can not work with the XMEGA, for this you need a JTAG ICE costing 400$+ or maybe the cheap AVR Dragon can be used, I have no Dragon, so I can not tell for sure.

    I recommend the co-developer buys the avr-usb-jtag + AVR-CAN and have a regulated 5V 2A power supply. + 12V (battery OK) + whatever power the remaining circuits may need. I have no Olimex JTAG, but on their website they claim their JTAG to be identical the the old original AVR JTAG, which will do for the first prototyping.

    With the prototyping work done, the final board can be designed, and at that time a few need the expensive JTAG-ICE (maybe we are lucky a cheap clone will be available at that time).

    That concludes the initial HW considerations...but before buying look a bit further.

    ------------------------

    For the SW, I expect we need some exercises to get accustomed to using the tool chain, and learning quick and easy a very limited set of C++ skills, which will do for 90% of the programming. Remember I will supply the project setup and some basic framework, so it will be jump started.

    So until you feel comfortable with the SW tools you don't need buying any HW.

    ----------------------------------------------------------------------

    Further install instructions for the tool chain on Ubuntu 9.10 alternate install will follow in a few hours.

    Eric

    Comment


    • #47
      Tool chain install instructions

      Boot Ubuntu.

      For this the attached file app_markings.pdf is renamed to "app_markings"

      copy app_markings into your home avr folder

      Be connected to the internet.

      Click System->Administration->Synaptic Package Manager

      Enter your user password.

      On the Synaptics menu click File->Read Markings

      Select the app_markings file and click "Open"

      Now you get a lot of packages marked for installation.

      -------

      app_markings is a text file with the names of 200 packages to install.

      If this automatic reading for some reason does not work reading the markings, then you must add the marks manually.
      If that ends up being the case, while adding the 200 marks think of all the free SW you get, and you don't have to decide which of the 25.000+ packages to use

      If you know how to do it you can alternatively convert it to a script file with lines:

      apt-get install "packagename"
      -------

      Click the "Apply" button to start installing.

      When done close the Synaptics window.

      What you now have got is 200 extra packages ( in M$ called DLLs ). This list represents some hours of work (or days op misery if you don't know what to do to make it work).

      IMPORTANT:
      Please wait to start Code::Blocks. The avr-gcc compiler needs to be installed first, so the first run of Code::Blocks auto detects the avr-gcc compiler.


      -------------------------------------------


      Now we install the AVR toolchain:


      Boot Ubuntu if not running already.

      When up running open the home folder.

      create a folder (directory) in your home directory named "avr" by right mouse clicking inside the file manager and selecting "Create Folder".

      Note: In linux lowercase and uppercase are not the same.
      Please always, repeat always use lower case for folder and file names.
      The versioning, make or the compiler will surely tell you if you fail to follow this. And that is waste of time to fix.

      copy
      build-avr-gcc-4.3.3-libc-1.6.7-insight6.8-arch25-fix.pdf

      into the avr folder.
      Rename to .zip

      unpack the zip file by double clicking.

      You now get a new window with a folder inside, double click that folder.

      Now you see a folder named make-avr-gcc.
      click and draw that folder inside the avr folder you already have open.
      Close the zip archive window.

      ----

      Now you need a terminal window.
      click (on top menu) Applications->Accessories and move the arrow to the "Terminal" line
      Click and hold down left mouse key, and draw the terminal symbol to some free space on the tol menu area, and release the mouse key.

      Now you have easy access to starting a terminal. You can move other program icons to the top menu line this way.

      Click the terminal icon, you get a terminal window.
      click inside the terminal window.

      type
      cd avr <enter>

      now you are inside the avr folder. you can type
      ls <enter>
      to see the files.

      Now type
      cd m <tab> <enter>

      The tab key expands fully the m to make-avr-gcc, as this is the only name matching "m"

      In the window with your avr folder, double click the make-avr-gcc folder.
      Now you can see the contents of the make-avr-gcc folder.

      Click your terminal window, and type

      ls <enter>

      Here you see the same files listed in the terminal window.

      ---------------

      Now having tried some few basics, we are ready for fetching the source files from the Internet, be sure you are connected to the net.

      If you move the cursor on top of the connector symbol in the right top menu area you get a tooltip text stating eg. "Wired network connection eth1 active".

      click the terminal window.

      Type
      ./getfiles.sh <enter>

      Download of the toolchain source files now begins.

      This will take some time. (approx. 5 minutes with an 8Mbit connection)

      When done, type
      ./get-patches.sh <enter>

      This is quickly done.

      Now you need system administrator rights to install a program, type

      sudo su <enter>

      type your user password and <enter>

      Now the prompt starts with "root@" so now you are "root" with all rights to modify (or destroy) your system.

      type
      ./buildinsight.sh <enter>

      which compiles the insight debugger for the AVR.

      type
      y <enter> to the question

      The sources are now unzipped and compiled, have patience.

      When done, type

      ./buildavr-no-insight.sh <enter>

      This takes from 10-60 minutes or more depending on your PC.

      type
      usbprog-gui & <enter>

      now you get a USBprog window.

      Click Cache->Download all

      Now you should get all firmware that can run on the USBprog.

      Close the USBprog window.

      Close the terminal window.

      ----

      Now with all this done, now is the time to start Code::Blocks

      click applications->Programming and drag the Codebloks icon to the top menu line, as this is a program you often will start.

      Click on the Code::Blocks icon

      say OK to the auto detected compilers.

      From the Code::Blocks top menu line Click Settings->Compiler and debugger...

      Select GNU AVR GCC Compiler

      Click on the right folder scroll arrow below the Compiler selection combobox till you get "Toolchain executables"

      Set Compiler's installation directory to "/usr/local/avr" by typing the path into the field.

      click OK.

      The tool buttons above the projects window occupies 4 lines with tool buttons. Rearrange the bars to occupy only two lines by dragging the lefmost part of the toolbar.

      Close Code::Blocks (C::B from now on)

      Give a name for the workfile, and say yes to save the new layout.


      Examine the Applications meny, you have a lot of applications installed previously, among them Kicad for diagrams and PCB layout.

      Think for a moment how much money M$ and friends would have asked for to get such applications.


      Congratulations, you now have your Ubuntu workstation (almost) complete for developing HW and SW as you wish (and learn to do). :-)

      We just need to setup the version control, but we need a server hosting our database, any helping us out ?


      Alternatively I could host the database privately and have the role of a version manager, so I receive files from the group and check them in.

      Every week or right after a major update I could publish the database as a bittorrent for download, then each member could have the database.

      This might even be a better strategy regarding loss of data than a central host server.

      Feedback and opinions are welcome.


      When starting using the workstation, I recommend it is kept away from the Internet to avoid interference. Get the files on another computer and copy them to e.g. an USB stick for transfer.

      Eric
      Attached Files

      Comment


      • #48
        Originally posted by Tecstatic View Post
        ...
        We just need to setup the version control, but we need a server hosting our database, any helping us out ?


        Alternatively I could host the database privately and have the role of a version manager, so I receive files from the group and check them in.

        Every week or right after a major update I could publish the database as a bittorrent for download, then each member could have the database.

        This might even be a better strategy regarding loss of data than a central host server.

        Feedback and opinions are welcome.
        ...
        Eric
        I think itīs easier for version control in an entry level team to use a central server. otherwise we risk to get into trouble with different versions if there is no optimal upload-discipline.
        what about using sourceforge.net server (you mentioned it and I canīt catch disadvantages) and backup database by one every second day?

        ... power driver ...
        I think I donīt get the idea according to the device description by 3 lines (2 x power, 1 x input control). Do you mean to make a KiCad ciruit layout for the details of the power drivers and only 3 lines directing to the uC?
        Please give me a hint.

        greetings,
        bussi04

        Comment


        • #49
          Originally posted by bussi04 View Post
          I think itīs easier for version control in an entry level team to use a central server. otherwise we risk to get into trouble with different versions if there is no optimal upload-discipline.
          what about using sourceforge.net server (you mentioned it and I canīt catch disadvantages) and backup database by one every second day?
          I agree, the reason I mentioned the de-central solution is that I fear we end up like h2opower did on electric circuits.

          ... power driver ...
          I think I donīt get the idea according to the device description by 3 lines (2 x power, 1 x input control). Do you mean to make a KiCad ciruit layout for the details of the power drivers and only 3 lines directing to the uC?
          Please give me a hint.

          greetings,
          bussi04
          The interface to your circuit is the uC in the "black box".

          You need some transistors as switches.
          Instead of making a detailed diagram of a MOSFET with driver circuits, you just define an "IC" diagram symbol with one input pin, and two passive pins.

          The control signal goes via your interface to the "switch IC", and thus controls internally to the "IC" whether the two passive pins are shorted or not.

          This wil provide the overview of the circuit, and then I will from my experience design the internals in the "switch IC" the best I can.

          And bussi04, h2opower is not the only one having respect of the way you work

          @ALL
          I have surfed AVRFreaks, and it looks like the cheapest debugger from ATMEL will drop the 32kByte program memory limitation.

          It even seems the XMEGA uC is handled also.

          The name is AVR Dragon, and it costs around 60$.

          I will buy a Dragon, and test if it is usable for us.
          Remember we have to do some SW exercises first, so save your money for the moment.

          From the stuff I have seen on this forum, I can tell you, that the specific task we are going for here, is not the only one having benefit from using a uC.

          Everyone of you, who work with some kind of switched circuit up to 1-2MHz will benefit from joining the uC learning experience.

          However it takes hours to teach and guide, and I do only teach "1st generation".
          From that you must be able to mostly on your own to teach "2nd generation".

          So learning to use a uC is not limited to SM technology in this thread.

          If I see some growing interest in uC's here, I plan to publish some "tested and ready to build" circuits which might be useful for many of you, along with two new threads. This could get more of you into experimenting, as electronics is not so easy to do for the average forum member, so...

          "You can offer water to the horse, but you can not force it to drink."

          Eric

          Comment


          • #50
            Originally posted by Tecstatic View Post
            ...
            @ALL
            I have surfed AVRFreaks, and it looks like the cheapest debugger from ATMEL will drop the 32kByte program memory limitation.

            It even seems the XMEGA uC is handled also.

            The name is AVR Dragon, and it costs around 60$.

            I will buy a Dragon, and test if it is usable for us.
            Remember we have to do some SW exercises first, so save your money for the moment.
            ...
            Eric
            There seems to be another chance for a full featured debugger: AVR JTAG ICE mkII clone ATJTAGICE2 compatible price buy (support AVR32 JTAG ISP debugwire)

            greetings,
            bussi04

            Comment


            • #51
              Originally posted by bussi04 View Post
              There seems to be another chance for a full featured debugger: AVR JTAG ICE mkII clone ATJTAGICE2 compatible price buy (support AVR32 JTAG ISP debugwire)

              greetings,
              bussi04
              Yes, this is a better price (149$) than the original JTAG mkII, (half price at least).

              However if it ends up the Dragon is also full featured for our use, then approx. 60$ is even better, especially for those with low budget.

              I saw that China was one of the biggest AVR uC markets, so better get used to it

              Eric

              Comment


              • #52
                circuits overview

                Originally posted by Tecstatic View Post
                ...
                The interface to your circuit is the uC in the "black box".

                You need some transistors as switches.
                Instead of making a detailed diagram of a MOSFET with driver circuits, you just define an "IC" diagram symbol with one input pin, and two passive pins.

                The control signal goes via your interface to the "switch IC", and thus controls internally to the "IC" whether the two passive pins are shorted or not.

                This wil provide the overview of the circuit, and then I will from my experience design the internals in the "switch IC" the best I can.
                ...
                download circuits.pdf, rename it to circuits.zip and extract all files inside. *.sch are schematics of the circuits. *.txt contain explanations. bulib.lib contains actual circuit symbols.

                greetings,
                bussi04
                Attached Files
                Last edited by bussi04; 11-19-2009, 12:25 AM.

                Comment


                • #53
                  Hi bussi04,

                  Thanks for the project files, I have just downloaded the files, and it looks nice.

                  May I suggest we divide the solution into several PCB types at this early stage.

                  It keeps complexity down, so the layouts are done faster,

                  It allows for the same PCBs to be used with the original circuits or with the uC.

                  This also makes it more easy to debug the HW in the running application, when all use the same circuit.

                  The original controller and the uC is designed with identical interface and connectors, or maybe using a small "connector converter" PCB.

                  I suggest we do the same "pheripheral" circuits both for the original controller and the uC until we have something working.

                  This way h20power does not have to make the PCBs himself ( I think h20power has contributed more than his share long ago ).

                  It also makes sense to do it this way, only 1 VIC PCB layout to make minimum 4 identical VIC PCBs

                  I have questions:

                  What is the maximum voltage for the EEC ? 20KV ?
                  What will the maximum current consumption be for the VIC circuit ?
                  What will the maximum EEC current be ?
                  Can we avoid sparks to the EEC grid ?

                  If my guess of 20KV is right, I don't expect we can find a fast optocoupler for that voltage,

                  But.. The relatively new low cost plastic fiber communication links can with a few centimeters fiber between sender and receiver easily withstand as much as we need.

                  And the links is also fast ( high bit rates ) which is what we want.

                  Just my initial thoughts, I will look further the coming days

                  Eric

                  PS. In eeschema take a look at Place->Hierarchical

                  Comment


                  • #54
                    Originally posted by Tecstatic View Post
                    Hi bussi04,

                    Thanks for the project files, I have just downloaded the files, and it looks nice.

                    May I suggest we divide the solution into several PCB types at this early stage.

                    It keeps complexity down, so the layouts are done faster,

                    It allows for the same PCBs to be used with the original circuits or with the uC.

                    This also makes it more easy to debug the HW in the running application, when all use the same circuit.

                    The original controller and the uC is designed with identical interface and connectors, or maybe using a small "connector converter" PCB.

                    I suggest we do the same "pheripheral" circuits both for the original controller and the uC until we have something working.

                    This way h20power does not have to make the PCBs himself ( I think h20power has contributed more than his share long ago ).

                    It also makes sense to do it this way, only 1 VIC PCB layout to make minimum 4 identical VIC PCBs

                    I have questions:

                    What is the maximum voltage for the EEC ? 20KV ?
                    What will the maximum current consumption be for the VIC circuit ?
                    What will the maximum EEC current be ?
                    Can we avoid sparks to the EEC grid ?

                    If my guess of 20KV is right, I don't expect we can find a fast optocoupler for that voltage,

                    But.. The relatively new low cost plastic fiber communication links can with a few centimeters fiber between sender and receiver easily withstand as much as we need.

                    And the links is also fast ( high bit rates ) which is what we want.

                    Just my initial thoughts, I will look further the coming days

                    Eric

                    PS. In eeschema take a look at Place->Hierarchical
                    Hi tecstatic,

                    I agree to the idea to divide the functionality to several PCBs.

                    We shall not forget that the galvanic decoupling by fiber communication links and vic transformer windings must be accompanied by very well isolated power supplies at the secondary site. otherwise the secondary power supply might find a shortcut to the primary power supply via public power line.

                    greetings,
                    bussi04

                    Comment


                    • #55
                      avr can bottom connector layout

                      Originally posted by Tecstatic View Post
                      ...
                      Have a look at the AVR-CAN:

                      http://www.olimex.com/dev/images/AVR-CAN-sch.gif

                      This will be fine for experimentation, we can build single elements of the final solutions with this one, and when all parts have been programmed and tested, we know exactly what it takes to make the final complete PCB ourselves. And we have all the program peaces come together.

                      By buying the AVR-CAN no PCB and solder work for the processor itself is necessary.
                      The FET circuits are business as usual. So assemble wise this is a quick starter. Remember to get flat cable and connectors to your own experimentation board.
                      ...
                      Eric
                      The 2 bottom connectors fit fine into a standard experimentation board. The appended pic shows distances A - B = 38.5 mm and A - C = 40.0 mm.

                      Greetings,
                      bussi04
                      Last edited by bussi04; 02-16-2010, 11:40 PM.

                      Comment


                      • #56
                        KiCad: I want to correct the errors in my discrete circuits layout. I didnīt find a way to change or add footprints to the footprints lib. Can you give me a hint please?
                        @ bussi04,

                        I suggest not to make changes to the libraries coming with the Kicad program, because each time you upgrade the program you either loose your additions or have to manually transfer all changes to the new library.

                        Use your own library if you create new parts, or modify existing parts. (and remember backup of the library)

                        Open pcbnew.

                        5th button in the toolbar has the tooltip text "Open module editor".
                        use 1st button to select the working library containing the footprint you want to modify.
                        use 6th button to "load module from lib", "list all" select desired footprint and "OK"

                        Use 1st button "Select working library" and select your own library.

                        Change the footprint as needed.
                        Remember to change the footprint name also.

                        use 2nd button to "Save Module in working library" use same name as you assigned in the step above.

                        Good luck.

                        Eric

                        PS. My display is also old, but it supports 4-bit mode, and I use the 4-bit mode.

                        Comment


                        • #57
                          Originally posted by Tecstatic View Post
                          @ bussi04,

                          I suggest not to make changes to the libraries coming with the Kicad program, because each time you upgrade the program you either loose your additions or have to manually transfer all changes to the new library.

                          Use your own library if you create new parts, or modify existing parts. (and remember backup of the library)

                          Open pcbnew.

                          5th button in the toolbar has the tooltip text "Open module editor".
                          use 1st button to select the working library containing the footprint you want to modify.
                          use 6th button to "load module from lib", "list all" select desired footprint and "OK"

                          Use 1st button "Select working library" and select your own library.

                          Change the footprint as needed.
                          Remember to change the footprint name also.

                          use 2nd button to "Save Module in working library" use same name as you assigned in the step above.

                          Good luck.

                          Eric

                          PS. My display is also old, but it supports 4-bit mode, and I use the 4-bit mode.
                          Thanks for your KiCad support.

                          after initialization my display operates in 8 bit mode. setting a register value makes it change to 4 bit. is that compatible to your app?

                          I have installed AVR Studio 4 for the dragon support and linked the AVR-Can via JTAG and all works fine. Now I try to get a first C-File compiled and put to object code.

                          I have found a supplier for a 34 pin female connector for piggy-packing AVR-Can to a driver pcb. Appended I made a hardcopy of the removement of the 32 mb limit for the Dragon.

                          greetings,
                          bussi04
                          Last edited by bussi04; 02-16-2010, 11:40 PM.

                          Comment


                          • #58
                            Originally posted by bussi04 View Post
                            Thanks for your KiCad support.

                            after initialization my display operates in 8 bit mode. setting a register value makes it change to 4 bit. is that compatible to your app?
                            Yes

                            I have installed AVR Studio 4 for the dragon support and linked the AVR-Can via JTAG and all works fine. Now I try to get a first C-File compiled and put to object code.

                            I have found a supplier for a 34 pin female connector for piggy-packing AVR-Can to a driver pcb. Appended I made a hardcopy of the removement of the 32 mb limit for the Dragon.

                            greetings,
                            bussi04
                            Instead of the special female connector, you can use the single-in-line female "header" which fits the male header.

                            The female rows are normally 40 pin long, you can cut them shorter if you wish. 2 rows x 17 pins, thats it, so by storing some female header lists you can make any 2.54mm female PCB connector.

                            At the moment I have to read the doc of the AVR Dragon, it is the cheap version of the JTAGICE, and has no level converters, so I have to make sure I connect power correctly to avoid smoke.

                            Eric

                            Comment


                            • #59
                              success

                              I have successfully compiled a first RS 232 application using Code::Blocks and AVR GCC compiler

                              No version control up to now.

                              then I have uploaded it via Dragon into the AVR-CAN.

                              I have installed version control and wxWidgets under XP.

                              Hardware and software working fine.

                              Ready for step 2 .

                              greetings,
                              bussi04

                              Comment


                              • #60
                                Super bussi, you really go for it

                                While you have done your installs and test, I have made the SUI (Simple User Interface)
                                PCB layout for the 20 characters by 4 lines LCD display, two digital rotary buttons and and two switches and an indicator led.

                                It only requires 4 uC pins to use the SUI.

                                I am also assembling and testing the new (hopefully final) insulated 4 MOSFET PCB usable in many applications. Finally I took the time to get past the problem of common control ground and non insulated circuits.

                                The SUI will provide the basic user interface for the menu system. If necessary I have a PCB with 4 rotary buttons. 2 of those makes it possible to directly manipulating 8 parameters without surfing the menu, just dial the button, and view the changed value on the display

                                SW for the menu system must be implemented so it can be tested with wxWidgets. When all looks nice, we switch the target from the PC to the AVR, recompile and download to the AVR. If it does not work then it is most probably in the display driver, as it is new code compared to the PC version. This way we develop 90% in a super fast environment, and the remaining 10% in the AVR where we have to wait for programming and not so fast debugging.

                                We save a lot of program downloads, which the AVR can cope with 10.000 times before it wears down, and programming typically takes 10-30 seconds.

                                The AVR has 128 KBytes program memory, and that's a lot in this environment. You have to work real hard to add 10Kbyte of regular programmed code to the system, that takes weeks typically.

                                Working this way on the PC enables much faster SW development regarding coding and debug, compared to working on the AVR target.

                                But even the AVR is very fast for an 8-bit uC, it can not compete with a 32-bit PC running 1GHz+.

                                The design must still be done the ordinary way, although the Umbrello program supports UML design descriptions. I don't know yet how much we will need that, but surely it is nice for state machines and other model descriptions.

                                @bussi,
                                One question: Have you debugged the CAN128 with the Dragon from C::B ?
                                If you have, then you have showed the Dragon debugs the CAN128 contrary to Atmel statements.

                                You then also demonstrated you could read the manual, and setup the avarice program for debugging with the Dragon.

                                When I come to the point of delivering the first C::B project, you will see the post processing option (after succesful compilation) is used to both erase, program and verify the AVR is programmed correctly, and start the debugger, so the program pointer is on the fist code line in main().

                                But you have to wait 2-5 days before I have something ready, I have to ensure it is usable for not only me

                                But you still can study the C++ language, that is no waste of time. Interest comes back later, using less time to get a program to compile.

                                OK ?

                                Eric

                                Comment

                                Working...
                                X