Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Chortsen on March 03, 2010, 12:00:33 PM

Title: Microcontroller
Post by: Chortsen on March 03, 2010, 12:00:33 PM
Hi

I'm new to this site and from Denmark, so my English is probably not perfect.
I'm making a small stationary robot that can shoot small balls.
I would like to use my laptop to send a PWM signal to 2x servos and 2x electric speed controllers. The speed controllers gives out 5V that I will like to run the 2x servos.
I been looking around this great site and found a tutorial to build a USB micro controller and I tried to modified the PCB schematic provided to work for my application. I've attached the modified schematic.
Will this schematic work?
What is the SV1 and SV2 on the schematic?
Title: Re: Microcontroller
Post by: GearMotion on March 03, 2010, 12:18:08 PM
The LEDs on the USB data lines would make me suspicious that this schematic is valid.
Title: Re: Microcontroller
Post by: Chortsen on March 03, 2010, 01:09:50 PM
I looked through the pictures and schematics a bit more and it looks like the SV1 and SV2 is just pins.
Think I will try to build it and see if I can get it to work :)
Title: Re: Microcontroller
Post by: GearMotion on March 03, 2010, 01:18:23 PM
Good luck!
Title: Re: Microcontroller
Post by: Hewhowalk on March 04, 2010, 06:04:04 AM
It looks like the schematics could be valid, but you may need to check the servo connections. I would recommend you to use a capacitor to each motor to make sure they don't suck all the juice out of the processor.


Quote
The LEDs on the USB data lines would make me suspicious that this schematic is valid.
The LED are probably just there to show when there is traffic on the USB.

The SV1 and SV2 should be pins to connect other sensors and stuff to, since they all are connected to standard I/O ports. The SV1 seems also be prepared for a reset button.
Title: Re: Microcontroller
Post by: GearMotion on March 04, 2010, 06:28:03 AM
Quote
The LEDs on the USB data lines would make me suspicious that this schematic is valid.
The LED are probably just there to show when there is traffic on the USB.

I stand by what I say. That wouldn't be the way that an engineer would design the circuitry. It looks like the parts were just slapped on by someone without much skill. Build this at your risk to damaging your USB port. Beware what you see on the Internet - not every schematic is designed by someone knowing what they are doing.


SV1 is a non-standard programming port.
Title: Re: Microcontroller
Post by: Chortsen on March 04, 2010, 06:36:53 AM
It looks like the schematics could be valid, but you may need to check the servo connections. I would recommend you to use a capacitor to each motor to make sure they don't suck all the juice out of the processor.

The way I made the schematic servo0 is for the ESC1 (Electronic Speed Control) that carry 5V to servo1. Servo2 is to the ESC2 that carry 5V to servo3. Is it on these connections you recommend I insert a capacitor, so it don't run dry of power? Each ESC is connected to 2x 4000mAh batteries. Most of the power will be used to run the 2x motors, but it has a BEC circuit that has an output of 5V especially made to run servos, so I probably don't have to add a capacitor.
The way I read it you want a capacitor between the processor and the servo. So you want it on the connection that send the PWM signal. If this is the case I would like an explanation on why that would be beneficial?
Title: Re: Microcontroller
Post by: chelmi on March 04, 2010, 09:38:55 AM
whooooooo I'm pretty sure you cannot connect the USB directly to the MCU like you did.
You need a chip to decode the physical USB signals and get a nice signal that your MCU can understand.

Check the axon or the Arduino schematic. Sparkfun carries some USB to serial breakout boards.

Chelmi.
Title: Re: Microcontroller
Post by: GearMotion on March 04, 2010, 09:48:38 AM
whooooooo I'm pretty sure you cannot connect the USB directly to the MCU like you did.

No, actually you can. You are limited to the low speed USB, but direct connection has been demonstrated to be barely passable. The microcontroller is tasked with some rather tight timing to do it all in software. Development and debugging of such an interface is significantly difficult if you are not skilled and versatile with USB.

Title: Re: Microcontroller
Post by: Chortsen on March 04, 2010, 10:22:19 AM
I've been looking in to the possibilities and when I really cut my needs down to a minimum all i need is something that I can connect via USB to my laptop and send out 4 PWM signals.
It seems that the Arduino Duemilanove would qualify for those needs and it is cheaper than what I could build something similar for.
Title: Re: Microcontroller
Post by: Hewhowalk on March 05, 2010, 03:14:22 AM
Quote
The way I read it you want a capacitor between the processor and the servo. So you want it on the connection that send the PWM signal. If this is the case I would like an explanation on why that would be beneficial?

Sorry I wasn't clear enough. What I meant was that you should pu a capacitor between the servo and ground. Motors tends to use very much power in "spikes". This can make the rest of the system to crash due to insufficient power during that spike.