Inspired by Wildebus

Yes Dave this what I'm doing. When the PTC goes into motor run mode I use this wire to operate a relay that switches two 12 volt fans over the cooling element. The down side is that the resistance in the relay coil winding messes with the PTC, so it's duty cycle changes. So when the compressor is running, so are the fans. What I'd like to do is run the fans via current sensing and better still have a delay to remove residual heat from the cooling element.
I'm tempted to try one of these as a switch.

Being thick here what is a PTC ?
 
Last edited:
yup, a hall effect sensor controlled device should work like that. But is it an advantage to have the fan only running when the compressor is running though? that is what I am wondering 🧐
I've not checked how much power my external fridge fan uses when it is running, but when it is running due to a high temp, typically that also means it is very bright sunny day to produce the heat, which also means the solar will be working nicely (so the power to the fan is a very small amount of the improved harvesting?)
I wonder if a 12V digital timer would work well maybe? so as soon as the fan kicks on, it will run for the time the temp is above the selected "fan on" temp OR the duration of the timer, whichever is the shorter, then set to not be allowed to come on again for say 60 minutes?

I have this kind of setup for my 2kW water heater so when that comes on, it will cycle on for a few minutes then off for some time to avoid a long single hit on the battery.
I use this timer and am pretty pleased with it -
https://amzn.to/2TasXLY
1589547185791.png
 
I wonder if a 12V digital timer would work well maybe? so as soon as the fan kicks on, it will run for the time the temp is above the selected "fan on" temp OR the duration of the timer, whichever is the shorter, then set to not be allowed to come on again for say 60 minutes?


Are you talking with the Arduino setup? Timing can be done in the software surely?
 
As mentioned, after seeing Dels success on his home-made cables, I decided to have a go, but this time buying a proper donor USB Cable...

......
So it looks like the home-made cables will read and send data between the Pi and the Devices as needed.

Nice one, alwaysared 👏👏
The USB-UART cables I got came as a two-pack, so I decided to use the second cable a little differently :)

Fitted a JST 2.0 pitch connection (the type fitted to the Victron Devices) to a PCB (slightly tricky as the typical PCB has a wider pitch).
Also fitted a 3-connector screwdown block to the PCB and a 3-pin connector, all wired in parallel
1589559643329.png

So I connected a Flying Lead with the JST female connector to the green screwdown block; the 4 pin JST male connector is ready to accept a standard Victron VE.Direct-VE.Direct cable (saves having to adapt an existing cable if changing from a Venus/CC GX to a Pi), and the 3 pin connector accepts the plugs pre-fitted on the USB Cable.
 
I have a BMV-712 and a MPPT 100/30 connected to a RPi. I have dropped the Victron portal in favour of my own data logging as I can then use products from different manufacturers.
There is also AC in measurement for current and voltage from which consumed kVA can be calculated. From this I intend to run a 3 way fridge from an inverter when the sun shines, saving LPG.
Leisure Battery temperature is another variable that can be logged.

More to come hopefully from B2B and battery maintainers.

RPi_CL3.jpg
ACinput.png
hardware.jpg
 
Are you talking with the Arduino setup? Timing can be done in the software surely?

The circuit for the fridge motor is AC so you could use an Arduino as a voltmeter for AC and work out if the motor is on or off. Easy enough to try with an ordinary meter first to see if it upsets anything and work out where the voltage can be measured. It's a reasonably simple circuit with a few resistors and a diode. Arduino Volt Meter You don't need the display part of it just the small circuit. Nice little project for the summer while you have nothing to do.
 
If you wanted the TTL level 5 volts to 3.3 volts couldn't you just divide the voltage with a couple of resistors?

Sorry it will not work. Use a DC to DC converter which gives you the power output you need. That is all that is in the 12v to USB sockets. It cannot be done with resistors unless you know the resistance of the circuit you want to connect.
 
