Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Using ADC inputs on an ATMEGA

Status
Not open for further replies.
hi guys....i m doin a project on ..Remote monitoring of Generator using GSM modem Implemented in BTS
Introduction :
Often in the base transceiver station(BTS) there is a power failure and a generator is to be turned on to keep the BTS in working condition. Here in our project we monitor the diesel level in the BTS and send the information to the GSM modem. The information is through SMS. Information includes the BTS name and the diesel level. We further would create a virtual personal area network using four GSM modem which will monitor their respective BTS and will send the message to the controller server. Hence an immediate refill of diesel can be called and avoid failure of the system. This will avoid the failure of BTS and will provide caution before the system fails. An effective wireless network can thus be established .
Objectives :
1. Design a circuit for measuring the diesel level using float switch.
2. Interface the float switch to ATMEGA32 based development board.
3. Code the ATMEGA32 to decode the voltage level sent by the switch.
4. Further coding for generating appropriate message for transmission.
5. Interfacing ATMEGA32 to the GSM modem.
6. GSM modem will push the message to the server.

Applications :
1. The system can be efficiently made use in BTS.
2. The system can be used for remote monitoring of generator diesel level or even for that matter for water tank also.
Extension :
This project can be extended for interactive monitoring that is receiving message from sever and processing it and taking the appropriate action.


can u plzzz help me wit float switch part ??...
 
Both grounds on the ATMEGA32 are connected to main ground and Accellorometer is connected to main ground as well.

Perhaps I have it set up wrong...

Right now, I have the ADC referenced to AVCC (5V). The output for the accellorometer is connected to ADC0, all other ADC outs are not connected.
As far as the code, I'm using Codevision AVR C Compiler (full version) to write my code. I have tried both using an interrupt on the ADC and just calling the ADC when I need it. The only thing I can't find any information on is when I call the ADC using read_adc() but there is supposed to be a number in the ()'s. I have been using 0 but have tried 1 and other numbers. What exactly is supposed to be in the brackets?

~Mike

Hello. If you are using ADC0 and it is in Port A.0, then you will read that using read_adc(0);
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top