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.

PowerForum Solar Data Collection - using a Raspberry Pi 3 :-)

Featured Replies

JDP, are you going to assist with the Voltronic devices, for this project?

  • Replies 491
  • Views 94.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Let me tell you guys something. Writing at the lowest possible level, i.e. C and assembler, allows one to extract and use all the available power from a microcontroller. While there's not really aythi

  • Chris Hobson
    Chris Hobson

    Hi PLonky  When I am prototyping I generally use a breadboard rather than a breadbin.    

  • I'm making an image of the Rpi distro now. I'll post a link here in a few minutes, soon as I have the wifi details and stuff sanitised :-)

Posted Images

TTT if I have time I can see what to do but at this stage I am building a new controller for the other project. I have printed the case for the new Pi and still need to design the case for the screen. Then build that all into the cabinet etc etc etc. And then I need to still update AICC

What do you want me to do ?

 

IMG_8542.JPG.604d67e097c56eb5f6c04b431c1

Nice!!!

The part where Plonkters Blue Lantern can read data from Voltronic devices?

I PRESUME it is easy enough as you have done it already under Windows?

Cards have arrived. Setting up quickly.

Out of interest Plonkster, yesterday I used a Samsung charger, with its USB cable.

Today I used same charger, different USB cable.

Pi did same where it looped.

Interesting.

Dont get me started with phone chargers as a power source for controllers. One om my prototypes in the field would just stop responding in the middle of a process. Long story short I used a iPad charger as it has 2 amps 5 volts. It will shutdown for no reason at random and the only way to get is back is by cycling its power. Now I will be using another type of power supply. 

I had the reverse case. To be fair, I made a mistake in my setup and forgot to pull up a reset pin on the can controller... however my mistake gave me insight into the quality of my power supplies. I started with a "powerful" 2.1 amp 5V supply. It would hang up within seconds (the noise obviously caused random resets on the floating pin). Then I switched to an official 2A Pi power supply (borrowed from work), you know the white one with the Raspberry logo on it. That was better, but still only worked a few minutes. Then I used a 850ma Samsung phone charger. That was good enough to give stable operation for an hour or more at a time.

That is to say, out of all my 5V power supplies, the best one was the Samsung phone charger.

I googled a bit and found a similar result, someone went through the same process and found their Sony Xperia charger to be the best.

Of course these things are sourced from the lowest bidder, so YMMV.

Plonky how long do you let it run. The process I control and monitor runs for 7 days at a time. Some times it will be 100% and then randomly it will hang up. At first I thought it was die controller. It is very difficult to debug as the prototype is 200km from me.  But following a process of elemination we found it to be the power supply. I am adding a external watchdog now to make sure things stay up. It is still a work in progess. I am not saying all chargers are bad. I used 2 iPad chargers and they both did this. But I have not tested other brands chargers. The current test bed is using a Body Glove 6 port charger and it is hooked up to a ups. I have not had any funnies yet. 

https://m.takealot.com/#product?id=PLID39155315

6 hours ago, The Terrible Triplett said:

Nice!!!

The part where Plonkters Blue Lantern can read data from Voltronic devices?

I PRESUME it is easy enough as you have done it already under Windows?

TTT I thought Ed is helping you out with that. Het has usb and com port going. 

TTT I thought Ed is helping you out with that. Het has usb and com port going. 

Indeed ja. But any help is always welcome...[emoji6]

Sent from my SM-N900 using Tapatalk

I just asked JDP, not to offend anyone or anybody, seeing you are talking Plonksters language, that if a windows developer decides to go jumping into a snake pit, oeps sorry, start developing in Python ... after seeing Plonskter operate ... that it may take a wee bit longer from the windows perspective. :)

Hi TTT,

I saw your email last night. But as you probably noticed, I was having fun with a WRND charge controller :-) I'll probably get around to it on the weekend.

Re the BMV, plug it in. IT speaks VE-Direct, it will be easy to hack something together.

Re The mk2 protocol issue, still haven't heard from Victron about it. I downloaded the latest version of the documentation, to make sure I'm not being an idiot, but it definitely seems to be a bug on their side. Their documentation says the reply to a W command will always have a payload length that is a multiple of three, and what I'm getting here is clearly wrong on two counts: There is no 0x8f in there (which would have been okay if it decided not to answer that bit), but there are two bytes there making the total 5 instead of 6. I can hack it, so that it assumes that value is zero if it is too short... or that it assumes the two bytes that are there is the offset... but it has the potential to cause problems. Would prefer to know the correct way to handle it.

Cool!!! You can see it now and I got my screen back, for I can RDP to it from Windows. :D

Will a powered USB hub work on the Pi, or will I let the smoke out again, to add more USB ports?

Or must the HUB's PSU not be connected?

Okay @plonkster, connected to your software running on a graciously donated Pi from you, using a brand new 16Gig SanDisk card, you should be able to see the following:

1 x BMV 700
1 x Phoenix Inverter
1 x MPPT 75/15

Can you see them?

Just now, The Terrible Triplett said:

Can you see them?

Insert line from Alo Alo episode...

