Announcement

Collapse
No announcement yet.

OT - Electronics questions

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

  • OT - Electronics questions

    Q1: What is a decent programmed logic/gate array for home use? I have several hare-brained projects cooking and such a device could help a lot.

    Q2: I have no QCGB and no CNC. If I were going to build a 'virtual QCGB', would I need a closed-loop system to control a leadscrew? Of course the input signal is from the leadscrew itself so if it bogs down somehow the leadscrew would slow down proportionally. There wouldn't be any thought of repeatability beyond using the thread indicator.

  • #2
    Originally posted by tony ennis
    Q1: What is a decent programmed logic/gate array for home use? I have several hare-brained projects cooking and such a device could help a lot.
    http://tinyurl.com/c4ubo6
    neat little PLC type controller you can program via the front screen or free software. These are on ebay all the time

    Comment


    • #3
      The electronic device I am talking about is an IC chip. It has a *lot* of standard 'and', 'not', and 'or' gates inside of it. By putting the IC in a certain mode, you can define the interconnections between the input pins, logic gates, and output pins.

      Here's an example of what I mean.

      Comment


      • #4
        Programmed logic arrays are out. Microcontrollers like the Basic Stamp, the Propeller, PicAxe, and others are in. These are one chip computers that are programmed via a serial connection (one pin). They come in different sizes with different numbers of In and Out pins and memory. They are programmable in a high level language, usually a simple form of Basic. My favorite is the PicAxe group because they have the simplest serial interface for programming. It only requires a couple of resistors and a connector. Others need $50 and higher devices. The PicAxe devices are also a lot cheaper. But they are somewhat slower than others. This may or may not be a problem for a given application.

        Some sites:

        http://www.parallax.com

        http://world-educational-services.in...duct_info.html

        http://www.phanderson.com/picaxe/

        The above devices are more advanced versions of PICs or Peripheral Interface Controller which are a more basic device and harder to program. The above devices are PICs with built in operation systems to allow the use of higher level languages. PICs also usually require more expensive programming devices.

        http://www.microchip.com/stellent/id...PAGE&nodeId=64

        http://en.wikipedia.org/wiki/PIC_microcontroller

        I am currently working with some Pic devices for a couple of projects. They are very useful devices.
        Paul A.
        SE Texas

        Make it fit.
        You can't win and there IS a penalty for trying!

        Comment


        • #5
          You can get a variety of devices from Digikey from companies like Lattice Semi, Xilinx, Altera and others. You can usually get entry level (recent generation) tools for free but they are limited to perhaps a third of the way up their "food chain".

          I'd suggest Lattice Semi as a starting point, then Xilinx. Altera has had their heads up their butts for a long time regarding tools.

          You may want to Google the "Frog" CNC, which is no longer available but was based on a PIC processor. It would do threading using a single pickup sensor on your spindle. Likewise, it would do longitudinal feed, repeat operations, etc. Perhaps you could pick up some ideas from it. I ran one for a while and some results are here (along with the valuable comments of others): http://bbs.homeshopmachinist.net/sho...ght=kermit%27s

          Which reminds me, Mach3 may be where you'd like to be. It will support lathe or mill and I believe it supports threading now. Only needs a parallel port and stepper driver.

          You don't necessarily need closed loop but as you already are aware, if it bogs down, a stepper will lose steps. One solution is to gear it down ... after oiling and adjusting the gibs

          Den
          Last edited by nheng; 05-02-2009, 07:16 PM.

          Comment


          • #6
            Originally posted by nheng
            You can get a variety of devices from Digikey from companies like Lattice Semi, Xilinx, Altera and others. You can usually get entry level (recent generation) tools for free but they are limited to perhaps a third of the way up their "food chain".

            I'd suggest Lattice Semi as a starting point, then Xilinx. Altera has had their heads up their butts for a long time regarding tools.
            Den's got a good list. Xilinx is the high-end, with the largest logic array sizes: the Virtex-5 series have 330,000 logic cells (about 16 Million gates), and are big enough to synthesize a multi-core microprocessor. But the problem is the tools. The pro's design in Verilog or VHDL and use Synopsis Design Compiler or Synplify for logic synthesis, but that's $30,000 and up.

            I would look into the developer's kits and/or educational packages that Xilinx et al provide. Xilinx has the Spartan developer's kit for $189, which includes a good sized FPGA (about 700,000 gates -- more than enough to synthesize an entire microprocessor ) mounted on a proto board with an LCD display and a variety of peripheral ports

            http://www.xilinx.com/products/devki...A-SK-UNI-G.htm

            By the way, synthesizeable logic arrays are not "out" -- they're used by high-end applications every day. It's just a question of whether you want/need your solution in hardware (FPGA's) or software (a microprocessor or a microcontroller). Synthesizable logic is vastly faster than a software solution, but it's a lot harder to develop. The CNC Brain uses Xilinx FPGA's, for example, to synthesize an array of PID-specific controllers.
            Last edited by lazlo; 05-02-2009, 08:12 PM.
            "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did."

            Comment


            • #7
              I'll certainly be looking into all these things, but it's the proverbial ant-and-sledgehammer.

              I could implement my application with about 100 and/not/or gates. That's plenty of ICs to solder, so I'm not so excited by the thought of it. But the chips listed above have *millions* of gates, lol. I need some 1970s technology!

              Comment


              • #8
                Originally posted by tony ennis
                I could implement my application with about 100 and/not/or gates. But the chips listed above have *millions* of gates, lol. I need some 1970s technology!
                Lattice (and Altera, I think) still sell classical PAL's and CPLD's with a couple of hundred gates. I think they have proprietary Sum of Products (ABEL or PALASM) equivalents.
                "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did."

                Comment


                • #9
                  Tony, At the low end of the CPLD families such as Lattice's offerings, you'll find your logic

                  For instance: http://search.digikey.com/scripts/Dk...me=122-1571-ND

                  This part has 34 I/O cells and is flash programmable (in circuit). It's $1.50 and in stock at Digikey.

                  The software is probably free but you'd have to check Xilinx web site.

                  Many of the software packages will let you enter Boolean equations for all resources (gates, flip-flops, I/O), macro functions (such as 7400 series parts, counters, muxes, etc.), or if you choose, schematic entry (which I despise) or a higher level language like VHDL (easy enough to use if you pattern on a simple sample circuit, not so easy otherwise.

                  One of the nicer features of today's logic is the in-circuit programmability. You essentially can avoid soldering when a change is required.

                  Looking at the Xilinx, this is the smallest package, a 44 PLCC. Nice size but not fine pitch so there are numerous ways of breadboarding it.

                  You can also run a simulation of your logic design, although the simulators generally need to be fed with state information.

                  If speed is not that critical, you can throw the thing together and it should work. For more speed, a synchronously clocked design will easily get you to 50MHz, 100MHz or more. The part I linked to has a 5ns propogation delay. Even for the low end device it is, it blows away the discrete logic.

                  Lazlo and other electronics types, breadboarding BGAs is now pretty easy with a proto board from Schmart board (SP??). You can lay down a BGA device with your big old Weller soldering tip. They have many other board types also available. The BGA boards are not cheap ($50) but the idea seems really schmart We just picked up some of the BGA boards and they are nicely made.

                  Den
                  Last edited by nheng; 05-02-2009, 08:51 PM.

                  Comment


                  • #10
                    If you want a virtual quick change gearbox, and are not hellbent on have a PLD single chip hardware solution, here's what I did with an old PC running a plugin I wrote for EMC:

                    http://www.fricktion.net/~mfrick/lat...lsDoc_v0_1.pdf
                    The stepper motor output is tightly interpolated against the spindle encoder pulses such that (basically) the stepper motor speed is updated on each encoder pulse to closely match the required speed ratios. This is accomplished by assuming the spindle is at a constant speed in-between encoder pulse events, and outputting the step pulses after the required percentage of time between spindle encoder pulses has occurred.
                    It's kind of like a CNC version of a manual lathe - it tightly gears the stepper from the spindle at whatever feed/pitch you like.
                    It also can work around not having a threading dial, if instead you've got a carriage stop.

                    The algorithm is pretty simple and could be implemented in programmable logic. That would give good performance, so you'd be able to use a much higher resolution encoder.

                    -Matt

                    Comment


                    • #11
                      For what you want to do just use an eprom(s) as a PAL device. Easy to reprogram and thousands of virtual gates.
                      Free software for calculating bolt circles and similar: Click Here

                      Comment


                      • #12
                        That's a neat thing Ryobiguy. At this point, I'm looking to keep external computers out of the shop. The basement floods and is dusty to begin with. And I program for a living...

                        Otherwise I'm not hell-bent on using any particular solution.

                        I like the EPROM idea. I think of traditional computer memory when I think of using EPROMs - you have some need for a piece of data at a certain location and you calculate the address and go fetch it. In this application, the address lines aren't used in such a coherent fashion. Instead, If you drew a box around your schematic of discrete components, the address lines would be any line drawn through that box. Some inputs could be from other ICs, some could be from a mechanical switch! Then for every possible combination of the inputs, you calculate the result you want and slam it into the EPROM. The schematic has now been converted to a 'truth table' and you're off to the races. This use of an EPROM had never occurred to me. Of course I am not an EE sort of guy either.

                        Den, that IC you linked is remarkable. In the simple arrays I have seen, you get one layer of 'and' gates and one layer of 'or' gates. While you can do a lot with that, it pales to the later evolutions of the idea. The example you linked clearly supports state memory (flip flops) given your comment about using a counter IC macro. It also says a lot about the order and depth of the operations. For example, the counter is a flip-flip (itself likely a macro) followed by an 'and' gate at the very least. It feels like you can string together whatever gates you like in whatever order. Remarkable.

                        Comment


                        • #13
                          My article, "A Semi-Automatic Coil Winder" in the current and next issues of Digital Machinist deals with this for coil winding. An encoder built into the spindle pulley is directly connected to the stepper motor that advances the wire guide nozzle to evenly distribute the wire on the bobbin, with automatic reversing. I dealt with varying the winding pitch by using a "programmable" encoder. The spindle pulley was equipped with 20 bonded nitrile ferrite permanent magnets mounted in holes around the spindle pulley that I could push forward to trip a hall sensor, or push back to miss the sensor. This provided 20 different ratios, usable over a number of wire gauges. I used 74LS00 TTL logic gates in 3 ICs for direction changing and for a homing function when the spindle was not turning.



                          Though unusable for threading, the principle is demonstrated. For a threading application, I would use a high-count encoder, counters and magnitude comparators to perform the division to drive the stepper motor. An EPROM as Evan mentioned, along with thumbwheels would be useful in presetting the comparators to produce common threading pitches, otherwise a table of codes and the thumbwheels would serve. A second zero-degrees encoder or sensor on the stepper leadscrew would be necessary, along with (maybe) a threading dial type sensor. Add an oscillator to return the carriage to a starting position switch, maybe an ending position switch and some miscellaneous logic. Perhaps a dozen chips or therabouts.

                          Why not a Microchip or Basic Stamp-type solution? Very doable, but I think I would spend more time puzzling through the programming than I would need to figure out the logic and wire up the hardware.
                          Last edited by Weston Bye; 05-03-2009, 10:27 AM.
                          Weston Bye - Author, The Mechatronist column, Digital Machinist magazine
                          ~Practitioner of the Electromechanical Arts~

                          Comment


                          • #14
                            Originally posted by tony ennis
                            Den, that IC you linked is remarkable. In the simple arrays I have seen, you get one layer of 'and' gates and one layer of 'or' gates. While you can do a lot with that, it pales to the later evolutions of the idea. The example you linked clearly supports state memory (flip flops)
                            That's the difference between an Old-School PAL (Programmable Array Logic) and an FPGA: an FPGA is comprised of logic cells: a flip-flop, a cluster of logic, and a 4-input lookup table. The logic cells are routed through a variety of mechanisms, usually by RAM-based. I hate to say this Tony, but FPGA's have been constructed like this for 20 years The only thing that's changed is that there are lots more logic cells now (up to 330,000 of them).

                            If you're going to implement a synchronous design, a logic cell-based PLD from Xilinx or Altera is much simpler to design than a static logic based Sum of Products device. But the simplest form of an electronic leadscrew is just a divider circuit, which can easily be done in combinational logic.
                            Last edited by lazlo; 05-03-2009, 10:20 AM.
                            "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did."

                            Comment


                            • #15
                              I hate to say this Tony, but FPGA's have been constructed like this for 20 years
                              lol. I had never heard of any of this until yesterday. I'm a programmer, and not the normal kind that got weeded out of EE school. I pre-washed and started in computer science directly.

                              I was fiddling with all I knew about, just the basic gates ("oh look here's a counter chip, how cool!"), noted the number of ICs I would need, and said to myself, "This is nuts. I haven't seen that many gates on a board in a long time. There has got to be an easier way..." So I consulted the university of Google... then I came here.

                              I am leaning towards a modern device because they're more fun and will reduce my chip count. I'd need to learn more to decide, including the cost of various solutions and available programming tools. Great hardware with crappy support tools is useless, especially for a beginner.

                              That being said, I got an "a-ha!" moment by figuring out what Evan meant so it's all good.

                              Keep it coming, this is great!

                              Comment

                              Working...
                              X