PDA

View Full Version : ServoPod-USB: external input and ADC questions


remi
05-06-09, 11:26 AM
I have some questions concerning the ServoPod-USB I bought recently. I
currently use it by connecting it to my laptop using the USB connector
and then it is direcly powered by USB. Now, I want to use it in an
embedded project, using its serial port (connected via RS-232 to a Xbee
RS-232 carrier board) and an external power. I've seen in the manual,
that I can achieve this by connecting J13 pin 2&3 and and J15 pin 1&2.
But, in this case, what is the voltage requirement ? I can easyly
provide 5V regulated or 9-12.6 V unregulated (3 cell LiPo battery) but I
can add an external voltage regulator if required. In this case, is J4
equivalent to the external power input connector ? What is the polarity
of this external power input connector ?

I have other questions concerning the ADCs. I currently have
successfully used proximity sensors, accelerometers and gyros by powerering
them using pins 2 and 3 of J3 (I checked with a multimeter that the
voltage between these pins is 3.3V) and connecting the outputs of each
sensors to an ADC port. The output of each sensor is in the range 0-3.3V
measured from J3 pin 2. Is the 3.3V on J3 pin 3 regulated ? J3 pin 2
seems to be 3.3 V, but I tested J3 pin 1 too which is labelled "5V" on
the documentation and its voltage was only 4.5V from J3 pin 2. What
maximum current can be drained from it ? My sensors currently require a
few mA, I supposed it was not a problem, is it ? I left the VSSA pins
(J5 and J6 pin 2) open but it seems to work correctly this way. Should I
connect the VSSA pins to J3 pin 2 too ? I do not understand clearly what
VSSA is. Can it be different from the other VSS e.g. Can I have a 2V
voltage difference between J3 pin 2 and VSSA and a 3.3V difference
between a given analog input and VSSA ?

Thanks for your help.

Sincerely,
Remi

RMDumse
05-09-09, 03:20 PM
I have some questions concerning the ServoPod-USB ... embedded project, using its serial port (connected via RS-232 to a Xbee RS-232 carrier board) and an external power. ... I can achieve this by connecting J13 pin 2&3 and and J15 pin 1&2. ... what is the voltage requirement ?

The purpose of J13 is to control the enabling of the 3.3V supply, which the micro runs from. The 5V supply runs the FTDI USB interface. So at power on, the FTDI runs first, and then establishes the higher current draw needed for the board, then turns on the rest of the board. If you are not running from the USB supply, you simply bypass this stop by leaving it always open (Q2 enabled and conducting).

U15 simply prevents contention between the RS-232 drivers and the USB driver outputs. Setting it to 1&2 connects the RS-232 driver to the 807 serial input (RxD0).

I can easyly provide 5V regulated or 9-12.6 V unregulated (3 cell LiPo battery) but I can add an external voltage regulator if required. In this case, is J4 equivalent to the external power input connector ? What is the polarity
of this external power input connector ?

J4 is intended as an alternative external power connector. It is easy to see polarity on J4. The pin with the square pad, Pin 1, is the +Vin. Pin 2 has a round pad and is ground.

Let me answer your other questions in a different post.

RMDumse
05-09-09, 03:51 PM
I currently have successfully used proximity sensors, accelerometers and gyros by powerering them using pins 2 and 3 of J3 (I checked with a multimeter that the voltage between these pins is 3.3V) and connecting the outputs of each sensors to an ADC port.

This would be the prefered configuration. You are powering from the digital supply rail, though, so there will be digital noise on these lines. Like we've done supplying Vref to the 807, you may want to add a series inductor at least, or a filter if necessary, if this digital noise presents any problem to your analog signals being generated.

The output of each sensor is in the range 0-3.3V measured from J3 pin 2. Is the 3.3V on J3 pin 3 regulated ?

Yes, it comes from the regulator chain, and the Q2 switch. We have cautiously listed this as 3.2V on the schematic, expecting a tiny drop across Q2. But you will see a usually find a nominal 3.3V on this pin.

J3 pin 2 seems to be 3.3 V, but I tested J3 pin 1 too which is labelled "5V" on the documentation and its voltage was only 4.5V from J3 pin 2.

