FYP circuit

Autonomous Robot, Manual Robot, DC Motor Driver, Stepper Motor Driver, Servo, Multi PWM chip.....

FYP circuit

Postby decarus » Sat Sep 05, 2009 7:53 pm

i'm looking forward to build a robot with control of 10 servo motors and 4 dc motors(H-bridge). I was wondering what uC(PIC18F458 ???) do i need to make a servo controller that can control them.
Servo controller should be connected to a RF receiver and the RF transmitter is connected via a usb to a computer for control purposes using VB. Is it possible?
decarus
Newbie
 
Posts: 15
Joined: Sat Sep 05, 2009 5:42 pm

Re: FYP circuit

Postby hyng » Wed Sep 09, 2009 11:53 am

Your solution at http://blog.cytron.com.my/?p=6&cpage=1
Just that the wireless it use is Bluetooth or XBee
You need to make the modification on it.
User avatar
hyng
Moderator
 
Posts: 292
Joined: Thu Apr 16, 2009 11:35 am

Re: FYP circuit

Postby decarus » Mon Sep 21, 2009 9:47 pm

Tnx for your reply. What i've found is the PIC18F4550 which has USB support via the d+ and d- . Can i use Xbee for data transfer between that microcontroller and a computer and a USB camera attached to the microcontroller. So its like this

computer <--> X bee \\\\//// x bee <---> microcontroller <---USB camera

can gimme some example on how is it done.. tnx for the help xD
decarus
Newbie
 
Posts: 15
Joined: Sat Sep 05, 2009 5:42 pm

Re: FYP circuit

Postby sich » Tue Sep 22, 2009 2:13 am

PIC18F4550 has USB support but it cant act as USB host, so it cant control the USB camera since both are USB slaves. An alternative to add a camera to ur uChip, u can use CMUcam. http://www.cytron.com.my/viewProduct.php?pid=DiYsKxwjJxcuMyY8MRESDXvxj3tob8bWC1HFXPRTQRQ=&store=
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: FYP circuit

Postby decarus » Tue Sep 22, 2009 8:14 pm

Ok.. I'll then stick back to the 18F458.
Lets say I have the camera. UART interface.. how do i make a wireless connection ?
Can it be like this

Computer <->USB-UART<-> X bee \/\/\/\/\/\ Xbee (Rx) <---- (Tx) Camera (Rx)-<-|
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\(RF Wireless) (Tx) ----> (Rx)PIC18F458(Tx)->-/

What i wanted is for the Xbee(on the microcontroller side) to only send image data and only receive instructions from the computer. So the flow is like this.
Computer send command through usb-uart -> Xbee --- Xbee --> PIC ---> Camera to start and after that a GUI is done on the computer to control the PIC for other functions(no feedback) LAter the camera send data directly to the Xbee --> Xbee--> UART-USB-->Computer for video streaming. Possible?

Pls advice if this is wrong xD I'm new in this
decarus
Newbie
 
Posts: 15
Joined: Sat Sep 05, 2009 5:42 pm

Re: FYP circuit

Postby decarus » Tue Sep 22, 2009 8:18 pm

Or is this possible?..lol

Computer-->Usb-UArt-->Xbee \/\/\/\/\/\ Xbee -->Uart-USB-->Camera(usb)

Both the Usb-uart and Xbee acts as only a terminal for data transfer.
decarus
Newbie
 
Posts: 15
Joined: Sat Sep 05, 2009 5:42 pm

Re: FYP circuit

Postby sich » Wed Sep 23, 2009 10:34 am

decarus WROTE:Computer <->USB-UART<-> X bee \/\/\/\/\/\ Xbee (Rx) <---- (Tx) Camera (Rx)-<-|
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\(RF Wireless) (Tx) ----> (Rx)PIC18F458(Tx)->-/

This maybe possible...can have a try.

decarus WROTE:Computer-->Usb-UArt-->Xbee \/\/\/\/\/\ Xbee -->Uart-USB-->Camera(usb)

Again, both are USB slaves. Uart-usb and camera cant communicate.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: FYP circuit

Postby decarus » Thu Sep 24, 2009 2:51 am

By doing so, then the instruction written must alter the Tx of the microcontroller to output start bit for the camera.

Which means, a GUI on the computer is sending data through the xbee to the microcontroller for both motor control and starting the camera.

So have to set a string(start command) on the microcontroller? How does the microcontroller know he'll have to send it to the Tx pin instead of i/o ports ?
decarus
Newbie
 
Posts: 15
Joined: Sat Sep 05, 2009 5:42 pm

Re: FYP circuit

Postby decarus » Fri Sep 25, 2009 3:55 am

How about this, Since both the camera and xbee are using uart, to get two uart ports, use two microcontroller and tunnel them using SPI interface. What do u think?

And can a 16bit uC tunnel with 8bit uC ?
decarus
Newbie
 
Posts: 15
Joined: Sat Sep 05, 2009 5:42 pm

Re: FYP circuit

Postby sich » Fri Sep 25, 2009 11:35 am

decarus WROTE:By doing so, then the instruction written must alter the Tx of the microcontroller to output start bit for the camera.

Which means, a GUI on the computer is sending data through the xbee to the microcontroller for both motor control and starting the camera.

Actually i'm not sure this is workable. You need to verify with the camera's communication protocol and do the testing.

decarus WROTE:So have to set a string(start command) on the microcontroller? How does the microcontroller know he'll have to send it to the Tx pin instead of i/o ports ?

You need to do some configuration in your program.

decarus WROTE:And can a 16bit uC tunnel with 8bit uC ?

Yes, as long as they 'speak' the same language. For example SPI, UART, I2C, CAN...

decarus WROTE:How about this, Since both the camera and xbee are using uart, to get two uart ports, use two microcontroller and tunnel them using SPI interface. What do u think?

It's easier to get a microcontroller with two UARTs. Some 16-bit PIC mcu has more than one uart. Besides, we also can add another software uart to a mcu with one hardware uart. Sample code can be obtained here: http://www.cytron.com.my/suppMaterial/18F_Sample_Program.zip
This source code uses Microchip C18 compiler and the mcu chosen is 18F4520. You can read more in SD02B User's Manual, Section 7.2 (page 26). Get the user's manual here: http://www.cytron.com.my/datasheet/SD02B_User's_Manual.pdf
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm


Return to Robot Controller

Who is online

Users browsing this forum: No registered users and 13 guests

cron