Build Thread PWM signal SPD CTRL for laser etcher/cutter fan and compressor.


Results 1 to 9 of 9

Thread: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

  1. #1
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Default PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    In a nut shell, I am building a custom controller for controlling upto two PWM devices with phase correction, manual speed ctrl adjust, and laser activity monitor function. I'll be posting my PCB artwork, schematics, and code as I build tune and finish them. The basic operation works like this, my LASER ETCHER that is getting closer to finished needs a custom controller to drive the speed of both the dual 7k RPM 120mm fans (both outputs) and a medical diaphragm BLDC based air VAC and pump C183-22-01. The fans are for pulling out the smoke and floating ash. The pump is for blowing the smoke away from the work area and clearing the work area for a better cut. The fans can move upto 250CFM each, the pump is capable of upto 5L/min. 5L/min pushed though a small tip is very powerful. If there is no laser activity for 5-10 seconds depending on the final design, the PWM devices will follow a preset action of turning off or running at low power. When signal is detected or a manual on switch is is chosen. The PWM devices will read the POT settings and operate as set while constantly monitoring the input laser signal for a change of function based on a timer. If I'm cutting paper or very thin materials they could get blown away. there for speed control is a must. My design uses an ATTINY85, 2 POTS, one input from laser and two outputs to the PWM pins of the fans in parallel, and the single compressor. If the fan or compressor pots are adjusted the devices will run at that adjusted speed for 5-10 seconds and then follow the state of the laser signal input. If there is no laser signal present and or if a manual switch is not on. Then the fans will drop to a pre-set minimum speed/PWM and the compressor will shut off. The signal pin could have custom firmware written to read a serial signal rather to have software control over the devices. But for now I'm leaving the system simple. Schematic and pcb may not be complete as of this posting. I'll post final versions when done and tested and source files.
    PWM signal SPD CTRL for laser etcher/cutter fan and compressor.-fan-pump-ctrl-sch-jpg PWM signal SPD CTRL for laser etcher/cutter fan and compressor.-fan-pump-ctrl-brd-png

    Similar Threads:
    Last edited by berin; 05-04-2021 at 06:00 PM.


  2. #2
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Default Re: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    Ok I'm very glad I fell asleep early last night. I just discovered I forgot to add an opto isolator for the laser input. I should finish my pcb artwork and get it milled tonight. if I do I'll post my results and GCODE if anyone desires to build it. arduino code will come later for the attiny85. I am designing my CODE off of that for a reference. I just need to add POT input code to adjust the pwm output values for now. Until I do some tests I dont know what the minimum PWM signal MY.. special fans and air pump require.



  3. #3
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Default Re: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    Here is the gcode file in a zip file I could have etched the copper PCB but I chose to use my cnc machine. there are 3 files, the drill file the pcb traces file and the cut out file. all assume you are using a .5mm rasp bit and the top of the PCB copper is Z0. The files also assume the pcb is 1.5mm thick.. The only thing I didnt do because I did it using my cnc control software was FLIP the drill/mill files for the main PCB. anyone who uses these files remember they are not flipped and need to be mirrored on X axis. Sorry no code yet for programming the attiny85 I'll get to that as time allows. BOM. 78L05, ATTINY85, .1UF CAP, push button, 2x 4 pin JST, 2x 3 pin JST, 4X 2PIN jst, 1x screw terminal. 2x4 DIP socket. PLEASE LET ME KNOW IF ANYONE uses these files and likes them.
    PWM signal SPD CTRL for laser etcher/cutter fan and compressor.-fan-pump-ctrl-brd-png

    Attached Files Attached Files


  4. #4
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Default Re: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    final version controller built. No coding done yet. I will upload the final versions kicad build schematic/pcb and hand designed GCODE files for anyone with a cnc machines that can do pcb milling.



  5. #5
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Default Re: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    This is just a TEASE, and YES I FREAKING KNOW the uC is a pic chip. I just used it as a heat wick while soldering the socket into place. I have one change to make to the board that I didnt discover till I started soldering the board up "OPTO isolator resistor". To night I'm going to start working on code.
    PWM signal SPD CTRL for laser etcher/cutter fan and compressor.-20210507_183012-jpg



  6. #6
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Lightbulb Re: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    WORKING FINAL DESIGN
    Use my designs at your own risk they are with out warranty and I am not to be held responsible for any damages, injuries' or fire etc.... this is a DIY for educational purposes only disclaimer. Please make sure to DBL check your 78l05 pinout, if its backwards you will pass 11.5v to the "+5v vdd" of the attiny85 socket. That may or may not damage the 78l05 regardless its a pain to de-solder and turn around. PLease use a DMM digital multi meter and check all traces and connections and test the working voltages with a 12v psu seated into the screw terminal, before plugging in the attiny85, fans or any thing into the jumpers.

    This zip file has working code for one output for the attiny85, I'm having some trouble getting the dual independent control working I'm not that great at coding. And there are other features that are not even implemented yet! if anyone is good at arduino coding please let me know. This file contains the final KICAD pcb artwork, my working GCODE file, and the attiny85 INO code. Things to be aware of. currently the code is only using A3-PIN#2 analog input, and D0-PIN#5 output to drive the fan(s). A2 input and d1 output are not setup and coded fully yet, there is code that has been commented out for anyone who knows what they are doing There is no phase correcting, or MAP() function to scale ranges of values as of yet. My kicad pcb artwork has the final corrections in it for anyone wanting to build my project, it also has all labels of all headers and connections. Please be aware my GCODE REQUIRES OR EXPECTS a 5mm rotary rasp for cnc PCB milling. These bits will mill the traces drill holes, mill larger holes and cut out the PCB board. FYI THEY ARE SLOW and do not ware out but break very easy if careless. My cnc machine spindle runs at 15k-rpm 50mm/min with these bits, sorry any faster and they break. The top of the PCB is work plane zero X0Y0Z0, which means my gcode z axis works in negative space or subtractive machining.

    If anyone is able to help with the coding the overall working plan is this:
    two independent pwm signals D1, D0 OUTPUT. with there own POT inputs A3, A2. D2 is laser activity input with a jumper for a switch to control manual on or auto activity. All outputs run at there set POT values when laser activity is detected and continues running at set speeds for 10 seconds after loss of input. If the value of the POT(s) is/are adjusted the device will run at the adjusted speed for 10 seconds after adjustments changes have settled/stopped with no laser activity input high. when the time out event happens the fan(s) should drop to a minimum rpm and compressor should turn off. A future desire would be to add serial intput with hand shaking for serial control of speed values with gcode if the motion controller supports it. Pin1 RST is tied to a button for reset, there is also a header on the board to make use of the last I/O if someone wants to add code for it.


    PHP Code:
    /*
     *                                       ATtiny85
     *                                    -------u-------
     *               RST - A0 - (D 5) --| 1 PB5   VCC 8  |-- +5V
     *                                  |                |
     *               POT   A3 - (D 3) --| 2 PB3   PB2 7  |-- (D 2) - A1  AUTO LASER INPUT/MANUAL INPUT
     *                                  |                | 
     *               POT   A2 - (D 4) --| 3 PB4   PB1 6  |-- (D 1) - PWM --> Pump or air assist flow control
     *                                  |                |      
     *                           Gnd ---| 4 GND   PB0 5  |-- (D 0) - PWM --> Fan Blue wire
     *                                  -----------------
     */ 


    Last edited by berin; 05-09-2021 at 09:43 PM.


  7. #7
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Default Re: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    I have written a new version of code, I have not tested it yet but it should give working independent PWM signals for both the air compressor and the fans, pwm input signals. This weekend when I get to testing it I'll post the code depending on the results. regardless this codes only function is to give two pwm signals with out any other active functions as of yet. I have also swapped the POT input signals assignments to controlling the air pump and the fans. not that it matters and can be changed easy if needed it just works better for my personal project.

    https://pastebin.com/HXtLp47u here is a pastebin if you folks want to look at it before I post the final tested code.



  8. #8
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Default Re: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    If anyone tested any versions of my code please give me a review



  9. #9
    Member
    Join Date
    Apr 2004
    Location
    United States
    Posts
    207
    Downloads
    2
    Uploads
    0

    Default Re: PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

    I just realized that my pastebin is missing a "" } """ at the very end/bottom of the code. SORRY to anyone who was not able to compile it. Remember its written for an ATTiny85



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

PWM signal SPD CTRL for laser etcher/cutter fan and compressor.

PWM signal SPD CTRL for laser etcher/cutter fan and compressor.