I think you mean, Pin 3 of J3 above. We have used low drop out regulartor, even though they cost about 5x a more common regulator, just for this reason. What sort of voltage you will find on the 5V rail is beyond our control. This depends on what the USB port will source. If it will source very near 5V our rail will be very near 5V. But I would guess if you measured your USB output under load you would find it is only delivering 4.5V at the ~230mA the board takes. This will be even worse if you are powering additional peripherals from the board, such as gyros, rangers, etc.


What maximum current can be drained from it ? My sensors currently require a few mA, I supposed it was not a problem, is it ?

Again, we cannot answer this question, because we are not providing the 5V. We can say if you provide 6V to J4, your 5V rail will be at 5V. And you should have several hundred additional mA's you can draw off our supply, with our regulator rated up to 500mA. At full current, the regulator drop can be .5V, but if you are lower than that, the problem is probably USB related. The limits are determined by the abilities of the LM2937-5, and the abillity to remove heat from it in the environment installed. To view the data sheet look here: http://www.national.com/ds/LM/LM2937.pdf

I left the VSSA pins (J5 and J6 pin 2) open but it seems to work correctly this way. Should I connect the VSSA pins to J3 pin 2 too ? I do not understand clearly what VSSA is. Can it be different from the other VSS e.g. Can I have a 2V voltage difference between J3 pin 2 and VSSA and a 3.3V difference between a given analog input and VSSA ?

No. VSSA is the negative rail of the analog circuitry. It needs to be equivalent to VSS(digital). It is connected at a DC level between the two systems the unlabeled inductor between pin 87 and VSS on the low side. Similarly L1 and L2 on the high side (VDD). But hopefully the digital noise will be left on the other side of the inductors, giving quieter and more stable A/D readings.

remi
05-09-09, 04:14 PM
Hi,

thank you very much for these explanations. Now I can start powering my ServoPod with batteries and interfacing it using my XBee dongle.

Sincerely,
Remi

remi
05-11-09, 07:20 AM
Hi,

just another question: I've read on the LM2937-5 documentation you mentioned that the input voltage can be up to 26 V continuous. Can I then safely power the ServoPod-USB from my 3 cell LiPo battery -with a voltage varying from 9 V to 12.6 V depending on the charge- connecting it on J4 directly (maybe with only a cap and an inductor to filter noise coming from my brushless motors) ?

Sorry to ask plenty of questions, I just want to be sure to not damage the ServoPod-USB.

Sincerely,
Remi

RMDumse
05-11-09, 10:03 AM
The problem with higher than about 6 to 7 volts has to do with the wattage rather than the voltage. Getting rid of the heat is a problem. The 5V regulator has to drop the incoming voltage to 5V from whatever input, where the second regulator will take the voltage from 5 to 3.3.

If you're going to go with a higher voltage pack, my suggestion would be to use a switcher to convert the voltage down to 3.3 and bypass the 5V section (not using anything USB related anyway, right?) This would cut your draw by 1/3 and extend operating life.

We do this with the IsoPod(TM)s and it is a very satisfactory approach.

remi
05-11-09, 10:45 AM
Thanks for your answer.

I've the option of providing a 5V easily too, because the ESC I will use for controlling the brushless motors usually provide a 5V output used to power the RC receptor and the servomotors. It is usually rated up to 1 or 2 Amps. Is this 5V line sufficient in term of voltage to power the ServoPod via J4 ?

Else, I will try to get a 3.3V regulated level. In this case, at which pin this 3.3V should be provided ?

Just another question that comes me to mind thinking of ESC: they generally provide their 5V power through the +V pin of the servo connector on which they are connected to the RC receptor. Is it safe to provide the servo input power using one of the +V servo PIN instead of J17, J18, J19 ?

Sincerely,
Remi

RMDumse
05-11-09, 03:56 PM
the ESC ... usually provide a 5V output ... rated up to 1 or 2 Amps. Is this 5V line sufficient in term of voltage to power the ServoPod via J4 ?

Sure, you can bring this in on the VCC rail, and it should work fine.

Else, I will try to get a 3.3V regulated level. In this case, at which pin this 3.3V should be provided ?

