Go Back OFN Forums > Shop and Tool Talk > Benders and Bending

Benders and Bending Which bender is best? How do you use a bender? How do you calculate bends? Everything Bender related...


Benders and Bending Which bender is best? How do you use a bender? How do you calculate bends? Everything Bender related...

Reply
 
Thread Tools
  #1  
Old 06-19-2015, 02:53 AM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
tube bender digital readout

I've seen the tube bandit which is what inspired me to start to make a display for my tube bender using a arduino uno micro controller I've made a prototype now using a and costing
1. cheap Chinese rotary encoder 17
2. Adafruit 4x 7 segment display 12
3. Arduino uno chip set and voltage reg 6
4. On off switch 1

At the money in looking at the code to try to be able to set a value into it so I could run a solenoid output one is all finished and running.
Has anyone in here used the arduino or also made there own system? There are a few other costs involved I. E. A box to house it in one finished.
I will try to get some photos up over the weekend for anyone interested

It is by no means a finished product or is it fool proof is still in prototyping stage at the moment but I will be more than happy to share the code and circuit description etc to anyone interested as it's a open source device


Adam
Reply With Quote
  #2  
Old 06-19-2015, 03:11 AM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
Click image for larger version

Name:	20150619_070610.jpg
Views:	121
Size:	60.8 KB
ID:	8198

Click image for larger version

Name:	20150619_070618.jpg
Views:	108
Size:	60.0 KB
ID:	8199

Some photos of the project
Reply With Quote
  #3  
Old 06-19-2015, 04:27 AM
vidio1's Avatar
vidio1 vidio1 is offline
Junior Fabricator
 
Join Date: Dec 2007
Location: Western Ky.
Posts: 27
http://www.swagoffroad.com/U-Turn-Tu...-Out_p_70.html


This would probably save you a lot of time if you have one of the popular benders out there.
Reply With Quote
  #4  
Old 06-19-2015, 09:38 AM
fabcam's Avatar
fabcam fabcam is offline
Site Admin
 
Join Date: Aug 2004
Location: MN
Posts: 4,568
Please keep us informed as you continue.

.
__________________
The Designers of Bend-Tech Products
www.Bend-Tech.com
Bend-Tech Dragon web site:
http://www.BendTechDragon.com

Cris Merry
Phone: 651-257-8715
Cris@bend-tech.com

Reply With Quote
  #5  
Old 06-19-2015, 11:21 AM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
Quote:
Originally Posted by vidio1 View Post
http://www.swagoffroad.com/U-Turn-Tu...-Out_p_70.html


This would probably save you a lot of time if you have one of the popular benders out there.
Thankyou I've looked at these and also bought the dro that someone put up on here but decided to have a go at this. The arduino had enough inputs and outputs to possibly run a output decided from a setpoint so it could be running a output to a valve block to run the hydraulics. I have had this working with a variable resistor but there was to much fluctuation on the input causing the output to flicker on and off when it was near the setpoint. I need to change it to another rotary encoder like you have in a car stereo or microwave to adjust the setpoint and set a value in the program so it's a definitive setpoint.
Adam
Reply With Quote
  #6  
Old 06-19-2015, 12:21 PM
alwaysFlOoReD's Avatar
alwaysFlOoReD alwaysFlOoReD is offline
Master Fabricator
 
Join Date: Jan 2010
Location: Red Deer,AB Canada
Posts: 708
Another vote for more info.
Reply With Quote
  #7  
Old 06-19-2015, 12:41 PM
vidio1's Avatar
vidio1 vidio1 is offline
Junior Fabricator
 
Join Date: Dec 2007
Location: Western Ky.
Posts: 27
If you add debouncing to your sketch it should smooth it enough to be usefull
Reply With Quote
  #8  
Old 06-19-2015, 12:46 PM
TheBandit's Avatar
TheBandit TheBandit is offline
Instagram @chevyhotrodder
 
Join Date: Jan 2006
Location: Ventura County CA
Posts: 4,361
Adam,

Those photos look very familiar. I was in the same place about ten years ago. I am not familiar with the particular Arduino micro you are using, but I have made a few variants of this type of control system and can offer some advise. Also in case you don't know, the Tube Bandit was my brainchild and I also built a pretty neat auto-stop tube bender in college. :)

Before I get into this, take a look at my bender thread (link here) and videos:
Initial Hydraulic Test - http://bender.xtremefabricator.com/BenderTest.wmv (2mb)
First Tube Bending Test - http://bender.xtremefabricator.com/BenderTestTube.wmv (18mb)
NC Controller Test- http://bender.xtremefabricator.com/BenderTestNC.wmv (5mb)
For everything below, I'm going to assuming your objective is to have a digital readout and autostop function for a Hossfield/PT105/JD2M3 type of bender, driven by a hydraulic cylinder.

Encoder and Mounting
The encoder should be of sufficient resolution to allow at the very least 0.5 degree increments. I prefer the 0.1deg resolution incorporated on Tube Bandit because you can get very consistent results, but keep in mind due to tubing material variation and slop in the bender, you are likely to see some variation in your zero position and the output angle at this resolution. The same variation exists with lower resolution, you just aren't able to detect it.

You have a choice of incremental or absolute encoders. The later is better, but more expensive by far, so the incremental you've chosen (looks like a Koyo?) should work great. With incremental encoders, you will get two signals that you read in quadrature to "count" movement and determine direction. Depending on how you read the two singals, you can obtain 4 times the resolution of the number of pulses; i.e. if the encoder has 900 pulses per revolution, you can read this at 4x and obtain a resolution of 3600 counts per revolution (perfect for 0.1deg increments).

Tube Bandit used a compact optical encoder with 300ppr. It was 3x "geared" through a belt-pulley system to produce 900 pulses per revolution of the die and read in quadrature to obtain 3600 counts per revolution.

The mounting of the Tube Bandit encoder and the overall design is something I was never 100% satisfied with in part because the pulley/gearing components added needless cost and complexity, but this design lent itself to easy bolt-on which was a primary objective for me at the time. For your design, I would recommend a 1:1 drive system directly off the center of the die. You can achieve this by adding a set screw in the side of the die that locks it with the center pin, then attaching the encoder on the bottom of the machine through a misalignment coupling.

Electrical Circuit
Since you've gotten this far, I assume you know the chip will not be capable of supplying necessary supply to run a solenoid, but if you have available I/O you should have no problem finding an appropriate relay so it can switch a heavy current, higher voltage solenoid. I would recommend using a 24VDC supply with reasonable current capacity since it is a relatively safe voltage to work with and easy to find industrial components like socketted ice cube relays or whatever flavor you prefer. You will want to use a relay designed for an inductive load or add protective circuitry (diode and resistor) to discharge the back voltage from the solenoid. Your logic circuit will still be lower voltage for the micro, but you use a relay to allow the low voltage, low current micro switch the higher current high voltage power needed for a solenoid.

For power supply, I do not recommend 9v batteries. Even with a good LDOC voltage regulator, you are going to waste a lot of energy. I'm assuming your circuit runs on 3.3v or 5v. Consider either using 4x AA batteries in series, lithium button cells, or even better go with a 24VDC wall-type power supply to power both your solenoid and logic circuits (regulated down accordingly)

Other components I recommend are a piezo or other "buzzer" to indicate you've reached target bend angle and indicators of power, fluid bypass, etc.

For input to set the target angle, I am a fan of the simple panel encoders that allow you to quickly adjust angle. There's no need to get complicated with it; a mechanical contact encoder will work just fine and they are cheap. Alternatively you can do something like I did with Tube Bandit with some momentary pushbuttons.

You will need a zeroing function also; another pushbutton should cover that.

For the display, if you have enough I/O I would recommend having a second readout for target angle.

Hydraulic Control Circuit
Assuming your system is hydraulic, you will want to find a solenoid valve that will bypass flow back to the tank when the desired angle is reached. I would recommend a 24VDC valve; how you plumb it will depend on the type of valve and plumbing. For my big bender, I used a double acting hydraulic cylinder and a manual control valve in conjunction with the bypass valve.

