element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
NI LabVIEW Community
  • Products
  • Dev Tools
  • NI LabVIEW Community
  • More
  • Cancel
NI LabVIEW Community
LabVIEW Challenge Blogs LabVIEW Challenge - Project Blog RSC - RPi Pico Blower Motor Control
  • Blog
  • LabVIEW Challenge Blogs
  • Forum
  • Documents
  • Quiz
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join NI LabVIEW Community to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rsc
  • Date Created: 1 Nov 2023 7:55 PM Date Created
  • Views 1727 views
  • Likes 11 likes
  • Comments 13 comments
  • labview 2023
  • pico and labview
  • LAbVIEW challenge
  • A Course in LabVIEW and Test Automation
  • scpi
Related
Recommended

LabVIEW Challenge - Project Blog RSC - RPi Pico Blower Motor Control

rsc
rsc
1 Nov 2023

I applied for this challenge since I've been using LabVIEW off and on for 20 years.  I found out that much has changed in the past few years that I was not aware of.

The 10 Lessons on Element14 were a good refresher, Lesson 10 about using a RPi pico as an instrument being interesting.  I've used GPIB instruments in the past, so the protocol is familiar.

I have several NI Daq boards around the lab used for various projects, so I just picked one and here's what I learned.

There are issues with DAQmx and LabVIEW compatibility

NI-DAQmx and LabVIEW Compatibility Table can be found here:

https://www.ni.com/en/support/documentation/compatibility/16/ni-daqmx-and-labview-compatibility.html

>>Using incompatible versions may result in errors, missing LabVIEW palettes or functions, or devices and tasks failing to show up in NI Measurement & Automation Explorer (MAX).

After 2019-2020, NI limited supporting the NIDaqMX assistant subVI.

image

I'm sure every .vi file I have written in the past 10 years uses the DaqMX assistant, so using a new version of LabVIEW is already a challenge.

I downloaded and installed the 2023 version of LabVIEW without too many problems.

I plugged in a NI USB-6009 DAQ board and it was recognized by the NI Device Monitor.

image

I opened a new .vi and tried to load the DAQmx assistant, but it would not compile and gave me a coding error.

image

Instead of reloading an old version of LabVIEW, I searched for an example .vi that doesn't use the DAQ Assistant.

There's a new way to search for example .vi files

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000004B6mSAE&l=en-US

image

So I connected the Analog input 0 to the 2.5VDC reference pin and ran the Analog Input example to see what it was.

image

The .vi of the example was exactly what I was going to make for this project!

image

So instead of a Data Acquisition system project, I will control my new CNC laser air assist blower motor using the Raspberry Pi Pico.

I'm upgrading my Laser engraver to 10W and the laser module came with an air assist port, but no blower.

image

It took me a while to mount the new laser on the old frame.

image

I found a nice Ametek BLDC miniJammer blower motor in in a box of stuff, so let's see if I can control it with the RPi pico using LabVIEW.

https://us.rs-online.com/m/d/c660b13dfa6bef51f52fa7e26bfa91be.pdf

image

I had to take apart the motor to figure out the pinout of the connector - none of the documents online showed a pinout.

image

There are only 3 pins, so I traced the pins back to power and ground pins on the ICs, and assume the last pin is the 0-4VDC control pin as the spec sheet states.

image

image

I made a frame for the blower motor from 1 inch 80/20 strut .

image

I wired up a 24VDC power supply to test the blower.

First blower motor test using a 10K control potentiometer.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

So I will use the Analog out PWM signal from the Rpi pico to control the blower control pin.

The example .vi front panel shows this:

image

My test LED is working with the PWM signal.

image

image

The Scope confirms the PWM signal from the Pico.

Here is a video of the system with LabVIEW controlling the RPi Pico controlling the blower motor

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

I changed the front panel design for controlling the blower with a dial and reading back with a gage.

image

Here is the modified block diagram.  I have multiplier blocks added so the units are 0~100 percent instead of 0-4095 counts.

image

Here is a video of the final solution before I mount everything on the Laser engraver.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Home · jancumps/pico_scpi_usbtmc_labtool Wiki · GitHub

image

I found the wiring pinout for the original laser module online

https://forum.snapmaker.com/t/reverse-engineering-the-module-wiring/3031/8

pin 1: +12V
pin 3: (inverse) Enable, PWM input
pin 5: 130 Ohm resistor to GND as module identification
pin 7: GND
pin 2,4,6,8: N.C.

I needed to invert the PWM signal from the CNC machine to the new laser and limit it to 0-5VDC, so I made a small PCB with a 5V regulator and a 74LS04 invertor IC.

I also needed the 130 ohm to GND resistor to identify the laser module.

The new laser uses a couple amps more than the system power supply is rated for, so I added its own 12V, 10A power supply.

image

image

It tested OK on the scope.  The PWM signal was inverted and limited to 5VDC

image

Now to add the blower and test it.

image

I need a file with some G-Code to fire up the laser and set it at about %1 or 100mW, the default is %78 or 7.8W - way to high for testing!

image

Here's G-Code for a small shape:

image

;; G-code for laser engraving
; Generated by Snapmaker Luban
; G-code START <<<
G90
G21
M106 P0 S255
G0 F3000
G1 F140
G0 X-0.17 Y10.73
M3 P3 S7
M3
G1 X-10.75 Y3.04
G1 X-6.71 Y-9.41
G1 X6.38
G1 X10.42 Y3.04
G1 X-0.17 Y10.73
M5
G0 X-0.17 Y0.66
M107 P0
; G-code END <<<

That's certainly a firmware mod I need to investigate.  I could use the LabVIEW interface to override the laser PWM settings....maybe later.

Here's a run with the laser operating:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • rsc
    rsc over 1 year ago in reply to Jan Cumps +1
    Yes, sorry about that - it's been a long week.
  • shabaz
    shabaz over 1 year ago

    Interesting project. Nice blower demo! 

    Good to see the PST and PWM in action.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 1 year ago in reply to rsc

    lucky for me, I'm a part timer. Had a rough week too, but it's weekend Slight smile

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rsc
    rsc over 1 year ago in reply to Jan Cumps

    Yes, sorry about that - it's been a long week.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 1 year ago in reply to rsc

    ah,  in normal mode?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 1 year ago in reply to rsc

    I still have a small pulse seen on the scope

    What worries me is that that's not a small pulse. It I compare that eye-to-eye with my scope screen, that's a value of around 200. 5% duty cycle.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube