30w low voltage PWM controller

Advert

30w low voltage PWM controller

Home Forums Electronics in the Workshop 30w low voltage PWM controller

Viewing 13 posts - 26 through 38 (of 38 total)
  • Author
    Posts
  • #802202
    SillyOldDuffer
    Moderator
      @sillyoldduffer

      PICAXE is still going.   Has all the virtues and vices of an educational system:

      • for simple applications rather than complex
      • limited number of boards and add-on modules
      • quite expensive – the starter kit is about £50. Might be just what’s needed, or not.  Decide yourself!
      • interpreted, not compiled, so will on the slow side
      • only works with pic chips pre-loaded with the PICAXE interpreter
      • requires a special cable
      • programmed in a language that’s vaguely like BASIC.

      Example:

      for b1 = 0 to 63 ; start a loop
      sertxd(“The value of b1 is ”,#b1,13,10)
      pause 1000
      next b1 ; next loop

      Though the PIC chips and language are potent PICAXE is closed source.  That severely limits community support, so the number of add-ons is pitiful compared with Arduino and others.   The number of microcontrollers supported is small too – a subset of the PIC family, whereas the Arduino-IDE supports many different hobby and professional development microcontrollers – not just Arduino.  Here’s what the PICaxe forum says about Arduino vs PICAXE support .

      Chief selling point is the claim that PICAXE is simple:  certainly true in a classroom, but after that, I doubt it.   I suspect Bazyle is right about BBCMicroBit – it too is aimed at education, with an even simpler drag and drop load mechanism.    The raspberry Pico with Python is also drag and drop, well worth considering if you want a cheap powerful board and a modern language.  If Python performance isn’t good enough, or doesn’t support a module, Picos can be programmed in C/C++.   It’s not boxed in like PICAXE.

      Dave

       

       

      Advert
      #802205
      Robert Atkinson 2
      Participant
        @robertatkinson2

        The RaspberryPi Pico series are impressive but a bit overkill as a 555 replacement 🙂

        #802208
        duncan webster 1
        Participant
          @duncanwebster1

          555 has the great advantage of a much larger output current, 200mA if I recall correctly. It can be used for all sorts of things apart from timers, latching flip flop comes to mind

          #802212
          Robert Atkinson 2
          Participant
            @robertatkinson2

            PicBasicPro directly supports both software (any device any pin) and hardware (needs a pic with one or more PWM modules) PWM.The hardaware commend is:

            HPWM Channel, Dutycycle, Frequency

            The frequency is only limited by th clock frequency the PIC is clocked at.

            #802217
            Michael Gilligan
            Participant
              @michaelgilligan61133
              On duncan webster 1 Said:

              555 has the great advantage of a much larger output current, 200mA if I recall correctly. It can be used for all sorts of things apart from timers, latching flip flop comes to mind

              I should perhaps have mentioned … There is also a BB variant of that little 1803 module, with higher current rating, and a heatsink.

              MichaelG.

              #802259
              John Haine
              Participant
                @johnhaine32865

                Having cracked the chip programming problem I’m now wondering about using a pic in another project where it would be useful to write c code. Any suggestions for suitable tools other than the Microchip mplab bloatware please?

                #802274
                Robert Atkinson 2
                Participant
                  @robertatkinson2

                  MicrocodeStudio is included with PicBasicPro3 even the free Student version. Note you don’t have to be a student any personal, non commercial use is OK. They also sell programmers and development boards.

                  http://www.pbp3.com

                  https://melabs.com/

                  Robert.

                  #802288
                  SillyOldDuffer
                  Moderator
                    @sillyoldduffer
                    On Robert Atkinson 2 Said:

                    The RaspberryPi Pico series are impressive but a bit overkill as a 555 replacement 🙂

                    If overkill is decided by counting transistors then all microcontrollers are out, including the PICs Robert recommended earlier!

                    But utility, cost and convenience are far more important than transistor count.  The extra functionality provided by a microcontroller becomes attractive when it costs the same as an NE555, or cheaper. And dominates if the electronics have a complex function.

                    The PWM board identified by Michael is as simple as it gets, so the NE555 is a good solution.  But the NE555 struggles beyond that -doing more requires extra electronics, adding cost and complexity.   Simple is good, too simple is bad.

                    Most microcontrollers have internal hardware that outputs fast, phase correct, and phase & frequency correct PWM on several pins.  And programmers can write code to ‘bit bang’ PWM as well.  Much easier to build a multi-motor system with a microcontroller than NE555s.

                    Modern electronics designs use microcontrollers galore;  billions of them sold worldwide.  Cheaper because they keep component counts down and improve flexibility – features can be added and changed by reprogramming rather than altering the hardware.

                    The Pico is interesting because its microcontroller contains two fast Cortex CPUs, with 8 PWM outputs each.  If 16 PWM outputs aren’t  enough, there are also 8 independent state machines that can be programmed to do PWM – at high speed.

                    I have huge respect for the NE555 – it’s brilliant.  But time marches on, it’s not 1975!  Fifty years later, microcontrollers are even more brilliant.  As always the problem is keeping up.  Using the NE555 is relatively simple electronics.   Microcontrollers require entirely different skills, not easily acquired!

                    Dave

                     

                     

                     

                    #802290
                    SillyOldDuffer
                    Moderator
                      @sillyoldduffer
                      On Robert Atkinson 2 Said:

                      MicrocodeStudio is included with PicBasicPro3 even the free Student version. Note you don’t have to be a student any personal, non commercial use is OK. They also sell programmers and development boards.

                      http://www.pbp3.com

                      https://melabs.com/

                      Robert.

                      John wants to write ‘C’, not BASIC.   Is that supported?

                      Dave

                      #802312
                      duncan webster 1
                      Participant
                        @duncanwebster1

                        When I played with PICs 20 plus years ago to read a pin you had to put some mantra like

                        If(PORTA & 0b00100000 == 0b0010000)

                        etc

                        Which isnt as easy as Arduino digitalRead.

                        And there was a lot of rhubarb at the beginning about brownout and similar, which again you don’t get with Arduino. Has it improved? If so I might be tempted.

                         

                        #802359
                        Robert Atkinson 2
                        Participant
                          @robertatkinson2
                          On SillyOldDuffer Said:
                          On Robert Atkinson 2 Said:

                          MicrocodeStudio is included with PicBasicPro3 even the free Student version. Note you don’t have to be a student any personal, non commercial use is OK. They also sell programmers and development boards.

                          http://www.pbp3.com

                          https://melabs.com/

                          Robert.

                          John wants to write ‘C’, not BASIC.   Is that supported?

                          Dave

                          Doh! missed that. Not being a C person I can’t help much but the compliler you are using is a good starting point for a search.

                          Robert.

                          #802362
                          Robert Atkinson 2
                          Participant
                            @robertatkinson2
                            On duncan webster 1 Said:

                            When I played with PICs 20 plus years ago to read a pin you had to put some mantra like

                            If(PORTA & 0b00100000 == 0b0010000)

                            etc

                            Which isnt as easy as Arduino digitalRead.

                            And there was a lot of rhubarb at the beginning about brownout and similar, which again you don’t get with Arduino. Has it improved? If so I might be tempted.

                             

                            Yes it has improved a lot.
                            PBP3 can be as simple as PortA.1 = 1 (or 0 or a variable name). It automatically sets the pin as an output and high. You acn also make an alias e.g  RedLED VAR PortA.1 Then RedLED = 1 (or 0) will turn a LED connected to PortA.1 on or off. Much easier to keep track of in code.
                            To read a port just say x = PortA.2 etc.
                            You can still set and read the registers directly of you  want to….

                            Robert.

                             

                            #802376
                            SillyOldDuffer
                            Moderator
                              @sillyoldduffer

                              I’ve bruised my brain trying to remember what complier I used for my circa 1990 PIC capacitance meter.  Unlike my brain the meter still works.  Good job I didn’t bet the farm on it being bog standard gcc.  Whilst it can cross-compile for a long list of processors, doesn’t do PIC!   My guess is I used whatever Microchip compiler had at the time, quite likely a customised gcc.

                              The latest versions might do what John wants:  the XC16 installer is 118Mb on linux, and might expand considerably.  It’s a customised gcc.  Note there are 4 compilers, which one is needed depends on the target PIC.

                              I’d go with MPLAB : though big, it has everything needed.

                              Dave

                               

                               

                               

                            Viewing 13 posts - 26 through 38 (of 38 total)
                            • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                            Advert

                            Latest Replies

                            Viewing 25 topics - 1 through 25 (of 25 total)
                            Viewing 25 topics - 1 through 25 (of 25 total)

                            View full reply list.

                            Advert

                            Newsletter Sign-up