Here is the hydraulic circuit diagram
http://bender.xtremefabricator.com/hydraulics1.jpg

<I need to add more content here>

Software

This is a very simple system but you should think about your state machine and how exactly you want things to operate. I will assume you want your bender to operate something like mine where the process isn't 100% automated, but allows manual control with an automatic stop. I recommend this unless you are doing a production machine because it is safer; you are always on that "deadman" switch and you can stop/adjust if needed or go as slow or fast as you like.

Before you read this, I recommend reading the description of operation for my bender here: http://www.offroadfabnet.com/forums/...2&postcount=51

There are a few states and processes to think about:
- Power up: At this point you have no bend angle reference/zero, so you should make it obvious to the user they need to zero things. Tube Bandit flashes zeros in this state and you transition out of this after you hold the zero button
- Under angle: In this state you are simply monitoring the encoder and adjusting the display to show the current angle. The bypass valve is not activated and the user is free to use the manual control. During this state you should allow the user to adjust the target angle at any time.
- At/above angle: At this point when you reach an angle at or above the target angle, you want to open you bypass valve and give the user an indication(s) like a buzzer to tell them they are there. For the valve control, you need a transient function/timer to keep the valve open for some time rather than just opening for angles greater than target and close for less target because if the user just holds the manual valve in the forward position, it will cycle/bounce off that angle as the valve opens/closes.

Interrupts/parallel processes:
- Encoder reading: Ideally you are reading the incremental encoder at a high frequency. I have used slower micros and higher resolution encoders with disastrous results. You need either high processing speed and interrupt or dedicated process to monitor the encoder or you need a dedicated encoder IC that can keep up with movements on the encoder. If you don't, little bounces and jults or manual movement of the bender can result in missed counts. This is assuming you're using an incremental encoder; if you use an absolute encoder, speed is less of a concern.
- Input monitoring: you need to be able to respond to target angle adjustments or zeroing at any time.

Sorry - I'm unable to finish this post at the moment. Please check out my bender thread and start on post 44. There is an image of the hydraulic circuit and I think some descriptions of operation and video that can help you.
http://www.offroadfabnet.com/forums/...ead.php?p=7801
__________________
Clint

Sometimes you win. Sometimes you learn.

Last edited by TheBandit; 06-19-2015 at 02:30 PM.
Reply With Quote
  #9  
Old 06-19-2015, 01:33 PM
bullnerd's Avatar
bullnerd bullnerd is offline
Master Fabricator
 
Join Date: Apr 2008
Location: Jersey
Posts: 754
Way to go Adam, cool stuff, thanks for sharing.

Very cool of you to help him out Bandit.
Reply With Quote
  #10  
Old 06-19-2015, 02:15 PM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
Thankyou for the replys ive watched several youtube tutorials on the arduino and think that i have cracked the basics of it I will put a more detailed description up in a few hours when I'm at a pc.
The problem was not a debouncing issue but the fact I was relying on a analogue input that kept fluctuating slightly changing the mapped values. I'd mapped it from 0 -1023 for 0-90 degrees and it was a constantly scanning the input not saving it to a value and reading it from there. so I will probably use another encoder to set the value
I'll post some more later and hopefully a video and a picture of the code.
Adam
Reply With Quote
  #11  
Old 06-19-2015, 02:37 PM
TheBandit's Avatar
TheBandit TheBandit is offline
Instagram @chevyhotrodder
 
Join Date: Jan 2006
Location: Ventura County CA
Posts: 4,361
I have added a little more to the post above. What kind of encoder are you using? Can you post the tech specs or model number?
__________________
Clint

Sometimes you win. Sometimes you learn.
Reply With Quote
  #12  
Old 06-19-2015, 04:13 PM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
I was hoping to get a encoder so that I can get 3600 ppr ( in Quadrature) but ended up with a 600ppr but as you said Bandit I can gear it to the encoder, so that I can get 0.1deg accuracy, I have thought about the control of the electrical and hydraulic side, this will be in the future but as said will have to be done via transistors and relays to switch a contactor and it will not start unless the deadman switch( hand held push button ) and the setpoints are not reached etc, I can prove this with no product in the tube bender once I get round to coding that. At present I want a display with the capabilities to fit the auto stop facility in the future, the encoder counts go to 2 interrupt pins allowing for accurate counting even with the arduino processing the code,
here is a link to the video of it working,
https://www.youtube.com/watch?v=9rrjY6FP9zg


