Re: [beagleboard] Re: UART PWM Interference

2017-09-04 Thread jay
Our ii78 ii78 8ii
8
8
7m88988

8io8i8ii8898
8
8
8
888
888o

888oiii
I'll I'll 88ooiikiii7 ii78 ii78 iui8777888
888i8
I7u7ii88and and then I 88ooiikiii7 ii78

o
9l99oojui8ilooking 9
looking looking looking looking looking forward 8887amto to my ookopp

On Aug 31, 2017 1:06 PM, "Dennis Lee Bieber"  wrote:

> On Thu, 31 Aug 2017 05:55:11 -0700 (PDT),
> ojc...@gmail.com declaimed the following:
>
> >I'm generating a high rate of errors 10-20% when sending messages out via
> xbee connected to UART but only when I use PWM at the same time. I'm using
> UART2 and I've tested this behavior using all of the other available PWM
> pins. Below is a piece of simplified code that has a high error rate. When
> I comment out the section that turns the PWM signal on, the UART/xbee sends
> messages pretty much faultlessly.
> >
> What type of error? The "unable to open" message in your code (and
> why
> are you constantly opening/closing the serial port?). Garbage characters on
> the receiver side?
>
> How close is the xBee antenna to whatever wiring is linked to the
> PWM
> line? Possible cross-talk affecting the transmitted signal. Power-draw for
> attached equipment maybe causing xBee drop-outs?
>
> Too many variables possible...
> --
> Wulfraed Dennis Lee Bieber AF6VN
> wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/07ggqchj9ikgv02cet2ifpplp4suvtql71%404ax.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAJBWw_EFKJd3P8uLo2K65qUGRUMnq-hEiwBdKSWQ4y3WkK9XKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: UART PWM Interference

2017-09-04 Thread ojc234


See the two pictures below - I have tried to simplify things a few times - 
but nothing seems to change the high error rate, although it might have 
decreased a bit - a few times it has been ~50% (That was when I was trying 
to run my Power HD MG1235 servo on a 7.2V UBEC)


The Xbee and PWM are on different sides of the BBB the only thing in common 
as per the picture below is the GND.


The code below shows the computer side of things to get you an idea of what 
is going on there - I've posted the contents of xbee_tools.py below - not 
that I think there's an issue there - just as FYI.






from xbee import XBee
import serial
import cPickle