After posting on here about the Victron Colour Controller Wildebus said it was possible to use a Raspberry Pi with two VE Direct to USB cables (for my BMV712 and M100/30 MPPT controller) and a MK3 VE Direct USB cable for my 12/3000/120-16 inverter/charger so this inspired me to try it out. So I purchased a Raspberry Pi 3 Model B+, a case and a 16gb Sandisk Micro SD card from Amazon for £44.18. I then followed a link on here to our sister site motorhomebuilder.com which in turn had a link and a picture explaining how to make your own VE Direct cables, so I bought a couple of USB to UART cables which cost me £6.99 and a pack of five four pin JST leads for £2.49, unfortunately for me they had different colour cables to the ones in the picture but I found out which pins were which on the MPPT and BMV. I followed the picture but it didn't work then I realised that the picture had a fundamental flaw! It shows the TxD on the USB going to the TxD on the JST plug and RxD on the USB going to the RxD on the JST, but it's obvious that this is the wrong way round! The RxD on the USB goes to the TxD on the JST and the TxD on the USB goes to the RxD on the JST, once I had switched them round it work okay and I already had the cable for my inverter/charger. So everything works as expected,.......

Del
Quick question ...
Have the cables been reliable for you? any device disconnections?

Asking as I setup my test rig yesterday, comprising:
  • Raspberry Pi
  • BMV-712
  • MPPT 100/20
  • 2 x 100W Panel
  • 75Ah "Leisure" Battery
  • 34Ah "Starter Battery"
  • Mains Charger as an "Alternator" on Starter Battery
  • B2B between Starter and Leisure Batteries
The BMV and MPPT are connected to the Pi with the DIY cables. The BMV has been seen all the time, but the MPPT disappears at random and for hours - but at the time it is not seen by the Pi, it IS still active and working, so I am wondering if there is a cable problem? not tried swapping the two USB-VE.Direct cables over yet, but thought just ask if you've seen disappearing products on yours?

Currently, Solar went AWOL 32 minutes ago ...
1591013474585.png
 
My Pi 3 B+ runs with a BMV and MPPT, I use the Victron VE.Direct cables and it has worked for 18 months without dropping.

Strangely I have the attached sat on the table but I can't remember what I tried or what success I had.

Linux can give a USB devices a different address each time it starts up if more than one device is connected. I.e. the BMV may be /dev/ttyUSB0 today it may be /dev/ttyUSB1 tomorrow. A Pi running the Venus OS does not suffer this in my experience.15910189295468134306139619932699.jpg .
My own code looks for the product id BMV or MPPT from the data sent by the Victron bits.
 
It was really about the DIY Cables and if there is something about those cables which could maybe cause an problem, rather then using the Raspberry per se. The Pi hadn't restarted at the time the device disappeared (otherwise all device data would have gone at the same time) and if a new ID popped up, then in the Victron VRM, there would be an extra device listed in the devices. So Pi running and Device running - so have to suspect the cable in-between.
Makes me wonder if the dongle lump on the Victron VE.Direct - USB cable has maybe some kind of noise suppression?


As an aside, I found the Pi running Victron OS can actually be quite annoying on device ID changing at random in some circumstances. When I had the Multiplus connected to the Pi 18 months ago I used to get random reassignments of ID on that device (but not on the VE.Direct devices). IIRC, got 4 different IDs for the same Multiplus in a couple of hours one time. The same Multiplus on the Venus GX has only had one ID ever.

Want to run the standard Venus OS on the setup for a week or so to make sure everything is working correctly before I introduce a change of OS.
 
Quick question ...
Have the cables been reliable for you? any device disconnections?

Asking as I setup my test rig yesterday, comprising:
  • Raspberry Pi
  • BMV-712
  • MPPT 100/20
  • 2 x 100W Panel
  • 75Ah "Leisure" Battery
  • 34Ah "Starter Battery"
  • Mains Charger as an "Alternator" on Starter Battery
  • B2B between Starter and Leisure Batteries
The BMV and MPPT are connected to the Pi with the DIY cables. The BMV has been seen all the time, but the MPPT disappears at random and for hours - but at the time it is not seen by the Pi, it IS still active and working, so I am wondering if there is a cable problem? not tried swapping the two USB-VE.Direct cables over yet, but thought just ask if you've seen disappearing products on yours?

Currently, Solar went AWOL 32 minutes ago ...
View attachment 82599
I had the same problem with the MPPT dropping the first couple of days, the BMV and Multiplus never dropped out though. I swapped the home made cables over with the each other, still the same. I was using a USB extension cable so I swapped that still the same. This went on for the first three days, my son then suggested plugging it into a different USB port on th Pi and low and behold it's hasn't dropped out since! Don't ask me why but it could be something to do with way Linux addresses them I suppose.
The Victron VE cables are only really doing the same thing, converting USB to serial and the way that's done is with a UART adapter and like everything in life I'm sure there are good and bad ones. I've been happy with my setup, well at least since day four :)

Regards,
Del
 
I had the same problem with the MPPT dropping the first couple of days, the BMV and Multiplus never dropped out though. I swapped the home made cables over with the each other, still the same. I was using a USB extension cable so I swapped that still the same. This went on for the first three days, my son then suggested plugging it into a different USB port on th Pi and low and behold it's hasn't dropped out since! Don't ask me why but it could be something to do with way Linux addresses them I suppose.
The Victron VE cables are only really doing the same thing, converting USB to serial and the way that's done is with a UART adapter and like everything in life I'm sure there are good and bad ones. I've been happy with my setup, well at least since day four :)

Regards,
Del
Interesting. This afternoon I tried swapping the cables and I also have used different USB sockets (must admit, I just plugged them in willy-nilly in that respect so not been tracking that aspect but I do know it is a different pattern of USB used).
Just looked and now I see the BMV has been off-line for 2 hours but the MPPT is still there, so I think maybe I do have a dodgy cable? I'll buy another pair to adapt I think as not expensive and handy to have.
 
Changed ports couple of days ago and both back again. Just had a look and the BMV went off-line just before midnight last night.

So different tactic this time .... Plugged DIY USB Cables into a little 4-port USB Hub and plugged that into the Pi. So both now using same physical USB Port on the Pi. Will see what happens this time (I have used this same actual Raspberry Pi for many many months in my van before I installed a Venus GX and was always reliable (except for Device ID swapping on MP) and also use a USB Hub as well before (due to physical size of Victron Dongles) so should be fine.
I am running the lastest Venus OS though - maybe something in that is a bit buggy for the Pi?
I do have a genuine Victron VE.Direct-USB Dongle somewhere so might try and find that as well?
 
When using the Victron USB / VE.Direct leads each lead will have the same ID made up of a pair of hexadecimal numbers, like 04f2:0112 , first part is Vendor ID then Device ID. I guess that won't help the Pi identify which device is connected. Try lsusb -v in terminal.

If I remember correctly the leads have different serial numbers. Sorry I can't check this at the moment.

Hence in my code I looked for the Product ID, like MPPT or BMV.

Am I right in thinking the original Venus for Pi was ported by a South African guy, perhaps he has an answer.
 
Interesting. But if you are using DIY leads with no intelligence in them, just wires, every lead is the same, no?

Since using a hub, both devices are being read. (to early to be sure, but some more cables arrived today to modify anyway so will make another pair up :) )
 
Interesting. But if you are using DIY leads with no intelligence in them, just wires, every lead is the same, no?

Since using a hub, both devices are being read. (to early to be sure, but some more cables arrived today to modify anyway so will make another pair up :) )

I guess a lead that has no ID is no better than the Victron leads which have the same ID.
 
Been 48 hours now since I connected the devices via a cheap little hub and no disconnections :)
I don't know but I am suspecting when the Victron OS goes and samples each device for data some kind of polling happens linked to the USB port IDs. I am thinking there is a little bug in the OS when used with the Pi?
 

Users who viewed this discussion (Total:0)

Back
Top