You will see that there is a potentiometer which adjusts the brightness, and a reset button which resets the count to zero ( for once you have taken any slack up in the bender)

regards

Adam

Last edited by Adam Gardiner; 06-19-2015 at 04:16 PM.
Reply With Quote
  #13  
Old 06-19-2015, 04:30 PM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
Click image for larger version

Name:	20150619_202429.jpg
Views:	107
Size:	18.6 KB
ID:	8200

Here is the circuit diagram to connect to your standard arduino uno. Note you will have to tie the grounds together for 9v source and 5v source
ive just read your post again Bandit and I was thinking along the same lines of a mechanical encoder, I could use it in quadrature mode and times the pulses x 0.25 so that 1 click was 1 on the encoder I cant se me needing more than 1deg accuracy on the setpoint but is nice to have 0.1deg on the count/actual bend value. I was just going to press a button to read the setpoint on the same display but a 2nd display would be just as easy as im using a I2C system and can have up to 8 of these on the same 2 wires from the arduino, I to was thinking of a buzzer once reached said bend angle,
Adam

Last edited by Adam Gardiner; 06-19-2015 at 04:40 PM.
Reply With Quote
  #14  
Old 06-19-2015, 04:49 PM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
This is the code that I have compiled using the downloaded tutorial sketch for the display and another sketch that I found on youtube for an encoder which I modified removing some code and adding the code I required.


/************************************************** *
This is a library for our I2C LED Backpacks

Designed specifically to work with the Adafruit LED 7-Segment backpacks
----> http://www.adafruit.com/products/881
----> http://www.adafruit.com/products/880
----> http://www.adafruit.com/products/879
----> http://www.adafruit.com/products/878

These displays use I2C to communicate, 2 pins are required to
interface. There are multiple selectable I2C addresses. For backpacks
with 2 Address Select pins: 0x70, 0x71, 0x72 or 0x73. For backpacks
with 3 Address Select pins: 0x70 thru 0x77

Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
************************************************** **/
int pulses, A_SIG=0, B_SIG=1; //encoder inputs pin 2 and 3

// Enable one of these two #includes and comment out the other.
// Conditional #include doesn't work due to Arduino IDE shenanigans.
#include <Wire.h> // Enable this line if using Arduino Uno, Mega, etc.

#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"
float (result);
const int buttonPin = 12; // reset button
int buttonState = 0; // variable for reading the pushbutton status


Adafruit_7segment matrix = Adafruit_7segment();

void setup() {
attachInterrupt(0, A_RISE, RISING);
attachInterrupt(1, B_RISE, RISING);
//reset button input
#ifndef __AVR_ATtiny85__
Serial.begin(9600);
Serial.println("7 Segment Backpack Test");
Wire.begin();
#endif
matrix.begin(0x70);
pinMode(buttonPin, INPUT);

}

void loop() {
int val = analogRead(3);
val = map(val, 0, 1023, 0, 15);
matrix.setBrightness(val);
buttonState = digitalRead(buttonPin);
matrix.println(result);
matrix.writeDisplay();
result = pulses * 0.1;
if (buttonState == HIGH) {
pulses = 0;
}
else {
pulses = pulses;

}
}
void A_RISE(){
detachInterrupt(0);
A_SIG=1;

if(B_SIG==0)
pulses++;//moving forward
if(B_SIG==1)
pulses--;//moving reverse

attachInterrupt(0, A_FALL, FALLING);
}

void A_FALL(){
detachInterrupt(0);
A_SIG=0;

if(B_SIG==1)
pulses++;//moving forward
if(B_SIG==0)
pulses--;//moving reverse

attachInterrupt(0, A_RISE, RISING);
}

