Raspberry Pi and FTDI USB (or Serial)

For more advanced meter data users. Learn from others and ask questions about how to read meters, how to use the EKM Push Data, and how to display the meter data in useful ways.
Posts: 857
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA

Re: Raspberry Pi and FTDI USB (or Serial)

Post by Jameson »

I would say that it is quite normal to not have 100% good data when using the 485Bees. Good communications can depend on a myriad of factors, good line of site connections, the antenna orientation, the antenna distance from the ground, other 900mHz noise in the area. If you are only getting occasional bad reads and your software can handle the bad CRC, you should be OK. If you want to improve your 485Bee communication reliability, you can try moving the 485Bees to a higher location or pointing the antennas at a different angle (I like to not point them directly at eachother, but at about a 30 degree angle away from pointing directly at eachother). I have seen communications as bad as one good read in 20 (rural location, many trees, many mesh hops), depending on your needs, that can work too.

The radio will not mess with your RS485 data on your wires, RS485 is an industrial standard that is super robust in industrial environments which can have a lot of RF pollution.

Let us know what you find with your scope!
Posts: 10
Joined: Wed Aug 27, 2014 7:45 pm

Re: Raspberry Pi and FTDI USB (or Serial)

Post by nielo »

I'll start by saying that, in this particular case, I can dramatically effect the reliability of the link by moving the wires closer or further away from the radio antenna. The problem was most noticeable when I used a radio with a wire antenna as opposed to a whip. With a wire antenna the RS485 cables are inherently closer to the antenna and placement of the wires was extremely critical. BTW, I'm only going approximately 50 feet through 2 walls and I had this system connected and running flawlessly for about 3 years, until my house painters messed up the wiring. After that I took the opportunity to rewrite the software and had to rewire the RS485. Unfortunately, this time around, I didn't have any shielded twisted pair wire (as I originally used) on hand so I used unshielded Cat5e.

I'll wind this up by saying that I'm an old dog and I've used RS485 in industrial settings literally for decades, most of the time without a hitch. However, in my real-world experience, the standard is a twisted shielded cable and if shielding isn't used you can get into trouble, especially if the cable isn't terminated properly. As I understand it, EKM does not terminate the cable in their meters (apparently you do use bias resistors but I don't know the details of them). I've considered adding terminating resistors at each meter to see if that helps. But like I said, I'm lazy so I haven't done that (yet). Maybe today?

Your RS485 to XBee board has a jumper that says something that I've interpreted as meaning installing the jumper connects a terminating resistor, but I don't know it's value (I assume it's about 120 ohm) and by itself it won't stop the cable from ringing like a bell under the wrong circumstances.

I'll let you know what I did when I get around to fixing the problem. :)
Posts: 10
Joined: Wed Aug 27, 2014 7:45 pm

Re: Raspberry Pi and FTDI USB (or Serial)

Post by nielo »

An update.

I used 100 ohm resistors (Cat 5 characteristic impedance is 100 ohm) to terminate both ends of the buss and the dropped packets almost went away. I still have a bunch or retries (a failed packet, either length or CRC, and I retry once after a 500 ms delay) all of which, after I terminated the buss, were successful, until I mowed my lawn (more about that in a second). Btw before the terminating resistors were installed at least half of the retries failed, as many as a dozen failures in an hour.

Since I terminated the buss there have been dramatically fewer retries and they all were successful, until I mowed the lawn close to the radio. While I was mowing in the area of the radio (about 5 minutes) I had a bunch of retries, most of which failed. Since I finished mowing, no more dropped packets. So, what does mowing the lawn have to do with anything? My guess is the mower ignition system is relatively noisy electrically. I'll find out when Amazon delivers my recently ordered Cat 7 cable and I rewire the RS485 buss with shielded wire.

I'll let you know what happens. :)
Posts: 1
Joined: Tue Apr 07, 2020 12:13 pm

Re: Raspberry Pi and FTDI USB (or Serial)

Post by maggarwal »


Can you please publish the project to github? It'll be helpful to others since many people are trying to create similar solutions for themselves.

Posts: 4
Joined: Wed Nov 19, 2014 8:58 pm

Re: Raspberry Pi and FTDI USB (or Serial)

Post by flyrjh »

Wow, it's been a while. I've been running this for several years now, but my house had a direct lightning strike back in the fall and it killed my meter, as well as the Raspberry and a lot of other equipment, despite my diligent grounding and UPS usage. Then today I ran across this post.
Here's what I've been using; I'll have to pull the code back out once I get the meter replaced this spring.
You can see when the AC cycles off and on, the refrigerator, when someone takes a shower or washes dishes, and in the summer when the grill is running.
20200720_utilities.png (163.97 KiB) Viewed 22421 times
Post Reply