Pages: [1]   Go Down
Author Topic: Arduino controlled tube bending controller  (Read 1761 times)
0 Members and 1 Guest are viewing this topic.
Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Mmm Beerduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all, I've been trying to work out the details for a controller for a tube bending machine. The type of machine I'm talking about can be seen here



I have the basic idea of how I need to break down this project.

Part1
The bender currently runs on twelve 120vac hydraulic valves that are controlled by solid state relays. I'm wondering is there anything out there like a 2n2222 transistor bank?

Part2
The bend arm position is located by a 3600 count quadrature encoder. I don't know the best way to retrieve the output from the encoder and not loose a bunch of data in the meantime.
 
Part3
Operator controls, this will just be approximately eight or nine digital inputs Manual/Auto, Reverse, Forward, CD Clamp, CD Unclamp, Mandrel Ext, Mandrel Fwd, and PDA.

Part4
Display interface, they currently use a 2X20 display it's the expensive vacuum tube style. I'm thinking I want a standard LCD.

There are a few other proximity sensors for the home switch, mandrel back, clamp die in, and pressure die in, that I can worry about once I get past the more elaborate sections of the project.

Oh, anyone have any recommendations for drawing up prototype PCB?

I think this is fairly doable any ideas, questions, or input would be most appreciated. Thanks.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm wondering is there anything out there like a 2n2222 transistor bank?

A transistor array like the ULN2803 is like a "transistor bank".

Quote
The bend arm position is located by a 3600 count quadrature encoder. I don't know the best way to retrieve the output from the encoder and not loose a bunch of data in the meantime.

It all depends on how fast the encoder value changes. As long as it's not "too fast" (I'd say nothing more than 10000 pulses per second) then your Arduino should be able to keep up just by getting an interrupt on each change.

Quote
Oh, anyone have any recommendations for drawing up prototype PCB?

Draw up a block diagram first of all your components, how they interact, where power is coming from/going to, etc. before even starting to think about the PCB. Just my recommendation.

--
The DIN Rail Mount kit for Arduino: quickly attach your Arduino to standard DIN rail
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If it has solid state relays then they are optoisolated already.. Can't you just control them directly with Arduino??  Why the transistors?

Google (arduino "quadrature encoder") gets lots of ideas.... 

You can always use good old relays (maybe optically isolated ones like these) http://arduino-direct.com/sunshop/index.php?l=product_detail&p=156 if you don't want direct wiring to the machine.. 

Let us know how you progress!


DISCLAIMER: I mentioned stuff from my own Shop...
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8589
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's all quite doable.

1) A relay or IO board like Terry suggested.
2) You need to see if you can get access to the outputs of this encoder.
3) All simple.
4) Yep, an LCD.

Two things to think about.

Getting inputs from sensors/switches on the machine, that's a longish cable run in a noisy environment, I would not run Arduino inputs directly. Maybe isolate with opto couplers or at least harden them with a series resistor and clamping diodes.

The two safety mechanisms (SICK and palm buttons), try not to implement that functionality with the Arduino but rather leave them as is. I'm not sure how OH&S will view an non-certified program handling these functions. I'd hate the thing to fire up at the wrong time because your code has & instead of &&.

As for doing a PCB, there are many free PCB design packages, Eagle is probably the most common but you can only do boards up to (I think)  60x100mm with the free version.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Mmm Beerduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I forgot to mention that the bender in the video isn't the exact one, it's the same style but we have a different controller on it and no SICK safety sensor. Link to the controller we have on it now.
http://www.currenttech.com/cab2pines.htm

A transistor array like the ULN2803 is like a "transistor bank".

Thanks for the info on the array this should come in useful.

The encoder it self is mounted directly on the pivot point on the arm, so it never actually makes it more than 3/4 of a revolution and that's in at least 3-4 seconds. So maybe 900 counts per second.

I haven't done a lot of research into it yet but I'm thinking what I read on count loss had to do more with the high RPM than anything else. I'll have to do some testing.

Just for reference
Accu-coder 702-30-S-3600-Q-HV-5-K-2-SY-N-N

If it has solid state relays then they are optoisolated already.. Can't you just control them directly with Arduino??  Why the transistors?


It currently has a rack of opto 22 G4 OAC5 for the outputs and G4 IAC5 for the inputs they all mount to an interface board similar to the one I linked below, the specs are in the links

http://www.opto22.com/site/pr_details.aspx?cid=4&item=G4OAC5
http://www.opto22.com/site/pr_details.aspx?cid=4&item=G4IAC5
http://www.opto22.com/site/pr_details.aspx?cid=4&item=G4PB16H

I could be wrong but even at 5 volts I didn't think the small power supply would be able to handle the current needed to turn them on or off. If I am wrong that would be nice to take that out of the equation.

Getting inputs from sensors/switches on the machine, that's a longish cable run in a noisy environment, I would not run Arduino inputs directly. Maybe isolate with opto couplers or at least harden them with a series resistor and clamping diodes.

The two safety mechanisms (SICK and palm buttons), try not to implement that functionality with the Arduino but rather leave them as is. I'm not sure how OH&S will view an non-certified program handling these functions. I'd hate the thing to fire up at the wrong time because your code has & instead of &&.

