Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

InfiniSolar V USB protocol

Featured Replies

41 minutes ago, SilverNodashi said:

In the case of electronics like an inverter I would thinks it's still quicker than serial communications? On an Arduino, for example, I can communicate much quicker than 2400pbs, and in fact in many instances (like a GPS tracker) anything below 115200 is too slow to get all the data quick enough. Microprocessors have real time processing. An Arduino, as example again, runs at 16Mhz - that's 1/16000000 of a second  that it could run an instruction. Some instructions run on two cycles, and some on three, but that's still super fast. Computers are faster but due to multiprocessing things could happen slower, depending on how many threads, and cores are being used.

For GPS, USB is considered inferior to RS232 because of the unpredictable latency. Pulse-per-second + RS232 is the gold standard (pretty much a crude type of SPI implementation). At least if you care about accuracy

Also 115200 is not the maximum speed supported by most RS232 implementations :)

Most stratum-1 low cost time servers that are considered good are using GPS + pulse per second. You can even build your own incredible accurate time server (ns drift) using a GPS and RS232. With USB you are looking at seconds accuracy.

Obviously the best stratum-1 servers are using atomic clocks but a GPS module gets pretty close (GPS satellites themselves have incredible accurate atomic clocks). You can't get accurate location data without an incredible accurate clock.

TL;DR: RS232 is better unless you need bandwidth but on the Axpert, bandwidth is not the problem

Edited by Gnome

  • Replies 104
  • Views 31.9k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • All I have to share are a few facts that I have learnt in my many decades through life which are edging towards eight although thankfully not quite. So perhaps some may reason that I am already senile

  • So personal story from my life, some 5 years ago. I lost my temper so badly one day that I physically started to bash in the door that my wife had just shut in my face. Thankfully the red mist cleared

Posted Images

2 hours ago, Gnome said:

Several things to note about USB:

  • USB doesn't have any kind of synchronous protocol
    • Sure the actual data transfer is full-duplex but the protocol itself is asynchronous model
    • You tell the USB controller to send packets to the device and it'll send it when it is good and ready
    • The device then responds to the controller which will notify VIA an IRQ again when it is ready
  • USB has higher latency and unpredictable latency
    • Because of the above, USB is not used for time critical applications like GPS and time sources
    • RS232 is still considered superior in this space

Now as for RS232 it does not have the bandwidth that USB has but it has lower latency. Other than parallel there is no lower latency protocol (OK there is SPI but it isn't well supported). Not only that, the actual latency is 100% predictable and repeatable.

Meaning if you are running a real-time operating system (which we are not), you can exactly time your RS232 on clock cycles with relative accuracy (some accommodation must be made for clock drift on the order of μs, but compared to USB it is orders of magnitude better).

Lastly, the Axpert device isn't limited by the speed of the RS232, it is limited by the device. 2400bps is as good as it gets.

I've got a library I wrote that allows both USB & RS232 to be used for Axpert. The library is otherwise using the exact same code. The total latency is exactly the same between the two ± 15ms.

I found USB to be less reliable on the Axpert. Doing things wrong on USB I was able to cause the inverter to stop responding to commands which required a restart (mind you the inverter still ran normally). But on RS232 it was more reliable.

Interesting that you mention this, as I noticed this on a client's Inverter. He has 3 Infinisolar inverters, all running the same firmware with 3 x Raspberry Pi's, 3x new Sandisk MicroSD cards and 3 identical (bar different IP address and hostname) of ICC. The one would randomly stop collecting data and a reboot of the Pie fix it. A new cable didn't help, nor reinstalling Linux and ICC so it's probably the USB port on the inverter.

2 hours ago, Gnome said:

For GPS, USB is considered inferior to RS232 because of the unpredictable latency. Pulse-per-second + RS232 is the gold standard (pretty much a crude type of SPI implementation). At least if you care about accuracy

Also 115200 is not the maximum speed supported by most RS232 implementations :)

Most stratum-1 low cost time servers that are considered good are using GPS + pulse per second. You can even build your own incredible accurate time server (ns drift) using a GPS and RS232. With USB you are looking at seconds accuracy.

Obviously the best stratum-1 servers are using atomic clocks but a GPS module gets pretty close (GPS satellites themselves have incredible accurate atomic clocks). You can't get accurate location data without an incredible accurate clock.

TL;DR: RS232 is better unless you need bandwidth but on the Axpert, bandwidth is not the problem

My GPS applications don't run over USB but rather over serial. Well, it's connected directly to the Arduino's serial pins. But I noticed that if I run my serial monitor at anything slower than 115200, I don't get all the data - even though it's read by the Arduino as I can see it in the data logging app.

Short answer: Just because you can (communicate fast) doesn't mean you have to :-) And that's why we have DMA controllers (and similar things offloading the dumb work of moving data) and interrupts. You can literally tell some cheap chip somewhere "hey you send this 1024k and tell me when you're done!" and in the computer equivalent of a century (because the cpu is so much faster) it will come back and say... hey, I'm done... and then you say "right, here is another 1024k... let me know when you're done", and so it continues, leaving the CPU to do more important stuff.

:-)

11 hours ago, plonkster said:

From the PC up to the USB-serial chip it is faster. From there onwards it runs at normal serial speeds.

Yes. Remember that commands and their responses all ultimately get to and from the inverter's Digital Signals Processor via a 2400 bps serial port. That's about 4 ms per byte, so a 100 character response takes some 400 ms (0.4 seconds) to shuffle out of the processor. From there it can get to the PC or Pi over serial or over USB, but it's still going to take nearly half a second to get that long response.

With a little effort, it could have been so much better.

Edited by Coulomb

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.