Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

16f877a control using android via bluetooth

Status
Not open for further replies.

nafnaf

Junior Member level 1
Joined
Aug 21, 2012
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,388
im making a project , a robot has wheel and has a robotic arm ,the adnroid gui use to control the wheels

how can i program the adroid to the bluetooth to the pic? im confused on this
i know c language but how?
 

hello

So you have your MCU wich drives Wheels and Arm, when it receives some oder
comming from an UART.
The UART of PIC16F must be linked to a bluetooth device like YC-MCU or RN41 or Other
wich support SSP1 ( serail link protocol by default)..
TX of BlueTooth connected to RX PIC UART ..
RX of Bluetooth connected to TX PIC UART
(pay attention if 3,3V level)

Other side, you need an android tablet or phone with bluetooth (included)
you can do some test with existing apk like
GetBluedemo.apk
or Amarinio2.apk
and after write your own application with
RFObasic basic for android wich support bluetooth dialog..
see **broken link removed**
Google Appinventor
or other.....
to send command ,like direct to you PIC UART.
PIC decode the received message and do action on motors..
You can also send feed back to your android GUI.

you can see many example on my web page with these tools....
 

Also, the easiest way to do this is going to be over an RFCOMM link between the Android device and the Bluetooth device. I used an LMX9838 from TI/Natsemi to control an FPGA-based device.

**broken link removed**

A few pages on Android/RFCOMM

**broken link removed**
https://stackoverflow.com/questions/6141668/bluetooth-examples-for-android

For reference, I used the Bluetooth chat example that Qt provided when I hacked Linux onto my Nexus 7 tablet and then again used it when I put Android back on the Nexus 7.
 

thanks for reply

the bluetooth to PIC 3.3v
should i use a rs232 for this or should directly connect it ? im using the EGBT045MS

also if i use flowcode to program the pic how can i write a statement on the RC7/RX of my PIC
other people tell that the bluetooth module sends characters to the PIC or should i use other software?
 

Hello!

thanks for reply

the bluetooth to PIC 3.3v
should i use a rs232 for this or should directly connect it ? im using the EGBT045MS

also if i use flowcode to program the pic how can i write a statement on the RC7/RX of my PIC
other people tell that the bluetooth module sends characters to the PIC or should i use other software?

You should connect the Bluetooth module directly to the microcontroller.
RS232 signals are used basically when you use a cable and want to connect to a PC.
Otherwise, it's called UART, and you can connect the UART directly to the module's
UART (make sure you cross signals, RX of a device connected to the TX of the other
one.

Sorry for your second question, I don't really get it. A Bluetooth device can
transmit whatever you feed to it. You may choose to transmit only printable ASCII,
that's a bit easier to debug because you can read the memory directly, but there is nothing
constraining to do this. Therefore, if you want to transmit a 16-bit value, you can transmit
an ASCII string like for example "12345", or you can send the binary value 0x3039 which
would take 2 bytes instead of 5.

I have made a similar application. In fact, it's a board for robotic experiments.
It can drive simultaneously 6 serovs + 4 DC motors. Or steppers, but remember that
one stepper will eat 2 DC motor ports.
Here is a demonstration of this board:


NB: in my case, for some reason, I don't see the translation when I use Safari on
Mac. In this case, you should right click and choose "restore flash" on the video.
From the beginning scene, you should see "iPhone control of a small motor car".
From Firefox, it works fine. And for portable device, it doesn't work at all because
the bubbles are not supported. So look at this on a PC if you have trouble
understanding japanese.

Note that the code for wheel and servo drivers is online, and there will be more
examples in the coming weeks. Unfortunately for you, it's not an Android application.
I will probably write an Android app when I have some time to kill.

This application uses 1 DC motor port (4 DC ports) and 1 servo port (6 servo ports
in total), so I'm sure some better applications could be written, but that's a matter
of time.

Dora
 
Last edited:

now i can run my simulation in proteus +mikcoC uart terminal

but i didnt test it on real world

thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top