Anywhere you see VDD and GND on the schematic. Where you found it on J3 would be fine. (Hummm... looks like I may have given wrong pin numbers above. On reconsideration of the schematic, VCC is +5V Pin 1, and Vdd is +3.3V on J3 Pin 3, J3 Pin 2 is GND. Please use caution and use my other pinout comments with caution.)


Also on the top end of J10, and J11 Notice VCC, V+, VDD, appear in a line with GND below each. They were designed that way to be easy to feed in power, or to jumper V+ to either VCC 5V or VDD 3.3V rails.

5V power through the +V pin of the servo connector on which they are connected to the RC receptor. Is it safe to provide the servo input power using one of the +V servo PIN instead of J17, J18, J19 ?

Sure. As just explained, there were many possible ways considered for hooking power to the ServoPod(TM) including back filling from the Servo supplies. The only concern is the Servo rails often are glitched by the servos and can go too low, causing processor resets. If you have stiff enough supplies the processor is not glitched, feeding from +V is quite acceptable.

remi
05-11-09, 04:22 PM
Ok, thanks. I'll try it tomorrow (now it's quite late in the evening in France). I think the easiest way will be to use the 5V supply from the ESC and to bring it to J4.

Remi

remi
05-12-09, 01:09 PM
Hi,

I'm trying to interface to my XBee dongle and I have a new question: on the ServoPod-USB manual (part 1) concerning the wiring of a serial cable on J1 connector, a DC wall adapter is appearing on a schema. What is it intended for ? Is it intended for powering the ServoPod instead of powering it via USB ? Is it then a substitute for J4 ? Should I provide a +5V on J1 pin 1 too ?

Remi

RMDumse
05-12-09, 03:03 PM
a DC wall adapter is appearing on a schema. What is it intended for?

If you are not using the USB interface and receiving power from the host, you need to get power from somewhere. So this is showing applying power through J1.

Actually this is an artifact left over from the IsoPod(TM) which had no USB interface, and could only be powered from an external source, like a wall adapter.

Is it intended for powering the ServoPod instead of powering it via USB ?

Yes.

Is it then a substitute for J4 ? Should I provide a +5V on J1 pin 1 too ?

Again the legacy of J1 came from IsoPod(TM)s and matches their J1, where the same pin was Vin on that board. It also has the same pattern on the PlugaPod(TM). If you look at J1 on Sht 1 you'll see a tag labeled Vin going to Sht 2. On Sht 2 if you look closely, just above J4 there is a label identifying that point as Vin. It perhaps would have been better with a large tag on it, but that aside, it is the same signal.

remi
05-12-09, 03:22 PM
Thanks. That's clear now.

Remi

remi
05-15-09, 11:29 AM
Hi,

