Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: RF - PC Controlled Rover.

  1. #11

    Default

    Sorry for my ignorance, but I told you its my first project in robotics. And I did not connect it to MAX 232 for Vcc, used a Multiadaptor giving around 3.8 volts and added a series Resistor before it to ensure Drops below 3.6 Volts every time, but above 1.8 Volts.

    As for the datasheet, I had no idea about SPI and am currently reading on it.
    So does that mean that a microcontroller is necessary in between the module and PC? I have Atmega 8 bought from Sunrom (I guess its preprogrammed for this interfacing)

    Code:
    http://www.sunrom.com/index.php?main_page=product_info&products_id=802
    Iit is the same as you suggested to buy. But a conventional female header cannot be mounted on the pins as the separation between the pins is too less.

    The main part of the program is as follows, it is just meant for testing so pretty trivial:

    Private Sub Command1_Click()
    If MSComm1.PortOpen = False Then
    MSComm1.PortOpen = True
    End If
    Label2.Caption = ""
    MSComm1.Output = "Hello"
    If (MSComm1.InBufferCount > 0) Then
    Label2.Caption = MSComm1.Input
    End If
    End Sub

    I don't have a serial or parallel port on my PC so I am compelled to use a Serial to USB cable, but I guess its working fine. Have set the port numbers and the Bauds.

  2. #12

    Default

    One more problem, yesterday when I was using it, it sometimes sent 'Hello' and received it. But now its totally garbage. Now that you have pointed out that it is an SPI I'll have to consider that as Luck.

    However, I have noticed that If I Connect the Pins 11 and 12 together thereby connecting the receiver port to the transmitter port directly, I still do not receive "Hello" when I send it. What could be the problem in that?

  3. #13
    Senior Member T-1000
    Join Date
    Mar 2005
    Location
    Bangalore
    Posts
    728
    Blog Entries
    7

    Default

    > you have connected both modules on the Max232 side. I think one of them must be on the robot side.
    > I am not sure if you know what you are doing. Get the basics right.
    > You will need two micros. One to take in serial data from Max232, and transmit the data to the transmitter via the spi bus.
    > The other micro will be on the robot side. This will take in the data from the module, again via spi, and do whatever you want to.
    > You have not drawn the top level block diagram for your project. if that fails, a lot of time goes like that.
    > There is no need to hurry. You cannot configure and make a cc1100 chip work like that unless you have read the datasheet and you have good working knowledge with SPI. Or may be you should have someone who knows things really well, NEAR you.
    > If you really dont have time, and if you dont need two way communication, use the cheap OOK modules. you can directly connect it to the MAX232. you will have to use a timer at the VB part to keep sending some data at some rate.
    .... I didnt do it ! ....

  4. #14
    Senior Member Cyborg
    Join Date
    Apr 2007
    Location
    Mumbai
    Posts
    213

    Default

    One good thing that you did is you have purchased this
    http://www.sunrom.com/index.php?main...roducts_id=802

    ie ST1197 - Serial Interface IC for RF Transreceivers

    Interfacing CC1100 module with this ic is much more simple.
    You can use PC also no need of uC
    But you can't send binary or hex data thru vb serial port you have to use predefined method that is use varint and byte array to send you data as hex thru serial port

    Go thru ST1197 datasheet no need to go for SPI as you have this chip

    But if you are planning to purche this why you have not purchased this module

    http://www.sunrom.com/index.php?main...roducts_id=875

    http://www.sunrom.com/index.php?main...roducts_id=560

    http://www.sunrom.com/index.php?main...roducts_id=646

  5. #15

    Default

    I connected both transmitter and receiver on the same MAX232 because I was trying to see what is received when I transmit data.
    The receiver would later go on to the robot for reception. Its only that I am learning it right now.
    I have tried the OOK transmitters and receivers and I am able to transmit and receive data over a simple OOK link, I am yet to implement it on Microcontrollers.


    "But you can't send binary or hex data thru vb serial port you have to use predefined method that is use varint and byte array to send you data as hex thru serial port"
    I didn't get you, please elaborate.
    and ST1197 is an ATMEL ATMEGA8L IC in this case.

  6. #16
    Senior Member Cyborg
    Join Date
    Apr 2007
    Location
    Mumbai
    Posts
    213

    Default Mr

    Quote Originally Posted by anonymoussomeone View Post
    I connected both transmitter and receiver on the same MAX232 because I was trying to see what is received when I transmit data.
    The receiver would later go on to the robot for reception. Its only that I am learning it right now.
    I have tried the OOK transmitters and receivers and I am able to transmit and receive data over a simple OOK link, I am yet to implement it on Microcontrollers.


    "But you can't send binary or hex data thru vb serial port you have to use predefined method that is use varint and byte array to send you data as hex thru serial port"
    I didn't get you, please elaborate.
    and ST1197 is an ATMEL ATMEGA8L IC in this case.
    Its ok they might have programmed it and renamed ST1197.
    Just try to read it and see is it preprogramed or not?

    Post your schematic with this ic, its too simple with this ST1197.
    Refer visual basic black book for understanding vb serial port, it is available on net

  7. #17

    Post Little Success

    Hey everyone, I spent the last few days making a piece of code to work on the microcontroller and now am done with it.
    This is what I have achieved till now:

    1) I can wirelessly transfer data from one computer to another using simple OOK Tx and Rx, to which I had to shift because o the unavailability of the 3.6 Volts regulator IC TM55 3601. Though it came along with some noise, but the data was intact and received as it should be.
    2) Assuming that the first data bit might be lost in transmission, I have decided the following protocol after reading a post on it on Net;
    Databyte 1: Synchro byte (* in my case)
    Databyte 2: Synchro byte(*)
    Databyte 3: Address of Device(for example 1)
    Databyte 4: Command byte(to turn pin x ON on Port B, if data matches)
    Databyte 5: Checksum byte = Databyte+Address(1+A=r)

    I coded the microcontroller using this logic and was able to successfully receive the data and turn on the ports
    If synchro byte 1 gets corrupted, code ignores it and watches for the second synchrobit, which should be uncorrupted as per the assumption. If whole data is corrupted, checksum fails and nothing happens, data is discarded.

    Now I am trying to send data from computer to Microcontroller through Wireless Rx and Tx.
    But the microcontroller works on a different logic level.

    Transfering data from computer to another computer involved use of MAX232 in between which accepted data above .8V as input. So it could detect my data. The voltage across data terminals of Rx is around 1.5 - 2 Volts, which is not enough to be detected as positive logic by the microcontroller. So it receives nothing. Tried using BC548 to amplify the signal using 4.7K resistors, but then the ever persistent noise also gets amplified and data is never received as it should be.
    So what could be the possible solution for this?

  8. #18

    Default


    Receiver(rough)


    Tranmitter(rough)
    Last edited by anonymoussomeone; 04-14-2010 at 10:14 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •