go away spammer

Author Topic: displaying sensor data  (Read 3592 times)

0 Members and 1 Guest are viewing this topic.

Offline superchikuTopic starter

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
displaying sensor data
« on: February 17, 2008, 09:38:52 PM »
ok i have understood the admin's tutorial of how ur going to selelct the threshold values of the sensors and then use fuzzy logic to program it according to different enviroments

but my problem is that even if i get an analog to digital conversion and store it in a variable but still i dont know how to see it on my computer screen inorder to graph the data so i needed to know how i display the sensor data on my screen when iam testing it will the simple printf statement work likee

unsigned int i;
i=digital data of the sensors(converted);
printf("%u   ",i);

will this kind of simple code work and will i get the digital value of the sensors on my screenwhile debugging??????
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline benji

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: displaying sensor data
« Reply #1 on: February 18, 2008, 05:27:13 AM »
connect your micro to the pc using UART , open up your hyperterminal
,send the data from micro to pc using the putchar(i) function
, (this is for AVR micros, not sure about others)

good ol' BeNNy

Offline superchikuTopic starter

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: displaying sensor data
« Reply #2 on: February 18, 2008, 08:34:10 AM »
well uart is good but the admin's tutorial for building the uart is not given so can u help me by telling what equipments i shall buy to build the uart??
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline neo01124

  • Jr. Member
  • **
  • Posts: 46
  • Helpful? 0
Re: displaying sensor data
« Reply #3 on: February 18, 2008, 10:32:43 AM »
UART is Universal Asynchronous Reciever Transmitter and u dont have to build a uart chip (dont know if that can be done easily :P)
The uart chip resides in almost all uC available today, only thing u'll have to do is intreface a max232 for voltage conversion in between ur uC and PC (its for conversion from rs232 to ttl logic) and u can use anything from C++ to Matlab to access data from ur serial pins.
This interfacing part has been answered many times on this forum and i gess i have given u enuff keywords already so use ur search engine and cheers ;D

Offline DomoArigato

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 1
Re: displaying sensor data
« Reply #4 on: February 18, 2008, 11:08:33 AM »
I highly sudgest using a bluetooth serial connection.  It's a little more expensive, but it has a much greater potential for future applications and your robot can send the data unattached to your computer.  This one worked great for me: http://www.sparkfun.com/commerce/product_info.php?products_id=582  If it's too pricey check out the usb and regular serial ports at sparkfun.com and acroname.com (that is if you don't want to build it yourself).

Offline superchikuTopic starter

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: displaying sensor data
« Reply #5 on: February 19, 2008, 06:29:00 AM »
yes ur right but u see i live in india and buying anything from radio shack can take many days so if i build the uart by using max232 will it be enough for communication
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline benji

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: displaying sensor data
« Reply #6 on: February 19, 2008, 10:52:19 AM »
you dont need to build anything, the micro-controller has a built in UART and you use max232 to interface to the pc
(converting rs-232 into ttl voltage levels)
good ol' BeNNy

Offline javafiend

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: displaying sensor data
« Reply #7 on: February 19, 2008, 11:28:54 AM »
Straight from the Microcontroller UART Tutorial:

Quote
EIA232F
Today signal transmission systems are much more robust, meaning a +/-12V signal is unnecessary. The EIA232F standard (introduced in 1997) is basically the same as the RS232 standard, but now it can accept a much more reasonable 0V to 5V signal. Almost all current computers (after 2002) utilize a serial port based on this EIA-232 standard. This is great, because now you no longer need the annoying MAX232 circuit!

Instead what you can use is something called the RS232 shifter - a circuit that takes signals from the computer/microcontroller (TTL) and correctly inverts and amplifies the serial signals to the EIA232F standard.

If you'd like to learn more about these standards, check out this RS232 and EIA232 tutorial (external site).

The cheapest RS232 shifter I've found is the $7 RS232 Shifter Board Kit from SparkFun. They have schematics of their board posted if you'd rather make your own.

So, the way I read this, you do not need a MAX232 if you have a fairly current computer ( < 6 years old).  You would only need a shifter board if you wanted to use a serial cable interface.  The tutorial has other examples of UART devices towards the end.  I would go with DomoArigato's suggestion about using bluetooth.  You'll probably be happier with it in the end even if you have to wait a week or two.

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: displaying sensor data
« Reply #8 on: February 19, 2008, 06:28:22 PM »
with the bluesmirf serial module , would you need any specific bluetooth dongle , or would all of them work?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

 


Get Your Ad Here