I've made some progress: the powering of the ServoPod-USB using a LiPo battery and using a R/C brushless controller 5V output is working. I've tried to get the interfacing with my XBee dongle working but without success. When I power up the ServoPod, I get the "IsoMax V0.82" line output via my XBee dongle but when I try to enter something to the ServoPod, I get no answer (I don't get an "OK" message when I enter a CR, neither anything when I try something like "1 2 +"). When I press the reset button on the ServoPod, I get the "IsoMax V0.82" message again as normal. My configuration is the following: I've the ServoPod connected to a RS232 serial carrier board (this one (http://www.sparkfun.com/commerce/product_info.php?products_id=9111) to be exact), with an XBee module. I've another XBee module connected to my PC using a USB carrier board. The two XBee modules are associated together and work without any problem when the serial carrier board is connected to a serial port of another PC.

I've made the following connection between the ServoPod-USB's J1 and the XBee RS232 carrier board: pin 8 is connected to the DB9 pin 5 (GND), pin 6 is connected to the DB9 pin 4 (DTR), pin 4 is connected to the DB9 pin 2 (RX) and pin 2 is connected to the DB9 pin 3 (TX). As compared to the schema on the ServoPod-USB manual (part1), the TX and RX lines are crossed, because, as I understood, both the ServoPod-USB and the XBee carrier board acts as DCE. I connected CTS and RTS together on the XBee RS232 carrier board (the ServoPod-USB manual suggest to connect DSR and RTS but the DSR pin doesn't seem to be connected to anything on the XBee RS232 carrier board). I tried to connect pin 6 (ATN' ? What is this ?) to something else than the DB9 pin 4 as I supposed that it may be both an input on the ServoPod-USB and the XBee sides. I tried to connect it to DCD (DB9 pin 1) but I discovered after that this pin is not connected to anything on the XBee RS232 carrier board. I didn't investigate further this way because I don't know if the problem is related to this signal on ATN'.

I'm quite blocked and I don't know what else to do. I will try to connect the ServoPod-USB via a serial cable to my PC serial port directly but I couldn't test it because I'm missing a female DB9 connector and I have to order one to test :(

Is there a special thing to make to have the ServoPod-USB working with an XBee dongle ?

Sincerely,
Remi

RMDumse
05-15-09, 12:00 PM
Well, I don't know the problem, but I can tell you, you are very close to having it working. If you can see the log on message from reset, you've already crossed many bridges. It means your com port is right, your baud rate is right, and you have one side of the serial working, which means the RS-232 is functional (at least one way).

So it is down to the serial out from the PC and into the 'Pod.

What about the J15 jumper which selects which receiver output, RS-232 or USB into the 'Pod processor? has that been set correctly? If it were not set to RS-232 you'd get exactly the results you describe.

Of course a bad wiring between the XBee carrier DB9 pin 2 (RX) and pin 4 on J1 would also have the same result.

The ATN line is a legacy reset input to match Basic Stamp-type processors with the same pinout on J1. The intention is to hook this input to DTR so the board can be remotely reset by the RS-232 port. Of course, as you've figured out, this is not practical over the radio link.

Well look at J15 and maybe see if you can probe the signal arriving at Pin 4 of J1 (with scope or even a multimeter, it will show normally negative voltage signal, going high maybe with keypresses) and report back with additional findings.

ddlawrence
05-15-09, 09:20 PM
Hi,

just another question: I've read on the LM2937-5 documentation you mentioned that the input voltage can be up to 26 V continuous. Can I then safely power the ServoPod-USB from my 3 cell LiPo battery -with a voltage varying from 9 V to 12.6 V depending on the charge- connecting it on J4 directly (maybe with only a cap and an inductor to filter noise coming from my brushless motors) ?

Sorry to ask plenty of questions, I just want to be sure to not damage the ServoPod-USB.

Sincerely,
Remi

Hi Remi. Interesting project.
I am using the LM2675. It is a switching power supply that is very efficient and does not
heat up. I am running from 24VDC. Being 90-95% efficient is good when running off limited LiPo power. It is also a very small device.
Are you doing an airplane?

later..............don

remi
05-16-09, 12:08 PM
Hi,

thank you for your answers. I've connected J15 1&2 the same time as J13 pin 2&3 before connecting to RS232 and using an external power supply. I've ordered another serial carrier board (http://www.droids.it/data_sheets/990.006%20datasheet.pdf) for my XBee dongle because the XBee explorer I used first was too big to embed in my UAV project. I will de-solder the DB9 connector and instead solder wires with connectors to be plugged on the ServoPod instead. I will tell you the result I got with this card and at the same time, I will try to measure the level at J1 pin 4 with a multimeter (I don't have an oscope, maybe it could be a useful buy one day...) at this moment too. Can I leave J4 pin 6 open ?

@ddlawrence: thanks for the advice. I will try because I think the regulator embedded in the ESC I tried is not very efficient. My project is an UAV quadrocopter project (see here (http://www.newmicros.com/discussion/showthread.php?t=7811)).

Sincerely,
Remi

RMDumse
05-16-09, 12:39 PM
Well, J13 is correct, or otherwise there'd be no power and no serial response at reset. J15 is critical to your symptoms, but may not be the cause.

When I get in jambs like this, I try to troubleshoot by dividing problems into what it could be, and what it cannot be. So here's a thought. let's verify the system down to the 'Pod first. Jumper pin 2 & 3 of DB9 the XBee carrier to make a loop back. What you type on the PC should reappear on the PC. If that works, we're looking at the 'Pod still. If it doesn't work, then it is a system problem.

On J4 pin 6... sorry, that doesn't sound like our board. Are you sure you have the correct numbers there?

On desoldering the DB9: Desoldering can be a violent event and you could loose pads or break traces further complicating the debugging process. Why not just tack the wire to the pad for now until mystery solved?

remi
05-17-09, 03:52 PM
Hi,

I just got it working fine (I can both send commands and get results) with my first sparkfun XBee serial explorer (http://www.sparkfun.com/commerce/product_info.php?products_id=9111) carrier board. So I simply connected GND, SI and SOUT. I left J1 pin 6 (ATN') open (I mispelled it in my previous post: I was speaking of that line when speaking of J4 pin 6). I think that on my first try, I had a bad connection on the SIN pin. The second serial carrier board (http://www.droids.it/data_sheets/990.006%20datasheet.pdf) I ordered and received yesterday does not work, it does not even work in the loopback configuration you described and there are suspect marks on some printed circuit paths. Thanks to your advice, I didn't desolder the DB9 connector so I hope I will be eligible for a return to the french shop where I ordered it.

Sincerely,
Remi

remi
05-18-09, 11:23 AM
Hi,

I've finally got my droids 990.006 XBee RS232 carrier board (http://www.droids.it/data_sheets/990.006%20datasheet.pdf) working. I don't know where was my error with this card. I just let a last try before returning it and it then started to work... After having it working, I desoldered the DB9 connector with many caution and soldered wires on it directly and it's still working. I'm happy with this part of my project completed. Thanks for your help !

Now the next step will be to control my motors with the ServoPod. I've seen in a french forum that most of the R/C ESC accept PWM with a pulse width between 1ms (0%) and 2ms (100%) and allow high frequency (such as a 3.2 ms period) so it sounds that I will be able to use the ServoPod's PWM pins without having to set the CPU halfspeed. As I decided to build a variable pitch quadrocopter (I ordered 4 variable pitch propeller adapters (http://www.topmodel.fr/product_detail.php?id=14379&qty=1)), I will try to find little servos (such as Hitec HS55) that allow a PWM period less than 20 ms (but I don't know if the HS55 allows this) to control the pitchs of my 4 propellers. Do you have some references of such servos that can be connected to the ServoPod without the need of halfspeed CPU ? On the software part, I will have some evenings with my new friend IsoMax to program a Proportional Integral Derivative (http://www.atmel.com/dyn/resources/prod_documents/doc2558.pdf) (PID) controller :)

Sincerely,
Remi

RMDumse
05-18-09, 03:10 PM
I've only seen one problem driving an ESC so far. When I ran it at half speed, the ESC dropped out part of the time. The ESC was actually out of spec, and dropped out on an exact 50Hz update rate as too slow. At 60Hz, the same ESC was rock solid.

The HS-55 I have personally used and work just fine.

In fact, I have never seen a working servo that didn't accept the 67Hz output of the 'Pod's and work with it.

If you really need 50Hz, you can get it from a timer pin, rather than the regular PWM pin.

We don't use or recommend the half speed, now that we've got some experience driving servos. Again, no negative responses from anyone trying it we have heard. If there were problems, we should have heard by now.

You know there's a Dual PID example on the downloads page, right?

Also we have beta version of IsoMax(TM) with PID Loops in machine code we could talk about if you don't get a fast enough loop going in high level. But I've had good luck with the example shown at 100 Hz update rates.

remi
05-18-09, 03:49 PM
Thanks for these points. I will have a close look at the dual PID code on the example page. It is still a little hard reading for me but it will make coding this simpler. What you said concerning ESC and servos is very soothing too.

Remi

ddlawrence
05-18-09, 06:37 PM
Hi,

I(I ordered 4 variable pitch propeller adapters (http://www.topmodel.fr/product_detail.php?id=14379&qty=1)), I will try to find little servos (such as Hitec HS55) that allow a PWM period less than 20 ms (but I don't know if the HS55 allows this) to control the pitchs of my 4 propellers.
Remi
Hi Remi. Better use digital servos for pitch control. You will need faster response
and they will hold their position. Helicopters do this. I have used S3154 digital submicro
servos from Futaba with the PlugaPod and MiniPod.
later.......don

RMDumse
05-18-09, 08:47 PM
Did you use the conventional 1mS to 2mS pulse to drive these, Don, or did you go to a shorter pulse communications scheme?

remi
05-19-09, 06:21 AM
Hi,

I've looked at the S3154 specs. It seems to be a great servo but it's very expensive (1 item has the same cost as at least 4 standard micro-servos). What do you think of something like this one (http://www.helipal.com/ek2-0508-digital-servo-8g-for-esky-helicopters.html) ?

Sincerely,
Remi

P.-S. Here's a little picture (http://ct44.free.fr/images/uav01.png) of my current proto. The base was cut from a plexiglas board, the box is made from a CD-R pile box and the top (where the XBee dongle is placed and to which XBee antenna is fixed) is a bottle cap. I hope I won't get into heat dissipation problems. On my first tries the surface of the CD-R box kept cold. The most heat producing circuits seems to be the ESC and they will be placed outside of the box.

remi
05-22-09, 04:56 PM
Hi,

I've just tried an Emax ES08A (https://www.toysonics.com/emax-es08a-8g-micro-mini-servo.html). It's not a digital one but it's very cheap and reasonnably fast enough. It seems to work at 76 Hz PWM (32767 PWM-PERIOD). I tried at 125 Hz and 250 Hz but at those frequencies, it does make a big buz (and a big current drain on the 5V that powers both the ServoPod-USB and the servo that ends in the ServoPod resetting) at certain positions while it's ok at others (e.g. with a 20000 PWM-PERIOD, a 8000 PWM-OUT is ok (a little less than a 1 ms pulse width), 10000 PWM-OUT is ok too and at a correct position but a 9000 PWM-OUT gets into a buz). Anyway, it's great that it can work at 76 Hz.

I've bought an Emax ESC 18A (https://www.toysonics.com/emax-18amp-electric-speed-controller-esc.html) too (just one for now, to test) but I didn't test it yet except for the 5V supply.

Sincerely,
Remi

ddlawrence
05-24-09, 06:17 PM
Hi Remi. Whatever servos you use, make sure they are digital. Props/rotors have
high, fluctuating dynamic loads. The digital servos will fight to maintain their
position if they are knocked out of position. A good torque estimation would be to
see what a helicopter of similar weight uses, and since you will have 4 rotors, you can
get something proportionally smaller. Digital servos draw much more current, so
run the 'Pod from a different power supply. I get good hardware for my airplanes.
$20 a servo is still cheap considering the cost of the airplane and it is reusable.
Parts from non-structural plastic are weak and heavy and they will probably crack
from fatigue. I am a big believer in wood. Aircraft ply, LitePly or baltic birch (cheapest)
is good for primary structure.

later.......don

ddlawrence
05-24-09, 09:31 PM
Did you use the conventional 1mS to 2mS pulse to drive these, Don, or did you go to a shorter pulse communications scheme?

It was 1 to 2ms on a timer pin. I did not attempt to drive them at 60Hz.
I have a few other digital servos if you want me to try them, let me know.
BTW I also drove a 35A reversible DC speed controller used in RC boats,
Navy Control 535 by Robbe. It is nice to know you can get something
off the shelf that is easily hooked up by a rookie, yet has some respectable
power and utility.

later....don

remi
05-25-09, 03:09 PM
Hi,

thanks for your answers Don. I will follow your advice and buy EMAX ES08D servos, that are the digital version of the EMAX ES08A I've tested. These are not much more expensive than the analog ones (I can find them at my local RC store for about $15 for one).

The main structure of my 4-copter will be a cross made with 8mm diameter carbon tubes. The overall diameter will be about 50 cm without the props. The plastic is only here to be a support for the 'Pod and the other electronic devices. Normally, it won't be submitted to strong force. I agree it's quite heavy as compared to wood but it seems to be rather resistant (5mm plexiglas).

I tried my ESC (with a motor plugged on it) on PWMA0 at 76 Hz and it works fine.

Sincerely,
Remi