Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Anomalous Interaction
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Forum Index -> ZX-40
Author Message
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR

Posted: 13 January 2012, 3:11 AM    Post subject: Reply with quote

DocJC wrote:
Just for the record it would be nice to know what the Brown Out Detector Fuse is set to.
On all ZX devices, the BrownOut threshold is 2.7V (nominal). It would be interesting to know what the value of Register.ResetFlags is when the ZX resets.

DocJC wrote:
If the motors draw too much current for your power supply to provide the voltage will drop, whcih could trip the brown out detector, reset the uC, [...]
That would be a possibility if the motors and the uC were powered by the same supply. However, the OP stated that the motor has a separate supply.
Back to top
liam.zbasic



Joined: 25 Mar 2008
Posts: 163
Location: Southern California (Blue)

Posted: 13 January 2012, 7:58 AM    Post subject: Reply with quote

The motors have a separate power supply (11.1v). The ZX-40N device and motor Driver share the same regulated 5V power supply. I enclosed some hardware pictures for clarification.


meanbot_aftview.jpg
 Description:

Download
 Filename:  meanbot_aftview.jpg
 Filesize:  133.39 KB
 Downloaded:  201 Time(s)


meanbot_frontview.jpg
 Description:

Download
 Filename:  meanbot_frontview.jpg
 Filesize:  81.71 KB
 Downloaded:  201 Time(s)

Back to top
spamiam



Joined: 13 Nov 2005
Posts: 689

Posted: 13 January 2012, 12:54 PM    Post subject: Reply with quote

Its hard to say for sure from the pictures, but it also appears that the motor grounds go back to the motor battery via heavy wires. Where is the common ground hooked to the motor batteries. The common ground connection should be connected as close as possible to the motor batteries.

If, for instance, there is a 10 milliohm resistance between the common ground connection point and the motor batteries, then when the motors pull 21A (each!), the common ground could be (V=IR) 42A * 0.010R = 0.42V above true ground!

I presume that the motors do have a common ground with the rest of the electronics, though they could be completely isolated. I suspect that with the motor driver powered by the ZX power supply, that there is a common ground.

With use of optoisolators, it may well be possible to completely isolate the ZX from the motors and motor controller.

-Tony
Back to top
liam.zbasic



Joined: 25 Mar 2008
Posts: 163
Location: Southern California (Blue)

Posted: 15 January 2012, 7:58 AM    Post subject: Reply with quote

spamiam wrote:
Where is the common ground hooked to the motor batteries.

Not sure what is meant by that remark.

Each motor has two low gage wires connected to the motor driver. The motors' battery (11.1v LiPo) is also connected to the motor driver directly. Vendor schematic below:

http://www.pololu.com/picture/view/0J411

At the motor leads, I connected 3 separate noise filters (0.1uF) as shown in the enclosed picture. Am I missing something aside from the optoisolation?



meanbot_closeup.jpg
 Description:

Download
 Filename:  meanbot_closeup.jpg
 Filesize:  140.14 KB
 Downloaded:  190 Time(s)

Back to top
spamiam



Joined: 13 Nov 2005
Posts: 689

Posted: 15 January 2012, 15:05 PM    Post subject: Reply with quote

liam.zbasic wrote:
spamiam wrote:
Where is the common ground hooked to the motor batteries.

Not sure what is meant by that remark.

At the motor leads, I connected 3 separate noise filters (0.1uF) as shown in the enclosed picture. Am I missing something aside from the optoisolation?


Well, the optoisolators isolate the signal, but do not necessarily isolate the ground. It is possible to have the ZX completely isolated from the motor section of the robot. No direct signal connection (i.e. using optos) and no shared ground either. However, I strongly suspect that you have a shared ground (i.e. the ground of the ZX and the ground of the motors are connected).

Depending on how the connection of the grounds is done, the actual voltage level of the ground may not be the same at the ZX and at the motor controller.

When using optoisolators it is not necessary to have the ZX ground connected to the motor ground.

Do you have the ZX ground connected to the motor ground? If so, you have to be quite careful because the high currents in the motor ground can cause the voltage of the "ground" to be something other than zero due to resistance between the ground interconnection point and the motor battery terminal. It took me a long time to realize that ground is not necessarily synonymous with "zero volts", and that ground at one place is not necessarily at the same voltage as ground at another place. In low current, low frequency designs it may not be a significant factor. At high current and high frequency, it is a big deal. I still do not understand all the ramifications and best practices for high current/frequency designs.

-Tony
Back to top
liam.zbasic



Joined: 25 Mar 2008
Posts: 163
Location: Southern California (Blue)

Posted: 16 January 2012, 4:50 AM    Post subject: Reply with quote

I have not implemented the optoisolated circuit. As the project now stands, the ZX and motor battery likely share the same ground somewhere inside the motor driver (schematic below) - that I can't undo.

http://www.pololu.com/picture/view/0J411

Once I optoisolate the project, the motor driver will have its own motor battery and its own +5V regulated power source. The ZX circuit will also have its own battery. So that's a total of 3 batteries! I may consider a 4th for the IR range sensors, which are quite noisy. The 1,000uF low ESR filters at each IR sensor does help significantly.
Back to top
spamiam



Joined: 13 Nov 2005
Posts: 689

Posted: 17 January 2012, 2:24 AM    Post subject: Reply with quote

liam.zbasic wrote:
Once I optoisolate the project, the motor driver will have its own motor battery and its own +5V regulated power source. The ZX circuit will also have its own battery. So that's a total of 3 batteries! I may consider a 4th for the IR range sensors, which are quite noisy. The 1,000uF low ESR filters at each IR sensor does help significantly.