As you've read the input are isolated the only inputs that I was contemplating on wiring directly would be the selector switches on the control panel.

We usually have a safety mat connected to a safety relay and the hand palms go throw another relay with timing logic. This make sure the operator can't tape one of the buttons down and try to operate it.

Both of these would be separate from the arduino. The mat cuts the power directly to the clamping cylinders and hand palms I believe go to an opto input. Ill have to check that last one.   

I have some parts coming and need to gather the rest from the bender. Thanks for all the posts and advice.
Logged

Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Mmm Beerduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just slapped on the encoder to see how well it worked. I'm not positive that I will even need all the channels on the encoder. It looked fairly accurate from what I could see using a marker and my fingers. It will be a lot more noticeable when there is a 600LBS four food door hanging off of it.

I grabbed the code from Karl and bluemarble

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1185064568/0
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
About the OPto22's...
---------------------( COPY )--------------------------
It currently has a rack of opto 22 G4 OAC5 for the outputs and G4 IAC5 for the inputs they all mount to an interface board similar to the one I linked below, the specs are in the links

http://www.opto22.com/site/pr_details.aspx?cid=4&item=G4OAC5
http://www.opto22.com/site/pr_details.aspx?cid=4&item=G4IAC5
http://www.opto22.com/site/pr_details.aspx?cid=4&item=G4PB16H

I could be wrong but even at 5 volts I didn't think the small power supply would be able to handle the current needed to turn them on or off. If I am wrong that would be nice to take that out of the equation.
-----------------( END COPY )----------------------
I have run lots of Opto22 stuff for years (my house in Vermont runs on them).. Plain TTL (Arduino) levels will drive them with no problem..  they only take 12mA. You are in great shape if all that I/O is Opto22, for running with Arduino.

The OPto22 rack itself needs a 5V supply separate from Arduino.. But it probably already has that, right??

Grab a spare OPto22 module or two and run them with Arduino to be sure you see how it works...



Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Mmm Beerduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have run lots of Opto22 stuff for years (my house in Vermont runs on them).. Plain TTL (Arduino) levels will drive them with no problem..  they only take 12mA. You are in great shape if all that I/O is Opto22, for running with Arduino.

This is great news! This makes me upset that I didn't actually look at the datasheet and just read what was on the side of the module. I will let you know how it works out.

Thanks
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8589
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You've might have to be careful how many you drive at the same time. The absolute max for each VCC and GND pin is 200mA, but given that there's 4 or 5 of each on a Mega I don't know if that means 4 or 5x 200mA or not.

______
Rob
 
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Mmm Beerduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You've might have to be careful how many you drive at the same time. The absolute max for each VCC and GND pin is 200mA, but given that there's 4 or 5 of each on a Mega I don't know if that means 4 or 5x 200mA or not.

Thanks for the info. No better way to find out than smoke test. There will never be more than four outputs on and I think 4 inputs. Might as well try running all 16 at once for a few hours to see how it holds up. If it catches fire I'll send pics.
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You've might have to be careful how many you drive at the same time. The absolute max for each VCC and GND pin is 200mA, but given that there's 4 or 5 of each on a Mega I don't know if that means 4 or 5x 200mA or not.

______
Rob
 

Yes, it would be good to do the numbers.. But it looks pretty good..  All 12 valves probably not on at once, right?? How many do you thinK? Still that's 144mA total.  The operator buttons could go into 1 or 2 Analog inputs for almost zero. 

Use an I2C LCD display like this: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=170 for 18 bucks and that's only 2 more Analog pins and almost no current..

Bet it can fly.... You could almost fit it in a UNO...


DISCLAIMER: I mentioned stuff from my own Shop...
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Mmm Beerduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I only had 9 spare opto22 outputs laying around, but they have been running a 10 sec off 30 sec on interval for about an hour or so. I'll probably let it run over the weekend to see if my office burns down.

I Found "DC Current per I/O Pin  40 mA" on the arduino mega spec sheet, so I think it should be fine.

Use an I2C LCD display like this: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=170 for 18 bucks and that's only 2 more Analog pins and almost no current..

Thanks for the link, but unfortunately I already had a serial and parallel screen in the mail.
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thats the MAX spec, and the 200mA is the total for the chip the separate Vcc and Gnd connections in the carrier is just to spread the power supply across the die, push it more than 200mA and you will have some nice smoke, if you need current just buffer it with some transistors.
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
From another discussion on Arduino Current limitations.. take a look at: http://arduino-info.wikispaces.com/ArduinoPinCurrent

...for the details...
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Mmm Beerduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I didn't burn my office down yet. I cam in to the office and they where still going.

Once the screens show in the mail I'll probably start working on the menu system. One of the problems that I have to deal with is the saving of variables for the timing and probably parts data. I have a micro sd card interface on its way. http://www.gravitech.us/micaad.html

Is there a more permanent solution that micro SD. I didn't want to use the arduino itself, but maybe a secondary EEPROM of some sorts.

If anyone has personal experience with Flash VS EEPROM let me know. 
Logged

Pages: [1]   Go Up
Jump to: