Project Adventure Ranger
Project Adventure Ranger
  • 4
  • 5 645
Milling Machine Z Axis using a NEMA 34 stepper motor
******Please see updated notes at the bottom******
In this video I have used a Nema 34 (12Nm/6 Amp) to control the Z axis of my Hare and Forbes Hafco 46B Milling Machine.
The project uses Arduino technology to bring all the components together and once you get you get your head around Arduino coding, it does work. An Arduino Nano was used in this circuit which also requires it's own 5 VDC power supply.
Thanks to www.omc-stepperonline.com for providing the freehand drawing of the Arduino wiring.
This video is a follow up from fellow You Tuber Levi Verlaan's video on using a stepper motor for milling machine axis control.
Levi's video can be found here:
th-cam.com/video/VlgaDibFEfw/w-d-xo.html
Major components used:
Nema 34 12Nm 6Amp stepper motor
350W 48volt 7.2 amp power supply
DM860i Stepper Driver
Arduino Nano moodule
48 to 5 VDC step down voltage module
Emergency Stop switch
Limits switch x 2
2510 ball screw and nut
Rocker switch double pole ( see update below)
Potentiometer
LED's and diodes
10k resistors ( see update below)
***Update September 2021- As mentioned in the video I was getting some creep from the stepper motor when it was idle. After a fair bit of research and experimenting, the issue has been solved and the unit works perfectly now.
Solution:
- Replaced double pole rocker switch with two momentary switches.
- Added 10k resistor to the each of the momentary switches input line. Switch now has 5v input and then to ground on the output. Arduino signal wire between 10k resistor and input side of switch.
- Modified Arduino sketch to a "pull up" function when switch is activated, this eliminated the motor creep as the Arduino is now only seeing a definite on (1) or off (0) signal.
- New LED wiring installed to energize when up or down pressed.
An update video is in the works.
Reach out if you need a hand with this project in the meantime.
Updated coding:
// define pins
// 1-empty-
// 2-empty
// 3-Dir+
// 4- Led raise
// 5-Pulsepin
// 6-Led lower
// 8- swfor
// 9-swrev
// 10-Lim1
// 11-Lim2
int pulsepin = 5;
int dirpin = 3;
int swfor = 8;
int swrev = 9;
int Forward;
int Reverse;
int Forwardstop;
int Reversestop;
int Lim2 = 11;
int Lim1 = 10;
int Ledraise = 4;
int Ledlower = 6;
void setup() {
// put your setup code here, to run once:
pinMode(pulsepin, OUTPUT);
pinMode(dirpin, OUTPUT);
pinMode(swfor, INPUT);
pinMode(swrev, INPUT);
pinMode(Lim1, INPUT);
pinMode(Lim2, INPUT);
pinMode(Ledraise,OUTPUT);
pinMode(Ledlower, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
//Gather information
Forward = digitalRead(swfor);
Reverse = digitalRead(swrev);
Forwardstop = digitalRead(Lim1);
Reversestop = digitalRead(Lim2);
if (Forward == 0 && Reverse == 1 && Forwardstop == LOW)
{
// read the sensor value:
int sensorReading = analogRead(A0);
// map it to a range from 0 to 100:
int motorSpeed = map(sensorReading, 0, 1023, 0, 100);
digitalWrite(dirpin, HIGH);
digitalWrite(pulsepin, HIGH);
delayMicroseconds(motorSpeed);
digitalWrite(pulsepin, LOW);
Forward = digitalRead(swfor);
Reverse = digitalRead(swrev);
Forwardstop = digitalRead(Lim1);
Reversestop = digitalRead(Lim2);
digitalWrite(Ledraise, HIGH);
}
else if (Reverse == 0 && Forward == 1 && Reversestop == LOW)
{
// read the sensor value:
int sensorReading = analogRead(A0);
// map it to a range from 0 to 100:
int motorSpeed = map(sensorReading, 0, 1023, 0, 100);
digitalWrite(dirpin, LOW);
digitalWrite(pulsepin, HIGH);
delayMicroseconds(motorSpeed);
digitalWrite(pulsepin, LOW);
Forward = digitalRead(swfor);
Reverse = digitalRead(swrev);
Forwardstop = digitalRead(Lim1);
Reversestop = digitalRead(Lim2);
digitalWrite(Ledlower, HIGH);
}
else { //turn off LED lights
digitalWrite(Ledraise, LOW);
digitalWrite(Ledlower, LOW);
}
}
มุมมอง: 1 067

วีดีโอ

Hustler Bull Bar DIY installation
มุมมอง 3K3 ปีที่แล้ว
This DIY installation video shows how I went about mounting the 2020 Hustler bull bar to my 2017 PX2 Ford Ranger. These bars are awesome but supplied without instructions so hopefully this video will help you with your installation. Following my guide the installation should take about four hours and make sure you have someone to help with the actual mounting of the bar to avoid damaging your t...
Air On Board 12 volt air compressor installation
มุมมอง 1.5K4 ปีที่แล้ว
This video shows the installation of Air On Board's 446 12 volt air compressor kit into my 2017 Ford Ranger PX2. The installation is reasonably straight forward and if you would like the dimensions of the brackets that I made, contact me in the message section below. I am very happy with the installation and the performance of the air kit and deemed it worthy of making a video so you can do the...
Air On Board 12v air compressor kit unboxing
มุมมอง 1304 ปีที่แล้ว
Got Air? In this video I unbox a 12 volt 200 psi air compressor kit that I purchased through Ebay Australia. This is an independent review which may help you in choosing an air system for your vehicle. Please subscribe to my channel for more great content that's in production. You can find this item on Ebay Australia using the following link: www.ebay.com.au/itm/446-Air-compressor-universal-kit...

ความคิดเห็น

  • @minskmade
    @minskmade ปีที่แล้ว

    where did you get the coupler with the woodruff key slot...i cant seem to find those..

    • @projectadventureranger1691
      @projectadventureranger1691 ปีที่แล้ว

      Hi, thanks for reaching out. I found the coupling on eBay. Here's a link to point you in the right direction. www.ebay.com.au/itm/202155473125?mkcid=16&mkevt=1&mkrid=705-154756-20017-0&ssspo=d7IaRZrzQfe&sssrc=2349624&ssuid=JgwR_gxRSuy&var=&widget_ver=artemis&media=COPY

    • @minskmade
      @minskmade ปีที่แล้ว

      @@projectadventureranger1691 i have one like tht...did you put your key slot in?

    • @projectadventureranger1691
      @projectadventureranger1691 ปีที่แล้ว

      @@minskmade From memory it's a straight keyway on both shafts. As i didn't have a keyway broach set at the time, the coupling keyways were marked out and made using a hand file. Since then, I now have keyway broaches!

    • @minskmade
      @minskmade ปีที่แล้ว

      @@projectadventureranger1691 oh my...i have a set of broaches...but have never broached...it is not time :) thank you

  • @michaelfluck4720
    @michaelfluck4720 ปีที่แล้ว

    Would you mind posting or emailing me your final code. This is exactly what I have been looking for

    • @projectadventureranger1691
      @projectadventureranger1691 ปีที่แล้ว

      Hi Michael and thanks for reaching out. Here's the final code that I used noting the use of individual pull-up resistors in the circuit. Some arduino boards have inbuilt resistors that could also be utilised. Hope this helps in your build. // define pins // 1-empty- // 2-empty // 3-Dir+ // 4- Led raise // 5-Pulsepin // 6-Led lower // 8- swfor // 9-swrev // 10-Lim1 // 11-Lim2 int pulsepin = 5; int dirpin = 3; int swfor = 8; int swrev = 9; int Forward; int Reverse; int Forwardstop; int Reversestop; int Lim2 = 11; int Lim1 = 10; int Ledraise = 4; int Ledlower = 6; void setup() { // put your setup code here, to run once: pinMode(pulsepin, OUTPUT); pinMode(dirpin, OUTPUT); pinMode(swfor, INPUT); pinMode(swrev, INPUT); pinMode(Lim1, INPUT); pinMode(Lim2, INPUT); pinMode(Ledraise,OUTPUT); pinMode(Ledlower, OUTPUT); } void loop() { // put your main code here, to run repeatedly: //Gather information Forward = digitalRead(swfor); Reverse = digitalRead(swrev); Forwardstop = digitalRead(Lim1); Reversestop = digitalRead(Lim2); if (Forward == 0 && Reverse == 1 && Forwardstop == LOW) { // read the sensor value: int sensorReading = analogRead(A0); // map it to a range from 0 to 100: int motorSpeed = map(sensorReading, 0, 1023, 0, 100); digitalWrite(dirpin, HIGH); digitalWrite(pulsepin, HIGH); delayMicroseconds(motorSpeed); digitalWrite(pulsepin, LOW); Forward = digitalRead(swfor); Reverse = digitalRead(swrev); Forwardstop = digitalRead(Lim1); Reversestop = digitalRead(Lim2); digitalWrite(Ledraise, HIGH); } else if (Reverse == 0 && Forward == 1 && Reversestop == LOW) { // read the sensor value: int sensorReading = analogRead(A0); // map it to a range from 0 to 100: int motorSpeed = map(sensorReading, 0, 1023, 0, 100); digitalWrite(dirpin, LOW); digitalWrite(pulsepin, HIGH); delayMicroseconds(motorSpeed); digitalWrite(pulsepin, LOW); Forward = digitalRead(swfor); Reverse = digitalRead(swrev); Forwardstop = digitalRead(Lim1); Reversestop = digitalRead(Lim2); digitalWrite(Ledlower, HIGH); } else { //turn off LED lights digitalWrite(Ledraise, LOW); digitalWrite(Ledlower, LOW); } }

    • @michaelfluck4720
      @michaelfluck4720 ปีที่แล้ว

      @@projectadventureranger1691 Thank you so much. I really apprecite it. Hope to wire it up on the bench this week. Is the schematic in your video still good to go. Sorry. I am a novice when it comes to Arduino but willing to learn

    • @projectadventureranger1691
      @projectadventureranger1691 ปีที่แล้ว

      @@michaelfluck4720 Arduino can be daunting at first but luckily, there's plenty of help on TH-cam . The revised schematic is slightly different having removed the three-way switch and installing two momentary switches into pins 8 and 9 (instead of pins 5 and 6). Note the updated comments regarding the 10k pull up resistors when wiring the switches. Basically, when you push the button the 5v goes directly to ground giving a low (zero) reading, at all other times the 5v supply also feeds through the 10k resistor giving a high reading to the arduino via pins 8 or 9. As per the code, when the arduino reads low on the forward switch, low on forward limit switch and high on the reverse switch; current is supplied to the motor driver. LEDs were also installed to indicate direction.

  • @HSKY412
    @HSKY412 ปีที่แล้ว

    Hi mate. Well done on the install. I would lovethe dimensions of the brackets as you mentioned. Much appreciated

  • @braaptv6838
    @braaptv6838 2 ปีที่แล้ว

    Hello mate I have just installed the same bullbar wondering how you mounted the grill? As the grill clips into the front bumper and now only 2 bolts on top hold it, did you just zip tie it to the bullbar somewhere to hold the bottom of the grill out or

    • @projectadventureranger1691
      @projectadventureranger1691 2 ปีที่แล้ว

      Hi Braap Tv, thanks for the question. My grill still had the two lower bolt holes ( see 2m:46 sec) that I could use to hold it in place. All up there's four bolts to use for my particular model. Also note that as the bar is quite streamlined , ensure the bar is centered on the chassis with plenty of clearance from the guards. Otherwise you end up chasing a ghost rattle in the frond end.

  • @primopools1506
    @primopools1506 2 ปีที่แล้ว

    Great vid mate, really well explained! I am about to fit a similar bar to my Ranger and you've helped a heap 👍

    • @trailtrevtv5304
      @trailtrevtv5304 2 ปีที่แล้ว

      Thanks for the comment and glad it's going to help with your install!

  • @husssafi8806
    @husssafi8806 3 ปีที่แล้ว

    Amazing Video Huss

  • @Lost_Twice_Over
    @Lost_Twice_Over 4 ปีที่แล้ว

    Hi Mate, any update on the compressor and install? - Looking at getting one but cant find any reviews on them.

    • @projectadventureranger1691
      @projectadventureranger1691 4 ปีที่แล้ว

      Hi Ross, the Air On Board air compressor system is still going strong with only a fitting on the air receiver requiring a nip up. Apart from that it's been a reliable system with plenty of air available whenever it's needed. Thanks for the prompt and I should do a review now it's been installed for awhile. Good luck with your shopping and install!

    • @Lost_Twice_Over
      @Lost_Twice_Over 4 ปีที่แล้ว

      @@projectadventureranger1691 thanks mate, a review vid would be great. Can I ask the main use you have for it? (I.e. pumping up tyres? (If so which size)) and how long it roughly takes to pump them up? Also do you think the airtank makes a big difference? Cheers Ross

    • @projectadventureranger1691
      @projectadventureranger1691 4 ปีที่แล้ว

      @@Lost_Twice_Over The 6 litre receiver is very handy for running the set of train horns that I have underneath the vehicle (on a separate switch circuit of course) which is ideal for wandering animals and pedestrians. The system has not been used a great deal in anger however, I run 265/60R18 tyres and the air compressor system with a 6 litre tank will take around 3m45secs to pump the tyre up to 32psi from a near flat tyre (5psi). A tyre inflator, blow down nozzle and 6m of airline is in the tool tub just in case it's required. I have found that the supplied quick disconnect coupling is a bit average and didn't take too long to rust out. As per the video use a suitable liquid thread sealant on all your joints.