void B_RISE(){
detachInterrupt(1);
B_SIG=1;

if(A_SIG==1)
pulses++;//moving forward
if(A_SIG==0)
pulses--;//moving reverse

attachInterrupt(1, B_FALL, FALLING);
}

void B_FALL(){
detachInterrupt(1);
B_SIG=0;

if(A_SIG==0)
pulses++;//moving forward
if(A_SIG==1)
pulses--;//moving reverse

attachInterrupt(1, B_RISE, RISING);
}
Reply With Quote
  #15  
Old 06-20-2015, 06:58 PM
TheBandit's Avatar
TheBandit TheBandit is offline
Instagram @chevyhotrodder
 
Join Date: Jan 2006
Location: Ventura County CA
Posts: 4,361
For the target adjustment you can use software to"gear" the input encoder so it adjusts the angle by 0.1deg per count when going slowly or 1deg when going faster. Lots of different ways to code that but I would keep it simple like resetting a timer for each count and using the timer value to decide how much to increment the target per pulse. Then adjust the values until you find something you like.
__________________
Clint

Sometimes you win. Sometimes you learn.

Last edited by TheBandit; 06-20-2015 at 11:03 PM.
Reply With Quote
  #16  
Old 06-22-2015, 07:25 PM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
Quote:
Originally Posted by TheBandit View Post
For the target adjustment you can use software to"gear" the input encoder so it adjusts the angle by 0.1deg per count when going slowly or 1deg when going faster. Lots of different ways to code that but I would keep it simple like resetting a timer for each count and using the timer value to decide how much to increment the target per pulse. Then adjust the values until you find something you like.
I like this idea but don't think that I will try and do this for my project at the moment. It may be something I could look into in the future, I'm still new to the arduino micro controller but I hope to get into it a bit more when the time allows.

As for controlling the an output to the ram I will probably use either a small detent style encoder or some push buttons to write a setpoint to code with some simple math inside the code i.e. 4 pulses (1 detent) = 1 degree then times it ( 4 pulses x 2.5) = 1 degree or 10 pulses to match the pulses from the encoder with 0.1deg resolution. none of this has been tried but will be over the next few weeks as and when I get time

thanks for your input Bandit its been very usefull.
regards
Adam
Reply With Quote
  #17  
Old 06-23-2015, 03:36 AM
TheBandit's Avatar
TheBandit TheBandit is offline
Instagram @chevyhotrodder
 
Join Date: Jan 2006
Location: Ventura County CA
Posts: 4,361
Think about how you want it to operate first, then worry about how to program it to do so. I think you'll find the programming is just a matter of asking and trying things out. If you can write out what you want it to do layman's terms without a single line of code, I'm sure someone on an Arduino forum can help you figure out exactly how to code it.

The problem with a lot of user interfaces is people put the code or engineering first, or try to do something fancier than they need to because it's technically interesting. In the end it's what's intuitive for the user that really matters.
__________________
Clint

Sometimes you win. Sometimes you learn.
Reply With Quote
  #18  
Old 07-29-2015, 04:57 PM
Captainfab's Avatar
Captainfab Captainfab is offline
Master Fabricator
 
Join Date: Jan 2006
Location: Coeur d'Alene Idaho
Posts: 2,738
Any updates on this project?
Reply With Quote
  #19  
Old 08-01-2015, 02:43 AM
Adam Gardiner's Avatar
Adam Gardiner Adam Gardiner is offline
Master Fabricator
 
Join Date: Feb 2014
Location: United Kingdom
Posts: 141
Quote:
Originally Posted by Captainfab View Post
Any updates on this project?
No more progress as been busy with a newborn baby and work so this will be on hold for a little while.
Adam
Reply With Quote
  #20  
Old 08-01-2015, 01:57 PM
entropy's Avatar
entropy entropy is offline
Master Fabricator
 
Join Date: Sep 2007
Location: 95-miles from the center of Oregon.
Posts: 8,354
Congratz!
__________________
When did empirical knowledge get replaced by a theoretical education?

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:45 PM.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Template-Modifications by TMS
Copyright 2012, Offroad Fabrication Network