Go Down

Topic: Possible to "turn on" an arduino via a touch on a touchscreen? (Read 1 time) previous topic - next topic

mitchdog7

Firstly, I'm new to all this programming/microprocessor stuff. Now that that's out of the way, I currently don't have a touch screen LCD, but I'm thinking/planning to use one in my truck. I've got a 94 dodge cummins so OBD2 is not an option. I would like to be able to use the LCD/arduino to control a few relay's to turn off/on my air compressor, train horns, do a high-idle modification, monitor post-turbo egt's to use as a turbo cool-down etc.. I've seen a few menu interface's (idk what to call it) that has a few buttons etc on the display.
Now, the question that i have is would it be possible to remotely turn on the arduino by touching the screen? Basically, i would wire the arduino to only come on while the ignition is on, but then also come on when i touch the screen - for x seconds. Is this possible? if not, would leaving the arduino on,but turning off the LCD/everything, would this be too hard on the atmega? I don't think that would be too big of a load for my batteries, just wondering if the chip can handle being on constantly. Or could the arduino be put in "sleep" mode.. then woken up on touch?
I realize this project is probably WAY over my head, but I'm up for a challenge.. If it's too much, I'll end up just using this 16x02 lcd display to monitor egt's and a few other engine perimeters i can find/tap into. But i just think a small touchscreen would look SICK.
Thanks for looking/helping,
       Mitch.

Graynomad

It may be possible depending on the LCD used, but given that the whole shebang will normally be running when the car is I'd just leave it on.

You may need brightness control though if you drive at night.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Far-seeker


Now, the question that i have is would it be possible to remotely turn on the arduino by touching the screen? Basically, i would wire the arduino to only come on while the ignition is on, but then also come on when i touch the screen - for x seconds. Is this possible? if not, would leaving the arduino on,but turning off the LCD/everything, would this be too hard on the atmega? I don't think that would be too big of a load for my batteries, just wondering if the chip can handle being on constantly. Or could the arduino be put in "sleep" mode.. then woken up on touch?

Most microcontrollers, and specifically the AVR chips used in Arduinos, do have sleep modes.  However, this is not something I'd recommend someone new to microcontrollers mess around with during their first project.  This is becase using the sleep and wake-up features requires a lower level of control, manipulating bit registers directly rather than using the more intutative commands of the higher level programming (not that this is some dark art or anything, but one should learn to walk before they try to run ;) ).  So I agree with Graynomad, in your case it wouldn't be a problem to have the Arduino powered either all the time or with the ignition controlled electronics.

As far as the chip surviving being on long periods or even constantly, the only potential issue is temperature.  The standard Uno uses an ATmega328P, which has a rated operational temperature range of -40°C to +85°C.  Assuming the truck has the usual heating and air conditioning capabilities, and if the Arduino is in an enclosure it allows at least a small amount of air flow (e.g. it has a few small ventilation holes), it shouldn't be a problem to keep it well within the rated temperature extremes. 

Another thing that will help is paying attention to how you power the board.  The on-board voltage regulator can in theory be directly supplied from the truck's battery, and covert it to a steady +5 VDC and +3.3 VDC.  However, since it is a linear regulator it does so by turning the the extra power (~7 VDC * upto ~200 mA) into heat.  An easy alternative would be to get a USB type power adapter for one of your trucks 12 V outlets and connect it to the Arduino's USB port (which allows both communication and +5 VDC power upto ~500 mA).


I realize this project is probably WAY over my head, but I'm up for a challenge.. If it's too much, I'll end up just using this 16x02 lcd display to monitor egt's and a few other engine perimeters i can find/tap into. But i just think a small touchscreen would look SICK.

Using a touch screen graphical LCD shouldn't be too much of a challenge.  I would just make sure you get one that has good supporting documentation, along with examples or tutorials about how to intereface it with microcontrollers.  It would be especially useful if they had pre-made Arduino libraries.  Here's an example of what I mean, there are quite a few other online stores that have similar levels of supporting material.   You might find cheaper touch screens from sellers that don't provide any supporting materials, but it will probably cost much more in time and frustration.

It's only the sleep and wake-up modes that I think would be too much for a first-time project. 

Graynomad

Quote
I would just make sure you get one that has good supporting documentation, along with examples or tutorials about how to intereface it with microcontrollers. 

The 4D Systems displays are pretty well supported and their forum is responsive. The interface is normal serial so that's easy.

As for code, one of the guys here (avenue33) has a extensive library for them.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

mitchdog7

Thanks for all the responses. I'm waiting on a bunch of components to come in, a max6675, voltage regulator, crystals, n some other random stuff. I also have an atmega8 here, was like $3 on ebay.. Would this be large enough to hold a sketch to control a good bit of stuff? I.e., running the lcd, controlling a few relays via input from the lcd/throttle position sensor/some other engine parameters, running the max6675 + k type tc, also possibly controlling when the torque converter locks up / overdrive for the transmission..
One last question, if i get a touch screen display that doesn't use SPI(?) or i2c, are there any libraries that are out there where i can use a shift register(s) to lower the number of pins needed? Now i've got a 74hc595 running a 1602 lcd with a new liquidcrystal library someone else made.

Go Up