Hello all, I'm new to the forum and fairly new to arduino. I would like to build a small automated injection molding machine and I had some questions about how I would program some of these functions. To start, I want it to have a thermostat on the touchscreen as well as a cycle speed control and cycle counter while the arduino controls the solenoids for the machine's pneumatics. How would I program the arduino to do two things at once(cycling the machine and controlling temperature)? would I need to have two arduino unos or would the mega be better suited to this project. I was thinking about this (2.8 TFT Touch Shield for Arduino [2.8] : ID 376 : $59.00 : Adafruit Industries, Unique & fun DIY electronics and kits) touchscreen, but would this leave other pins open for my solenoids and sensors? How would I go about connecting thermocouples to the arduino and get the temperature to read out on the touchscreen and have the temperature controlled by a graphic slider or plus and minus buttons? Thank you for your time
-jeffreyguy
To start, I want it to have a thermostat on the touchscreen
I don't see that this is possible. If you put a thermostat on the touch screen, it will interfere with seeing and using the touch screen.
A user interface that allows setting high and low temperatures is a different story.
Clear requirements lead to clear code. Fuzzy requirements do not.
How would I program the arduino to do two things at once(cycling the machine and controlling temperature)?
You can't. You can program it to do two different things very close together, but there will be a distinct interval. Whether that interval matters is unknown, without knowing how you are "controlling temperature" and what "cycling the machine" means.
I was thinking about this (2.8 TFT Touch Shield for Arduino [2.8] : ID 376 : Adafruit Industries, Unique & fun DIY electronics and kits) touchscreen, but would this leave other pins open for my solenoids and sensors?
From the tutorial link:
Uses digital pins 5-13 and analog 0-3. That means you can use digital pins 2, 3 and analog 4 and 5. Pin 12 is available if not using the microSD
That's not many pins for the stuff you want to do.
I would have suggested a Mega, but:
The shield is fully assembled, tested and ready to go. No wiring, no soldering! Simply plug it in and load up our library - you'll have it running in under 10 minutes! Works best with any classic Arduino (UNO/Duemilanove/Diecimila). This shield does work with the Mega Arduinos but its going to be half the speed of the Uno-type boards because of the way the Mega rearranges all the pins (there is no way to get around this!) This shield is not Leonardo-compatible
Whether "half the speed" matters, or not, is up to you to decide, based on no data.
The Arduino is capable of controlling multiple things independently, such as managing a display and buttons and maintaining a temperature feedback loop. The key to achieving this is to design your sketch to be non-blocking. In other words, your code does not stop and wait for some external event or condition to occur; instead it checks periodically for any events or conditions that need to be handled, and handles them as and when required. This approach is demonstrated in the 'blink without delay' example sketch, but that example doesn't make it obvious why this concept is so fundamentally important when you want your sketch to control multiple things independently. IMO the Arduino IDE should have a big red flashing button which takes you to this example. Once you have got your head around this approach, everything else gets much simpler.
Thank you pauls, sorry about all the confusion, I meant that I would like to have a thermostat-like interface on the touchscreen. Now that I have been thinking, maybe I don't need a touchscreen, maybe I could use a regular lcd with a keypad, or I found this ( http://www.ebay.com/itm/Sample-Code-3-2-TFT-LCD-Shield-Touch-Screen-for-Arduino-Mega-2560-w-SD-Socke-/251100312550 ) on ebay and it's compatible with the mega. By controlling the temperature, I meant having input for the thermocouples and having the arduino regulate the temperature to a preset temperature controlled by the touchscreen or a keypad. by cycling the machine I meant that I would like to have the arduino control the timing of the machine, so it gives power to a solenoid for a set amount of time to inject the plastic, then wait another set time then send power to a pair of motors to open the mold. I think it will have a button it pushes every time the mold opens, could it be set up so the arduino displays the number of times the switch has closed and display the number on the screen? Sorry again about all the confusion, I often start talking to people without telling them what I am talking about and no one understands what I am saying
bump
you should make easier examples first... make some proofs using TIMER library. Timer allows you to make almost simultaneous activities as the loop can run while the timers are running the callback.
I work now with injecion moulding machines, and develop an open source program to "rescue" a dead chinese machine. this machine alarm when ejector function must be done, and its imposible to make it work, so i made a especial program to make ejector and 2 blow functions after clamp open aproaching original machine control and wiring
so, the best i can tell you: first try to define which kind of machine you want to control (electric or hydraulic), and then develop callbacks for each function (movement) of the machine using timer library. Then maybe you can complete a program for full injection moulding machine
almost forgot.......
the main topic was "touch screen for injection moulding machine"........ this is far difficult to achieve......... first, for touchscreen you need to use a GPU, and programming a GPU implies to make several screen design (not considering main programing functions). That's why i suggest you to make first the main programing using pushbuttons and so (and test is machine run as you want to), and then you can start to involve with touchscreen programming.....
tell me wether i can help you, i have some experience with GPU's and injection moulding machines
best regards
If you want to make a controller for an injection moulding machine I suggest you leave the touchscreen part until last. Get it working just using the Serial Monitor first. When you know that the moulding part works you can start thinking about a stylish user interface.
One important reason for suggesting this order of doing things is that it will be much easier if you need to ask for advice about the moulding control system if your control code is not cluttered with code for the user interface.
The code in the first post of this Thread shows how to use an Arduino to control several things at one time. It is based on the Blink Without Delay example that comes with the Arduino IDE. I am not in favour of using Timer libraries - they usually give rise to more questions than answers and the BWoD system is very simple to implement.
...R
Hi,
just wanted know about the injection molding machine that you are talking about.
did you make it.
Do you really expect an answer after 5 years ?
tasmod:
Do you really expect an answer after 5 years ?
I want now