30w low voltage PWM controller

Advert

30w low voltage PWM controller

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

Viewing 25 posts - 1 through 25 (of 30 total)
  • Author
    Posts
  • #801734
    Michael Gilligan
    Participant
      @michaelgilligan61133

      These little ‘1803BK’ modules are all-over ebay, etc. at a range of prices … but I wondered what chip they used.

      https://www.ebay.co.uk/itm/267127192017

      .

      All was revealed when I found this page:

      https://quagmirerepair.com/pwm-low-voltage-dc-motor-speed-controller-1-8-15vdc-30-watt-1803bk.html

      Yes folks, in mid-2025 the 555 timer is still alive and kicking

      MichaelG.

      Advert
      #801775
      Bazyle
      Participant
        @bazyle

        My first task on starting work in ’77 was something similar with a555 and a 2N3055. Not sure what driver trany I used but 2N2926 was just becoming popular.

        #801777
        noel shelley
        Participant
          @noelshelley55608

          In any history of electronics, the 555 and the 2N3055 will always be mentioned. Happy days ! Noel.

          #801787
          Michael Gilligan
          Participant
            @michaelgilligan61133
            #801800
            Robert Atkinson 2
            Participant
              @robertatkinson2

              A lot of manufacturers have stopped production of the older “staple” devices like the 555  and even basic 78xx/79xx voltage regulators. Probably a combination of low demand and reducing capacity for the older silicon production processes. Sometimes the manufacturer will switch to a newer silicon process which can have unforseen consequences. Mant years ago I was asked to investigate a drive interface for 20 pneumatic solenoid valves. It was driven by a PC and bothe the hardware and software had been in use for years with no failures. Suddenly customers started complaining of inconsistent operation. This was costing them significant amounts of lost production. Long story short the driver IC manufacturer had changed to a “better” silicon process. They didn’t change the part number or even revision of the chip as it fully met the published specification. The new chip was actually much faster than the old one. This alone was not an issue. The PC based software was the other half. It had been poorly written and didn’t meet the required timing of the signals that were input to the ICs. The old chips were too slow to notice but the new ones weren’t and mis-interpreted some sequences. The chip manufacturer eventually admitted they had changed the silicon. Re-writing the software with correct timing fixed the issue and actually increased operating speed of the whole process increasing production.  Apparently the original software writer had trouble  with it as first produced years previously but rather than find the actual problem and fix it they just slowed it down until it worked!

              For a PWM driver these days I’d use a PIC microprocessor. This allows advanced features such as slow start on power up or a no-power release. An advanced 8 pin divice like a PIC12F1822 has built in precision oscillator, hardware PWM and an analog to digital converter (ADC). The ADC can be used to read a potentiometer for a classical hardware “knob” interface.
              The PIC is about the same price as a 555.

              Robert.

              #801808
              John Haine
              Participant
                @johnhaine32865

                Ah Robert, but the PIC won’t support that neat 555 “feature” that crowbars the supply rails when it switches!

                #801829
                Robert Atkinson 2
                Participant
                  @robertatkinson2

                  That was ony the original. Hopefully they are using the CMOS version 🙂

                  #801837
                  SillyOldDuffer
                  Moderator
                    @sillyoldduffer

                    I’ve long had a love-hate relationship with the NE555!   Pure genius with some gotchas.   The original chip tended to crowbar the supply line when the output switched, causing hard to diagnose faults.  The later CMOS 555 fixed that.   The NE555 is remarkably versatile, used in a multitude of clever circuits, but some applications push it too far – they work, but not very well.  Not accurate as a timer, nor do they cope well with long periods.   And a lot of extra electronics are needed to do complex control.

                    In contrast most microcontrollers support the various shades of PWM on several pins, and many are powerful enough to convert G-code into multi-axis motor movements as well.  An NE555 does only one PWM, whilst a microcontroller does ‘n’ plus complex control.    And,  as Robert says, because a smart PWM capable microcontroller costs about the same as an NE555, so the NE555 is being gradually squeezed out.

                    Bottom line, whilst the NE555 is super-clever and excellent for basic electronics, it’s limited!  Learn to program if anything complicated is needed, now or in the future.

                    PIC vs the alternatives is an interesting debate.  I’m prejudiced against PIC because it wasn’t beginner friendly when I first tried it.   Last time I checked, about 5 years ago, PIC was still harder to use than it need be.  Pity, because PIC chips are functionally very good.   It’s just easier to get the same results from an Arduino, Nucleo or any other mbed platform.   Now I’ve learned Arduino and mbed, PIC would have to do something very special to lure me away.  Unlikely to happen.

                    Dave

                    #801854
                    Robert Atkinson 2
                    Participant
                      @robertatkinson2

                      I started with PICs before Arduino etc back in the mid 90’s. Iv’e never got on with C but have found PicBasic (laterly PicBasicPro https://pbp3.com/ there is a free version for hobbyists) to be more than capable and you can also imbed a bit of machine code if you need to. It’s complied so fast and doesn’t eat resource with an operating system or interperter. You can easilly access hardware and registers but there are built commands for common stuff.
                      One thing that put me off the original Ardunio UNO was that they offset the two 0.1″ headers by half a pitch. This means you can’t mount it directly on a standard prototyping board or eurocard. Or build a “hat” on protoboard. Why did they do that? The only thing I can think of was to force you to buy their hats and interface boards. Until the clones came out at least.

                      PICs are cheap, capable and can be used in minimal systems. Another big advantage is that they are electrically quiet compared to the more powerful modules. This is important if you want to meet interference regulations. I must admit though that Microchips tools and support seem to have gone downhill since they bought out Atmel and Microsemi.

                      I’m a hardware person not a programmer and got annoyed when the “proper” progrmmers demanded more memory or more powerful processors because they were using software to do tasks that the chip had hardware to do e.g. PWM and serial communications and the external circuitry was designed to use. Often I’d alread proved the prototype with PicBasic code.

                      Robert.

                      #801884
                      John Haine
                      Participant
                        @johnhaine32865
                        On Robert Atkinson 2 Said:

                        ……
                        One thing that put me off the original Ardunio UNO was that they offset the two 0.1″ headers by half a pitch. This means you can’t mount it directly on a standard prototyping board or eurocard. Or build a “hat” on protoboard. Why did they do that? The only thing I can think of was to force you to buy their hats and interface boards. ….

                        Indeed.  Apparently the reason is that they were up against a manufacturing deadline doing a respin of the layout and made a mistake, offsetting some of the pins along one side.  Only found out when the first batch of boards came back and they had to get them out of the door ‘cos no money to correct.

                        #801885
                        John Haine
                        Participant
                          @johnhaine32865

                          I’ve got two PIC programmers and two batches of chips, and I want to load the picPET code but as Robert and Dave say they aren’t that easy to get to grips with compared with Arduino – and now RPi Pico.

                          #801926
                          Robert Atkinson 2
                          Participant
                            @robertatkinson2

                            What programmers and chips do you have? Programming a PicPet should be straight forward. You don’t need to write any code or even compile anything. I can help you with this.

                            #802085
                            duncan webster 1
                            Participant
                              @duncanwebster1

                              So if the 7805 is past its sell by date, what do I buy when my stock runs out. Hopefully same pinout, but i should be so lucky

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

                                So if the 7805 is past its sell by date […]

                                Relevance ?

                                MichaelG.

                                #802089
                                John Haine
                                Participant
                                  @johnhaine32865
                                  On Robert Atkinson 2 Said:

                                  What programmers and chips do you have? Programming a PicPet should be straight forward. You don’t need to write any code or even compile anything. I can help you with this.

                                  Chips are 12F475, I have a pickit 3 and a Velleman programmer.  The (machine) code is already in hex so no compilation needed.  TBH when I got the devices and programmers I was busy with something else and though I had a quick try I didn’t persist.  I should have another go.

                                  #802092
                                  Robert Atkinson 2
                                  Participant
                                    @robertatkinson2

                                    Hi John,

                                    Th PicKit3 will do the job. However I suggest you use the earlier MPLAB 8 software not the latest MPLAB X. Mplab X supports the Atmel devices as well as PICs making it harder to navigate.  You can download MPLAB 8.15 here https://melabs.com/downloads/mplab_v815a.zip

                                    There is non-microchip simple software for the PicKit 2 and 3 called PICkitminus. The non installed version is here https://github.com/jaka-fi/PICkitminus/releases/download/v3.27.01/PICkitminus_3_27_01.zip and installed here https://github.com/jaka-fi/PICkitminus/releases/download/v3.27.01/PICkitminus_installer_3_27_01.zip  I’ve not used it much but it’s pretty simple.

                                    You need an adaptor between the pic and the PicKit3 This is just a 6 pin .1″ pin header to 8 pin DIL socket.
                                    You only need 5 connections. These are 0V, +5V, /MCLR, ICSPDAT, and ICSPCLK.

                                    That is PK3 pin 1 to DIL 4 (/MCLR), Pin 2 to pin 1 (VDD +5V), pin 3 to pin 8 (VSS 0V), pin 4 to pin 7 (ICSPDAT) and pin 5 to pin 6 (ICSPCLK). Pin 6 of the Pickit3 does not need to be connected.

                                    HTH Robert.

                                    #802102
                                    SillyOldDuffer
                                    Moderator
                                      @sillyoldduffer

                                      Two steps are called programming when working with microcontrollers.   Just to confuse!

                                      The first is writing the application, which is usually done on a big computer like a PC.  It hosts an editor, cross-compiler, linker and the standard and user developed libraries.  Much else too, depending on the language and target.   C/C++ comes with a preprocessor that sorts out macros and definitions plus many other development tools.  Maybe a debugger.   C/C++ produces executable code, whilst languages like BASIC & Python usually compile tokens for a run-time interpreter.   There are pros and cons to both.   C/C++ rules if code must support big projects that are performant and efficient, but the language and tool-set are hard to learn. BASIC is easier, but suits singleton programmers and small projects.  BASIC is generally avoided by professional programmers for various reasons. One is hell erupts when BASIC reaches it’s limits!  Very little to be done apart from re-write the project in another language or to redesign the PCB to fit a more powerful microcontroller, ouch.  During application development, the microcontroller needn’t be plugged in, and a lot can be done without knowing what it will be.   The output is usually a hexadecimal file, hidden behind the scenes by the Arduino IDE.

                                      The second step transfers the hexadecimal file to the microcontroller, also called ‘programming’.  I prefer ‘firmware installation’.   The hex file comes with a myriad of settings necessary to write the binary program correctly into the microcontrollers read-only memory.  Writing to ROM may need a high voltage to be applied to a pin, plus timing and other complications.

                                      It’s the second step that causes PIC bother because loading firmware can be fiddly.   My first PIC project called for an expensive commercial box, which, for £150 in 1985 money, supported many of the PIC family, whilst other expensive boxes didn’t.   Not having £150, I bodged a PIC programmer with some transistors driven by the PCs parallel port.   Hairy stuff, and it took me ages to suss out why it didn’t work – to do fooling with the Brown-out Detector, or if you prefer, to me misunderstanding the datasheet!   Pleased to say PIC programmer prices are much more reasonable today!  Even so, interesting that several projects use Arduino as PIC programmers, but no-one has programmed a PIC to write firmware to an Arduino.  Not because PIC can’t do that, probably because there’s no call for it.

                                      With some exceptions, uploading firmware to an Arduino is much easier, all done through the USB port. Nothing special needed, unless you want to program the chip directly.   That isn’t difficult either.

                                      Dave

                                       

                                      #802106
                                      Michael Gilligan
                                      Participant
                                        @michaelgilligan61133

                                        A naive question, if I may:

                                        What do you clever chaps think of the PICAXE ?

                                        Is it a useful alternative, or just a ‘Toy’ that burdens the Pic with too much baggage  ?

                                        MichaelG.

                                        .

                                        Ref. https://picaxe.com/what-is-picaxe/

                                        #802117
                                        Robert Atkinson 2
                                        Participant
                                          @robertatkinson2

                                          Picaxe is OK but it is interpreted Basic so uses resources and is slower than a compliled basic like PicBasicPro 3. And of course you have to pay for the compliler on every chip you use and you have to use their chips. No real advantage over even the free version of PBP3 which only restricts the choice of chips you can use. The clones of a PicKit3 mae programming easy. I woudn’t normally recommend clones but Microchip have discontinued the Pickit3 and the Pickit4 is expensive.

                                          #802122
                                          Michael Gilligan
                                          Participant
                                            @michaelgilligan61133

                                            Thanks for that, Robert

                                            MichaelG.

                                            #802130
                                            John Haine
                                            Participant
                                              @johnhaine32865

                                              Thanks for that suggestion Robert, it looks more straightforward than the Microchip IDE! I’ll give it a try. I have the programming adapter with 6 pin header and a zif connector.

                                              #802181
                                              John Haine
                                              Participant
                                                @johnhaine32865

                                                Well the programming adapter might well work but its documentation is practically nonexistent!  So I put a device on a breadboard, used flying pin leads to connect following your guidelines Robert, and everything worked perfectly!  I haven’t actually tested the picPET yet but at least it seems I can program them.  (And I have used pre-programmed ones before.)

                                                Many thanks for your help!

                                                #802182
                                                Robert Atkinson 2
                                                Participant
                                                  @robertatkinson2

                                                  Happy to help.

                                                  #802192
                                                  Bazyle
                                                  Participant
                                                    @bazyle

                                                    The Picaxe was the computer used for teaching in schools about 15 years ago so while limited in power if your intention is to rival chatgbt but easily capable of the things that often come up on here like a stepper motor driven table feed. As it was for children it was simple enough for those with only 3 brain cells though perhaps that is asking too much of the current crop.
                                                    The equivalent now is the BBCMicroBit for schools use so can be programmed with a drag and drop website – google it and try the simulator. Being the current item it is probably the cheapest solution unless you want to go to chip level.

                                                    #802201
                                                    IanT
                                                    Participant
                                                      @iant

                                                      I have a number of “PWM” controllers, all based on Micomites/Picomites + a power driver

                                                      A Picomite is very easily set-up by just dragging the UF2 firmware into the Pico (no programmer required). For smaller programmes the inbuilt editor is quite useable but I tend to use MMEdit these days as I don’t then need TeraTerm and I can just download/edit at the click of a button.

                                                      As I’ve stated here before, with most modern micros, ‘speed’ isn’t a really problem. Picos will run at 380Mhz – although I’m running my latest Picos (2’s with HDMI) at 315Mhz. If you are not designing for commercial use (e.g in small numbers) then the cost of hardware isn’t going to be an issue for most people. Getting it work (time consumed) might be though.

                                                      I purchased some Pico 2s recently and they cost £5.70 each (with header pins – they are £4.80 without). The original Pico (1) is still under £4.  If form factor/size is an issue then a Waveshare RP2040 Zero can run the PM firmware too.

                                                      https://www.waveshare.com/rp2040-zero.htm

                                                      I’ve recommended Picomites here before because they are both cost effective and very easy to use (and very quick to debug). I am not a professional programmer and nor (I suspect) are most others here. The Picomite is now an extremely powerful platform that can be deployed in a number of modes. I use them as both embedded controllers and as standalone systems (using LCD, VGA & now HDMI displays). The Pico 2/HDMIs can display a 1024×768 image in monochrome, with various other display modes including 256×192 in 256 colours with colour mapping to an RGB332 palette! What I would have given for one of these 40 years! 🙂

                                                      As an aside – I’m in the process of building two of these as ‘Boot-to-Basic’ systems (for two of my Grandkids) using Waveshare 10″ HDMI displays. I think they will cost about £50 each when finished (inc keyboard/SD card etc) – the 10″ dispay being about half the cost. I will admit to making the mistake of offering to build a system for my Grandson within hearing distance of his sister (who immediately stated that she would like one too!)  Fortunately they won’t break Granddad’s piggy bank.

                                                      https://www.waveshare.com/pico-dvi.htm

                                                      PLEASE NOTE: You need an adaptor to run a Pico2 with these older Waveshare dispays, as they were originally designed for the Pico 1 (the Pico 2 now has special display hardware inbuilt). This one was designed by a friend and makes the required pin changes and adds 32Gb storage, keyboard (VGA or USB) RTC etc. I ordered ten of them, which cost me under £13 (inc delivery) – quite remarkable value at just over a £1 a PCB.

                                                      Waveshare_10-adaptor

                                                       

                                                      I digress.

                                                      You can very simply control PWM based motor drivers using a using a Picomite. Here is the full PWM ‘Command’ line.

                                                      PWM channel, frequency, [dutyA] [,dutyB][,phase][,defer]

                                                      How you choose to ramp up/down the duty cycle etc is up to you – a simple loop will do it. Once running, a PMW channel doesn’t need any other processor attention btw – until you want to stop it or change something…it just runs

                                                      “There are 8 separate PWM frequencies available (channels 0 to 7) and up to 16 outputs with individually controlled duty cycle. You can output on either PWMnA or PWMnB or both for each channel – no restriction. Duty cycles are
                                                      specified as a percentage and you can use a negative value to invert the output (-100.0 <= duty <=100.0)

                                                      Minimum frequency = (cpuspeed + 1) / (2^24) Hz. Maximum speed is OPTION CPUSPEED/4. At very fast speeds the duty cycles will be increasingly limited. Phase is a parameter that causes the waveforms to be centred such that a wave form with a shorter duty cycle starts and ends equal times from a longer one. Use 1 to enable this mode and 0 (or omit) to run as normal “

                                                       

                                                      Regards,

                                                       

                                                      Iant

                                                       

                                                    Viewing 25 posts - 1 through 25 (of 30 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