Lady from French resistance, through the window: Psssst! Is the coast clear?
René: How am I supposed to know!? The coast is 50 miles from here!

I see two usb-serial devices:

pi@raspberrypi ~ $ ls /dev/serial/by-id/
usb-FTDI_FT232EX-if00-port0
usb-VICTRONENERGY_MK2USB_COM_Interface_FTL6RJ4L-if00-port0

But I do see three usb devices from manufacturer 0403 (FTDI).

pi@raspberrypi ~ $ lsusb 
Bus 001 Device 006: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 008: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And I do see three serial devices "by path"...

pi@raspberrypi ~ $ ls -l /dev/serial/by-path/
total 0
lrwxrwxrwx 1 root root 13 Mar 17 12:59 platform-20980000.usb-usb-0:1.2:1.0-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 Mar 17 12:58 platform-20980000.usb-usb-0:1.4:1.0-port0 -> ../../ttyUSB2
lrwxrwxrwx 1 root root 13 Mar 17 12:57 platform-20980000.usb-usb-0:1.5:1.0-port0 -> ../../ttyUSB1

So the bmv is on ttyUSB1, but udev is not correctly mapping it. Fun...

Using the "by path" alias will also work for config, but then it has to go into the exact same USB port every time.

And here is a frame from your BMV:

PID	0x203
V	26426
I	1454
P	38
CE	0
SOC	1000
TTG	-1
Alarm	OFF
Relay	OFF
AR	0
BMV	700
FW	0307
Checksum	�^C

So yes... enough to work with.

AWESOME!

So while I was waiting for something to finish, I configured your pi for the hardware you have, updated the code to the latest, and fixed the issue with the VE-direct module that was expecting a 'P' heading.

I found out that today your MK2 is behaving according to spec, and it's actually working correctly.

In other words, you currently have a setup that's working as well as my own at home :-) Open up port 6543 and show it off :-)

1 hour ago, The Terrible Triplett said:

Will a powered USB hub work on the Pi, or will I let the smoke out again, to add more USB ports?

The Pi will not boot when back-powered from a hub. You can however boot it using the micro-usb power socket, plug it into a powered USB hub and then remove the PSU... and it will continue to run from the back-power at the hub. This is USUALLY safe because most hubs have a well-regulated 5V supply. However... running it like this provides no power protection, and the Pi will also fail to reboot.

In other words, it is best not to do this.

THANKS Plonkster! Busy sorting the port.

Here is a pic so long:

% Load and Load looks right.
PV is from my off-grid 12v system, so therefor it is so low.
Battery Charge, what am I looking at there, the numbers I do not recognize?

Values.jpg

23 minutes ago, plonkster said:

The Pi will not boot when back-powered from a hub. You can however boot it using the micro-usb power socket, plug it into a powered USB hub and then remove the PSU... and it will continue to run from the back-power at the hub. This is USUALLY safe because most hubs have a well-regulated 5V supply. However... running it like this provides no power protection, and the Pi will also fail to reboot.

In other words, it is best not to do this.

won't it still cause a "ground loop" fault? I haven't tried this with a Pi, but this didn't work with an Arduino or a PCDuino in the past. 

3 minutes ago, The Terrible Triplett said:

Battery Charge, what am I looking at there, the numbers I do not recognize?

It takes what's coming in (27 watts), subtracts what is going out (554 watts) and the remainder comes out of the batteries. That is the assumption.

The plan is to implement another kind of equipment (other than pv and load) that will be used for monitors like the BMV. Those values will then be used rather than calculating it like this.

2 minutes ago, SilverNodashi said:

won't it still cause a "ground loop" fault? I haven't tried this with a Pi, but this didn't work with an Arduino or a PCDuino in the past. 

I'm regurgitating what I read online a few days ago. Yes, ground loops is a possibility. Long story: don't do it :-)

TTT, repeat 3 times: You will not power the Pi from a USB HUB. You will not power the Pi from a USB HUB. You will not power the Pi from a USB HUB.

Next question: Plonkster, what will happen to the Pi's USB port numbers if I connect a USB HUB, not powered, to the Pi to get more ports?

1 minute ago, The Terrible Triplett said:

Next question: Plonkster, what will happen to the Pi's USB port numbers if I connect a USB HUB, not powered, to the Pi to get more ports?

No idea, but I expect the by-id names will remain the same, and the by-path names will change. That's fine actually... I expect that when you have such a thing permanently set up, you won't be moving stuff around. Label the ports and be done :-)

10 minutes ago, plonkster said:

The plan is to implement another kind of equipment (other than pv and load) that will be used for monitors like the BMV. Those values will then be used rather than calculating it like this.

Is it not an idea to use the Battery then for the BMV monitor?

IF BMV = 0
     Then use your calcs
ELSE
     Display BMV SOC
END

3 hours ago, The Terrible Triplett said:

Is it not an idea to use the Battery then for the BMV monitor?

IF BMV = 0
     Then use your calcs
ELSE
     Display BMV SOC
END

Yup, that is the plan. The BMV is more accurate, so if it is available, the plan is to use that. Otherwise, derive it from the other values. In time, I think we'll figure out how to adjust for inefficiencies.

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.