class xbee_connection:
def __init__(self, port, baudrate):
# Start the serial connection
try:
self.ser = serial.Serial(port, baudrate)
except serial.serialutil.SerialException:
self.ser.close()
print("Could not start serial connection, ensure that Xbee is 
connected to COM4 port")

self.xbee = XBee(self.ser)  # Starting XBee connection
self.msg = ""   # Initializing message as blank
self.encoded_msg = ""


def poll_data(self):

try:
raw_data = self.xbee.wait_read_frame()
#print raw_data['rf_data']
#self.msg = cPickle.loads(raw_data['rf_data'])
self.msg = raw_data['rf_data']
#print(self.msg)
# Ensuring that these values can be converted into floats
except KeyboardInterrupt:
self.ser.close()
except Exception as e: print(e)

except:
pass

return self.msg

def disconnect(self):
self.ser.close()




On Monday, September 4, 2017 at 12:35:25 AM UTC+12, Przemek Klosowski wrote:
>
> Could you post a picture or drawing of your physical layout? I think the 
> evidence points to interference from the PWM circuit into the XBee. HOw 
> close physically are they?
>
> On Fri, Sep 1, 2017 at 9:18 PM, > wrote:
>
>> Just tried adding the 1uF decoupling capacitor in parallel with the 
>> existing 0.1uF capacitor - it didn't decrease the high error rate.
>>
>> On Saturday, September 2, 2017 at 12:08:00 PM UTC+12, ojc...@gmail.com 
>> wrote:
>>>
>>> So tested all of that - see table below
>>> The servo power supply is a QM12V5A 
>>> 
>>>  but 
>>> as seen below - even when this is not active, there is still a high error 
>>> rate.
>>> Also, I am not opening and closing the serial port now - it stays open 
>>> throughout each test. I sent 100 messages for each test. Error rates are an 
>>> approximate guess.
>>>
>>> PWM running  Servo & Servo Power Supply Active Message Mode 
>>>  Error Rate
>>> Yes  Yes 
>>>RX-TX on loopback   0% - all good
>>> Yes  No 
>>> RX-TX on loopback   0% - all good
>>> No   No 
>>> RX-TX on loopback   0% - all good
>>> Yes  Yes 
>>>BBB to PC via xbee  10 - 50% - no good
>>> Yes  No 
>>> BBB to PC via xbee  10 - 50% - no good
>>> No   No 
>>> BBB to PC via xbee   0% - all good
>>>
>>> I don't really know what to make of it except that the problem seems to 
>>> be somewhere either in the xbee?
>>> The xbee is connected with a 0.1uF decoupling capacitor between +3.3V 
>>> and GND close to the xbee (~25mm length from xbee GND pin thru 0.1uF Cap to 
>>> xbee +3.3V pin)
>>>
>>> I see some people recommend a 1uF decoupling capacitor on the xbee - 
>>> maybe I'll try adding one of those in parallel with the 0.1uF cap.
>>>
>>>
>>> On Friday, September 1, 2017 at 9:22:31 AM UTC+12, Przemek Klosowski 
>>> wrote:



 On Thu, Aug 31, 2017 at 3:13 PM,  wrote:

> Errors : yes garbage characters on the receiver side
>
> Cross-talk : so I have had a servo motor (powered from it's own ubec) 
> plugged in, however I thought that the ubec noise might be interfering, 
> so 
> I tried running the PWM signal without any device attached (no servo ubec 
> running) and no pwm wire plugged into the beaglebone. But still had the 
> same issue.
>
 OK--so now can you test by losing the open/close ,disconnecting the 
 XBee and jum

Re: [beagleboard] Re: UART PWM Interference

2017-09-03 Thread Przemek Klosowski
Could you post a picture or drawing of your physical layout? I think the
evidence points to interference from the PWM circuit into the XBee. HOw
close physically are they?

On Fri, Sep 1, 2017 at 9:18 PM,  wrote:

> Just tried adding the 1uF decoupling capacitor in parallel with the
> existing 0.1uF capacitor - it didn't decrease the high error rate.
>
> On Saturday, September 2, 2017 at 12:08:00 PM UTC+12, ojc...@gmail.com
> wrote:
>>
>> So tested all of that - see table below
>> The servo power supply is a QM12V5A
>> 
>>  but
>> as seen below - even when this is not active, there is still a high error
>> rate.
>> Also, I am not opening and closing the serial port now - it stays open
>> throughout each test. I sent 100 messages for each test. Error rates are an
>> approximate guess.
>>
>> PWM running  Servo & Servo Power Supply Active Message Mode
>>Error Rate
>> Yes  Yes
>>RX-TX on loopback   0% - all good
>> Yes  No
>>   RX-TX on loopback   0% - all good
>> No   No
>>   RX-TX on loopback   0% - all good
>> Yes  Yes
>>BBB to PC via xbee  10 - 50% - no good
>> Yes  No
>>   BBB to PC via xbee  10 - 50% - no good
>> No   No
>>   BBB to PC via xbee   0% - all good
>>
>> I don't really know what to make of it except that the problem seems to
>> be somewhere either in the xbee?
>> The xbee is connected with a 0.1uF decoupling capacitor between +3.3V and
>> GND close to the xbee (~25mm length from xbee GND pin thru 0.1uF Cap to
>> xbee +3.3V pin)
>>
>> I see some people recommend a 1uF decoupling capacitor on the xbee -
>> maybe I'll try adding one of those in parallel with the 0.1uF cap.
>>
>>
>> On Friday, September 1, 2017 at 9:22:31 AM UTC+12, Przemek Klosowski
>> wrote:
>>>
>>>
>>>
>>> On Thu, Aug 31, 2017 at 3:13 PM,  wrote:
>>>
 Errors : yes garbage characters on the receiver side

 Cross-talk : so I have had a servo motor (powered from it's own ubec)
 plugged in, however I thought that the ubec noise might be interfering, so
 I tried running the PWM signal without any device attached (no servo ubec
 running) and no pwm wire plugged into the beaglebone. But still had the
 same issue.

>>> OK--so now can you test by losing the open/close ,disconnecting the XBee
>>> and jumpering TX and RX and writing some simple text out and checking that
>>> you receive it back correctly, while running PWM. If you see errors, then
>>> maybe beaglebone is sensitive to crosstalk; if you don't then the crosstalk
>>> must be in the XBee. BTW, suppying the  servo from a separate power supply
>>> might not fully prevent interference--it could be kickback from driving the
>>> servo.
>>>

 --
 For more options, visit http://beagleboard.org/discuss
 ---
 You received this message because you are subscribed to the Google
 Groups "BeagleBoard" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to beagleboard...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/ms
 gid/beagleboard/eabc977d-e1ea-4c07-abf3-6193fe8c2518%40googlegroups.com
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/a13bf443-af43-4b66-9e7f-6610cb12d95a%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAC%3D1GgEjJvREmupAU54bHxOXeWKy5pRFCyDgFdjyVGettmiKjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: UART PWM Interference

2017-09-02 Thread ojc234
Just tried adding the 1uF decoupling capacitor in parallel with the 
existing 0.1uF capacitor - it didn't decrease the high error rate.

On Saturday, September 2, 2017 at 12:08:00 PM UTC+12, ojc...@gmail.com 
wrote:
>
> So tested all of that - see table below
> The servo power supply is a QM12V5A 
> 
>  but 
> as seen below - even when this is not active, there is still a high error 
> rate.
> Also, I am not opening and closing the serial port now - it stays open 
> throughout each test. I sent 100 messages for each test. Error rates are an 
> approximate guess.
>
> PWM running  Servo & Servo Power Supply Active Message Mode   
>Error Rate
> Yes  Yes   
>  RX-TX on loopback   0% - all good
> Yes  No   
>   RX-TX on loopback   0% - all good
> No   No   
>   RX-TX on loopback   0% - all good
> Yes  Yes   
>  BBB to PC via xbee  10 - 50% - no good
> Yes  No   
>   BBB to PC via xbee  10 - 50% - no good
> No   No   
>   BBB to PC via xbee   0% - all good
>
> I don't really know what to make of it except that the problem seems to be 
> somewhere either in the xbee?
> The xbee is connected with a 0.1uF decoupling capacitor between +3.3V and 
> GND close to the xbee (~25mm length from xbee GND pin thru 0.1uF Cap to 
> xbee +3.3V pin)
>
> I see some people recommend a 1uF decoupling capacitor on the xbee - maybe 
> I'll try adding one of those in parallel with the 0.1uF cap.
>
>
> On Friday, September 1, 2017 at 9:22:31 AM UTC+12, Przemek Klosowski wrote:
>>
>>
>>
>> On Thu, Aug 31, 2017 at 3:13 PM,  wrote:
>>
>>> Errors : yes garbage characters on the receiver side
>>>
>>> Cross-talk : so I have had a servo motor (powered from it's own ubec) 
>>> plugged in, however I thought that the ubec noise might be interfering, so 
>>> I tried running the PWM signal without any device attached (no servo ubec 
>>> running) and no pwm wire plugged into the beaglebone. But still had the 
>>> same issue.
>>>
>> OK--so now can you test by losing the open/close ,disconnecting the XBee 
>> and jumpering TX and RX and writing some simple text out and checking that 
>> you receive it back correctly, while running PWM. If you see errors, then 
>> maybe beaglebone is sensitive to crosstalk; if you don't then the crosstalk 
>> must be in the XBee. BTW, suppying the  servo from a separate power supply 
>> might not fully prevent interference--it could be kickback from driving the 
>> servo.
>>
>>>
>>> --
>>> For more options, visit http://beagleboard.org/discuss
>>> ---
>>> You received this message because you are subscribed to the Google 
>>> Groups "BeagleBoard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to beagleboard...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/beagleboard/eabc977d-e1ea-4c07-abf3-6193fe8c2518%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a13bf443-af43-4b66-9e7f-6610cb12d95a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: UART PWM Interference

2017-09-01 Thread ojc234
So tested all of that - see table below
The servo power supply is a QM12V5A 

 but 
as seen below - even when this is not active, there is still a high error 
rate.
Also, I am not opening and closing the serial port now - it stays open 
throughout each test. I sent 100 messages for each test. Error rates are an 
approximate guess.

PWM running  Servo & Servo Power Supply Active Message Mode 
 Error Rate
Yes  Yes   
 RX-TX on loopback   0% - all good
Yes  No 
RX-TX on loopback   0% - all good
No   No 
RX-TX on loopback   0% - all good
Yes  Yes   
 BBB to PC via xbee  10 - 50% - no good
Yes  No 
BBB to PC via xbee  10 - 50% - no good
No   No 
BBB to PC via xbee   0% - all good

I don't really know what to make of it except that the problem seems to be 
somewhere either in the xbee?
The xbee is connected with a 0.1uF decoupling capacitor between +3.3V and 
GND close to the xbee (~25mm length from xbee GND pin thru 0.1uF Cap to 
xbee +3.3V pin)

I see some people recommend a 1uF decoupling capacitor on the xbee - maybe 
I'll try adding one of those in parallel with the 0.1uF cap.


On Friday, September 1, 2017 at 9:22:31 AM UTC+12, Przemek Klosowski wrote:
>
>
>
> On Thu, Aug 31, 2017 at 3:13 PM, > wrote:
>
>> Errors : yes garbage characters on the receiver side
>>
>> Cross-talk : so I have had a servo motor (powered from it's own ubec) 
>> plugged in, however I thought that the ubec noise might be interfering, so 
>> I tried running the PWM signal without any device attached (no servo ubec 
>> running) and no pwm wire plugged into the beaglebone. But still had the 
>> same issue.
>>
> OK--so now can you test by losing the open/close ,disconnecting the XBee 
> and jumpering TX and RX and writing some simple text out and checking that 
> you receive it back correctly, while running PWM. If you see errors, then 
> maybe beaglebone is sensitive to crosstalk; if you don't then the crosstalk 
> must be in the XBee. BTW, suppying the  servo from a separate power supply 
> might not fully prevent interference--it could be kickback from driving the 
> servo.
>
>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to beagleboard...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/eabc977d-e1ea-4c07-abf3-6193fe8c2518%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9b11f7f9-9cb8-4b85-a81c-8a36e680a895%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: UART PWM Interference

2017-08-31 Thread Przemek Klosowski
On Thu, Aug 31, 2017 at 3:13 PM,  wrote:

> Errors : yes garbage characters on the receiver side
>
> Cross-talk : so I have had a servo motor (powered from it's own ubec)
> plugged in, however I thought that the ubec noise might be interfering, so
> I tried running the PWM signal without any device attached (no servo ubec
> running) and no pwm wire plugged into the beaglebone. But still had the
> same issue.
>
OK--so now can you test by losing the open/close ,disconnecting the XBee
and jumpering TX and RX and writing some simple text out and checking that
you receive it back correctly, while running PWM. If you see errors, then
maybe beaglebone is sensitive to crosstalk; if you don't then the crosstalk
must be in the XBee. BTW, suppying the  servo from a separate power supply
might not fully prevent interference--it could be kickback from driving the
servo.

>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/eabc977d-e1ea-4c07-abf3-6193fe8c2518%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAC%3D1GgH35Dwx1e%3DdvTkWoABceNwZyRNPUte8noF8kfkMeidwNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.