GLCD and Arduino Mega compability

Hi !

I'm building an central ventilation control system. The ventilation motors are controlled by a third party tyristortransformer. This transformer accepts 0-5v as a control signal.

My plan is to have a iAQ-2000 or the k-30 sensor attached to arduino mega with PWM-protocol. Arduino software would look at the data and make changes to the voltage it's sending to the transformer.

I would also like to have a screen that would show numerical ppm value and percentage represeation of the voltage sent out. On the lower part of the screen, arduino would draw a line acording to the ppm value every 5 minutes. The GLCD model I'm considering is a 128x64 Graphic LCD with ST7920 controller. It would be connected trouhg a serial-protocol.

As i understand, this screen divides in to two sections, one and two. You could wipe or redraw the upper (one) with out affecting the lower (two) part of the screen? After reading the library definitions, I now know how I would draw the line, but I don't know if it's possible to scroll the lower screen to the left everytime a new line is drawn?

Here are my questions: Is the mega a good choice for that screen? Is that screen a good coice for this aplication? Would it be possible to do that line graph with this screen and/or arduino mega?

Is the mega a good choice for that screen?

That screen? The one that you didn't provide a link to? That screen?

The Mega is probably overkill.

Is that screen a good coice for this aplication?

That screen? The one that you didn't provide a link to? That screen?

Would it be possible to do that line graph with this screen and/or arduino mega?

This screen? The one that you didn't provide a link to? This screen?

Are you beginning to sense a pattern?

Here's the link: http://www.robomaa.com/index.php?main_page=product_info&cPath=70_73&products_id=520

Edit: Direct link to the datasheet: http://www.dfrobot.com/image/data/FIT0021/ST7920.pdf

A search of the forum indicates that there are libraries that work with that chip, so using that GLCD should be possible.

The price is not bad. I'd say go for it.

Okay. Thanks for the info.

I have now ordered Arduino mega, punch of components and the screen. I also have the tyristortransformer ordered. I'm still considering between the K-30 and the iAQ-2000 sensors: http://www.co2meter.com/collections/co2-sensors/products/k-30-co2-sensor-module http://www.co2meter.com/collections/co2-sensors/products/iaq-2000-indoor-air-quality-sensor

The iAQ is more complex unit, since it can also detect cooking odors etc. so it meters more of the complete air quality. The k-30 only detect CO2-levels, but this might also be a good thing if your trying to get the most efficient result. Also the K-30 is much cheaper.

Here I have a render, what the screen should look like:

Left is the ppm-value, center is the mode (normaali is Finnish and means Normal), and right is the prosentual value of the motor rpm. These are the current values. The second mode would be ylipaine (over pressure) wich is used when a fire place is going to be light. This would be done by setting a digital pin high wich would be conected to a relay (commerical DIN-rail) in the main electric board. The reley then would open the phase line to the suction motor.

The graph would consist lines that are drawn to the right side of the screen every 5-minutes. When a new line is draw, all existing lines would need to be moved one pixel to the left. There would also be a dot that represenst the motor rpm value. The dot is drawn using a reverse color function. The screen manual says something about shift-command, so that might be the way to do it. If not, I would need to come up with some software solution for the shift.

After reading about delays, I found something called Millies. By saving a Millies-value to an integer and then compearing the Millies and the integer value, I should be able to hold the draw function 5-minutes, with out pausing the whole process.

The mode change needs a Interrupt-function. When a button is pressed, the interrupt-function would change a integer from 0 to 1. The main program would have a If, or something similar, that would notice that the integer is changed and would then start to run the over pressure program. The over pressure program would then have a similar millies function that would exit it after a period of time.

My largest consern is about the shift-command. I've seen all sort of osciloscopes and graph thingies, but I have not been able to find a code example that would show how they have done it. Please comment if you know something about the shift or see something impossible in the plan.