A platform to create a remote control with display for a 10hp up-cut saw that cuts aluminum, plastic and other materials. It is controlled by a Variable Frequency Drive (VFD) which is mounted at the back of the saw, making it inconvenient to change the blade speed to match the material being cut.

Dependencies:   Grove_LCD_RGB_Backlight mbed

Fork of Grove_LCD_RGB_Backlight_HelloWorld by Chandler Matz

Committer:
Debrant
Date:
Thu Aug 17 16:00:05 2017 +0000
Branch:
LCD_VFD_Display
Revision:
2:4a5eab9470af
Parent:
1:64466c2ec269
Setting up to share

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cmatz3 0:be3b212d1b17 1 #include "Grove_LCD_RGB_Backlight.h"
cmatz3 0:be3b212d1b17 2 #include "mbed.h"
Debrant 1:64466c2ec269 3 /*
Debrant 1:64466c2ec269 4 I used the "Grove RGB LCD Display" by Chandler Matz
Debrant 1:64466c2ec269 5 https://developer.mbed.org/users/cmatz3/notebook/grove-rgb-lcd-display/
Debrant 1:64466c2ec269 6 as a platform to create a remote control with display for a
Debrant 1:64466c2ec269 7 10hp up-cut saw that cuts aluminum, plastic and other materials. It is
Debrant 1:64466c2ec269 8 controlled by a Variable Frequency Drive (VFD) which is mounted at the
Debrant 1:64466c2ec269 9 back of the saw, making it inconvienient to change the blade speed
Debrant 1:64466c2ec269 10 to match the material being cut.
Debrant 1:64466c2ec269 11 ****USED****
Debrant 1:64466c2ec269 12 Board = FRDM-K22F
Debrant 1:64466c2ec269 13 Pot = 50K multi-turn
Debrant 1:64466c2ec269 14 VFD = Leasson Speedmaster series
Debrant 1:64466c2ec269 15 Analog input over pot from control 0-10V (T2, T5)
Debrant 1:64466c2ec269 16 Analog output from terminal (T30) 0-10V
Debrant 1:64466c2ec269 17 3 x 3.3K ohm resistors
Debrant 1:64466c2ec269 18 1 x 6.2K ohm
Debrant 1:64466c2ec269 19 2 of the 3.3k are pull ups for I2C and the other is in series with
Debrant 1:64466c2ec269 20 6.2K from T30 for ain max of 1mA @ 10V = 3.47V (this came out to be very
Debrant 1:64466c2ec269 21 close to the K22 supply from the FRDM board)
Debrant 1:64466c2ec269 22 */
cmatz3 0:be3b212d1b17 23
Debrant 1:64466c2ec269 24 AnalogIn pot(PTB0); //Voltage from VFD reference pin in the FRDM-K22F
Debrant 1:64466c2ec269 25 Grove_LCD_RGB_Backlight rgbLCD(PTE0, PTE1);
Debrant 1:64466c2ec269 26 I2C i2c(PTE0, PTE1);
Debrant 1:64466c2ec269 27
Debrant 1:64466c2ec269 28
cmatz3 0:be3b212d1b17 29
cmatz3 0:be3b212d1b17 30 int main()
cmatz3 0:be3b212d1b17 31 {
Debrant 1:64466c2ec269 32 float ain; // VFD reference pin
Debrant 1:64466c2ec269 33 char volts[12]; // make a 'volts' string
Debrant 1:64466c2ec269 34 ain = pot.read()*3550; // Voltage from VFD * the maximum blade RPM
Debrant 1:64466c2ec269 35 sprintf(volts, "%f", ain); // send ain to volts
Debrant 1:64466c2ec269 36 rgbLCD.clear(); // Just
Debrant 1:64466c2ec269 37 wait(5);
Debrant 1:64466c2ec269 38 rgbLCD.print("Blade Speed ");
Debrant 1:64466c2ec269 39 rgbLCD.setRGB(0x00, 0x66, 0xaa);
cmatz3 0:be3b212d1b17 40 rgbLCD.locate(0,1);
Debrant 1:64466c2ec269 41 rgbLCD.print(volts);
Debrant 1:64466c2ec269 42 wait(.5);
cmatz3 0:be3b212d1b17 43 int count = 0;
cmatz3 0:be3b212d1b17 44 while(1)
cmatz3 0:be3b212d1b17 45 {
Debrant 1:64466c2ec269 46 if (count < 0x0fffffff)
cmatz3 0:be3b212d1b17 47 {
Debrant 1:64466c2ec269 48 ain = pot.read()*3550;
Debrant 1:64466c2ec269 49 sprintf(volts, "%f", ain);
Debrant 1:64466c2ec269 50 rgbLCD.locate(0,1);
Debrant 1:64466c2ec269 51 rgbLCD.print(volts);
Debrant 1:64466c2ec269 52 wait(.5);
Debrant 1:64466c2ec269 53 count ++;
cmatz3 0:be3b212d1b17 54 }
Debrant 1:64466c2ec269 55 else
cmatz3 0:be3b212d1b17 56 {
Debrant 1:64466c2ec269 57 ain = pot.read()*3550;
Debrant 1:64466c2ec269 58 sprintf(volts, "%f", ain);
Debrant 1:64466c2ec269 59 rgbLCD.locate(0,1);
Debrant 1:64466c2ec269 60 rgbLCD.print(volts);
Debrant 1:64466c2ec269 61 wait(.5);
Debrant 1:64466c2ec269 62 count = 0;
Debrant 1:64466c2ec269 63
cmatz3 0:be3b212d1b17 64 }
Debrant 1:64466c2ec269 65
Debrant 1:64466c2ec269 66
Debrant 1:64466c2ec269 67
cmatz3 0:be3b212d1b17 68
cmatz3 0:be3b212d1b17 69 }
cmatz3 0:be3b212d1b17 70 }