Wow, THREE batteries! I had envisioned two. One to run the ZX and sensors. The other to power the motor driver and motors. BUt three works too!

-Tony
Back to top
GTBecker



Joined: 18 Jan 2006
Posts: 472
Location: Cape Coral

Posted: 17 January 2012, 3:00 AM    Post subject: Anomalous Interaction Reply with quote

> ... 3 batteries...

One can take isolation to an impractical and likely unnecessary
extreme. The objective is to reduce the noise from heavy loads that's
induced onto logic lines and, perhaps, minimize brownout droop - not to
isolate loads from one another. And, while it is possible to
galvanically isolate your controller from the load it controls - no
conductive path whatsoever from any point on one side to any on the
other side - it is probably not required, and I think makes
troubleshooting the circuit more difficult since there is no single
reference point from which to measure levels.

Motors can probably share a common supply with other inductive actuators
and with positive-temperature-coefficient loads like incandescent lamps,
and other dynamic high-demand loads. A simple method has been discussed
here - a common ground point at or very near the supply return (a star
ground) - which assures that logic ground is as close to zero volts as
possible - which has served many projects for many decades.

Ground noise is not a new problem; a number of books have been written
about it alone and it has probably been experienced since about 1890.
Back to top
liam.zbasic



Joined: 25 Mar 2008
Posts: 163
Location: Southern California (Blue)

Posted: 18 March 2012, 8:09 AM    Post subject: Reply with quote

I wired up a PS2501-4 optoisolator to my project. The motor-driver logic signals that control fwd/reverse motion function correctly. The PWM signal does not work. The ZX-40n is sending a 20khz PWM to the optoisolator. My voltmeter detects that frequency on the output, but the output RMS voltage is near 5V regardless of the input duty cycle. The enclosed picture shows the optoisolator circuit used for both logic signals and PWM. Is this circuit appropriate for PWM? Is there a better optoisolator for this application? I'm driving a VNH2SP30 motor driver module from pololu. Appreciate your comments. Thanks.


optoisolate.jpg
 Description:

Download
 Filename:  optoisolate.jpg
 Filesize:  22.91 KB
 Downloaded:  49 Time(s)

Back to top
spamiam



Joined: 13 Nov 2005
Posts: 689

Posted: 18 March 2012, 12:15 PM    Post subject: Reply with quote

I am not an electrical engineer, but usually I put the resistor on the (+) side of an NPN transistor. The reason for this is that the (-) side is common to the base and the 10K resistor will limit base current. Limiting base current will limit the gain of the transistor. It is harder to get the transistor to turn on.


But for you moving the 10K resistor would make the transistor act as an inverter. As a result you would have to reverse the duty cycle logic or add another (regular NPN, not opto) transistor to act as a second inverter. It is probably easier to change the PWM logic at the ZX.

-Tony

EDIT: This is not to say that you can't use your circuit as shown. Look up "common emitter" and "common collector" in wikipedia and other sources. then you can select whichever design you prefer.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR

Posted: 20 March 2012, 16:19 PM    Post subject: Reply with quote

spamiam wrote:
But for you moving the 10K resistor would make the transistor act as an inverter.
You can avoid the inversion by sinking current through the LED and then taking the isolated signal from the collector of the transistor as illustrated in the accompanying image. When the PWM IN signal is low the LED will be emitting light thus switching on the transistor which pulls the collector low.

You'll have to check the datasheet for the opto isolator to confirm that the LED current (V/220) is sufficient to ensure that the transistor is fully saturated. If it isn't, you'll get a distorted signal at the collector.



pwm_opto.jpg
 Description:
 Filesize:  15.49 KB
 Viewed:  635 Time(s)

pwm_opto.jpg


Back to top
liam.zbasic



Joined: 25 Mar 2008
Posts: 163
Location: Southern California (Blue)

Posted: 21 March 2012, 0:11 AM    Post subject: Reply with quote

dkinzer wrote:
You can avoid the inversion by sinking current through the LED and then taking the isolated signal from the collector of the transistor...

I'll try your suggestion.

Separately, I FOUND SUCCESS with my PWM problem. Also, the ANOMALOUS INTERACTION BETWEEN THE ZX40N AND MOTOR DRIVER IS GONE. The optoisolator did the job.

The optoisolator issue was the load resistor (RL) on the output side - it was too high. The switching time (rise & fall times) depend on RL - the higher the value, the higher the delay. Datasheet below:

http://www.sparkfun.com/datasheets/Components/ps2501.pdf

Although an RL value of 10K for the logic signals is okay, it's "off-the-charts" too high for the PWM signal. The switching time was so long that the optoisolator could not resolve the PWM signal with low duty cycles, and the isolator interpreted it as 100%. That's why my motors shot to their max RPM regardless of input duty cycle.

I'll try your suggested circuit. I'm uncomfortable with my setup. As "spamian" suggested, it's unusual putting RL on the emitter side of the phototransistor.

Separately, I'm eyeing a high speed an optoisolator with switching times in the order of nanoseconds as opposed to microseconds with the PS2501. I'll use the slow PS2501 for logic signals and the fast 6N137 for PWM signals.

http://search.digikey.com/us/en/products/6N137/751-1262-5-ND/1731495

Thanks for your suggestions.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZX-40 Time synchro. with the server - Timezone/DST with your computer
Goto page Previous  1, 2
Page 2 of 2

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group