sanjy005 0 Posted April 15, 2016 Share Posted April 15, 2016 I want a help in my project fuel theft detection using uc msp430g2553.I am using level sensor (used in motorbikes), GSM to send message,and LCD to display . I have interfaced LCD and GSM individually. I don't know how to take input from sensor control GSM and LCD according to that.Can somebody help me. Thanks in advance. Quote Link to post Share on other sites
enl 227 Posted April 15, 2016 Share Posted April 15, 2016 First thing would be more detail on the sensor and more detail about what you are trying to do. What do you mean 'control GSM and LCD according to' the sensor? Are you trying to display a fuel level? Are you trying to send an alarm message? To get you started, I'm going to guess the sensor is resistive with float, as they are quite common, or potentiometer with float, but there are other options. If it is, then the easiest way to read it is set up a voltage divider, one end to ground, the other to your processor supply, and the wiper to one of the analog capable inputs, and read the analog value using the ADC. The sample for reading the internal temperature of the MSP430 (see the LP documentation) is a good starting point for using the ADC, and there are a number of examples here in the archives, as well as lots of examples in the TI lit and around the web. sanjy005 1 Quote Link to post Share on other sites
sanjy005 0 Posted April 15, 2016 Author Share Posted April 15, 2016 My sensing unit is float type connected with potentiometer. Now i want to send a message and display comment ("level has gone below") if the level goes below a particular level. Quote Link to post Share on other sites
sanjy005 0 Posted April 15, 2016 Author Share Posted April 15, 2016 First thing would be more detail on the sensor and more detail about what you are trying to do. What do you mean 'control GSM and LCD according to' the sensor? Are you trying to display a fuel level? Are you trying to send an alarm message? To get you started, I'm going to guess the sensor is resistive with float, as they are quite common, or potentiometer with float, but there are other options. If it is, then the easiest way to read it is set up a voltage divider, one end to ground, the other to your processor supply, and the wiper to one of the analog capable inputs, and read the analog value using the ADC. The sample for reading the internal temperature of the MSP430 (see the LP documentation) is a good starting point for using the ADC, and there are a number of examples here in the archives, as well as lots of examples in the TI lit and around the web. My sensing unit is float type connected with potentiometer. Now i want to send a message and display comment ("level has gone below") if the level goes below a particular level. Also can u send me the links to study about this. Quote Link to post Share on other sites
sanjy005 0 Posted April 15, 2016 Author Share Posted April 15, 2016 My sensing unit is float type connected with potentiometer. Now i want to send a message and display comment ("level has gone below") if the level goes below a particular level. Also can u send me the links to study about this.My sensor is like this shown in image.It is having two wire only. Quote Link to post Share on other sites
enl 227 Posted April 15, 2016 Share Posted April 15, 2016 Two wire: rheostat (variable resistor), not a potentiometer. You will need an external resistor to make up a voltage divider. I would suggest uing one that i approximately equal to the full range resistance of the sensor. I can outline the code as: Read sensor using ADC If reading is less than threshold, do whatever you need it to do Not a complicated structure. A starting point for the ADC is http://www.ti.com/lit/ml/slap115/slap115.pdf and http://coder-tronics.com/msp430-adc-tutorial/ There are a lot of others, including a number of university sites (BYU, Cornell) that have archived information. Quote Link to post Share on other sites
sanjy005 0 Posted April 15, 2016 Author Share Posted April 15, 2016 I have found the code of msp430g2253.Can i run the code of msp430g2253 to msp430g2553 uc .If not then what are the alternatives? or can u provide me an example with code to use the ADC? Quote Link to post Share on other sites
sanjy005 0 Posted April 16, 2016 Author Share Posted April 16, 2016 Two wire: rheostat (variable resistor), not a potentiometer. You will need an external resistor to make up a voltage divider. I would suggest uing one that i approximately equal to the full range resistance of the sensor. I can outline the code as: Read sensor using ADC If reading is less than threshold, do whatever you need it to do Not a complicated structure. A starting point for the ADC is http://www.ti.com/lit/ml/slap115/slap115.pdf and http://coder-tronics.com/msp430-adc-tutorial/ There are a lot of others, including a number of university sites (BYU, Cornell) that have archived information. I have found the code of msp430g2253.Can i run the code of msp430g2253 to msp430g2553 uc .If not then what are the alternatives? or can u provide me an example with code to use the ADC? Quote Link to post Share on other sites
Fmilburn 446 Posted April 16, 2016 Share Posted April 16, 2016 @@sanjy005 If you don't have a lot of experience with microcontrollers, you can try using Energia with the 2553. There are examples on how to use ADC that come with it. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.