Nieuw project Hulp nodig?
  • Labs project

CAN Bus for solar PV cell monitoring

Status: Voorstel
11 februari 2017 , Laatste update: 15 mei 2019
CAN Bus for Solar PV cell monitoring

25 KW roof top solar PV cell with 55 big panels each generating 24 volts which goes to a big black box to produce 220 volt single phase AC at the same time one thick pair goes into an invisible room full of batteries. Each shop has a light connection from this inverter which is supposed to light for 6 hours in the evening from 5:30PM to 11:30 PM. The setup was inaugurated with much fun and fare in the presence of a big shoot who came down from head quarter.

At the beginning the system worked fine for sometime but slowly over couple of months the performance deteriorated such that even after a thorogh charging of flat 10 to 12 hours the system did not work more than 3 to 4 hours.

The brick batting started. The Township administration department (TAD) started blaming for poor quality installation, cheap PV cells etc.

While a quick glance at the roof top installation revealed the mystery in no time. The 55 panels each 500 watt is spread over three rooftops and a huge number of pigeons and crows were flying when they found I was an invader to their statuesque. Most of the PV panels are dirty with at least a few bird dropping.

The shopping complex is situated adjacent to the market place which is thick with birds like crows and pigeons. The droppings are so frequent that the almost all panels get the complete share in about a fortnight time.

The remedy I suggested to clean each panel by water wash every alternate day and for a long term measure to shift the panel away from the market place where so much birds are not present.

The regular cleaning improved the performance to the original level however, they found that every alternate day not all but a few panel gets dirty therefore, only selective cleaning was sufficient to maintain the performance. But since it’s spread on three roof tops ,the washing man has to check all the panels first and then do the selective cleaning. The checking takes substantial time as he has to go round all the panels to look for cleaning.

The TAD man confirms that for the 55 panels this was rather easy but for their next setup for 100 KW PV panel on the turbine hall roof top would be a nightmare for the cleaning man. He wants a desperate solution just to know which panel needs cleaning so that the bucket man can go straight to that panel and do the cleaning in no time.

CAN BUS: Control Area Network on Arduino is a great solution for measuring the performance of the individual solar PV cells. CAN bus was invented by Bosch for the automotive industry for collecting signals from hundreds of sensors connected to an automobile – ambient temperature, tyre pressure, bank angle, brake fluid level, engine temperature, speed, AC temperature and many more. All are connected on just two wires which brings to the main central computer which monitors and if requires , issues control command on the same two wires to the respective sensors.

Say the Anti Skid Brake (ABS) – it’s gets command automatically depending on the car speed, brake applied and the steering angle. It is issued by the central computer and goes to the ABS without even knowing ! So is the airbag safety which opens automatically on signals from speed sensors and impact calculations.

The can bus runs from node to node using a shielded twisted pair cable having an impedance of 120 ohms. The end nodes are connected with two 120 ohms resistors to stop signal reflection through the ends.

T hat’s the CAN bus transceiver built on MCP 2515 chip, the module comes less than $1.5 from china international markets. It is connected on SPI bus. The barrier strip is for connecting with the CAN bus – the high and the low cable. The cable used is good quality shielded twisted pair copper cable. For microprocessor we use ATMEGA328 Arduino UNO. The sensors can be connected to the digital and analog IO pins of the Arduino. For driving the control command one can connect relays, servos and other output devices on the remaining IO pins.

All the to and from communications will travel using these two wires only – that’s the beauty of the CAN bus. No mix up , no collision and the system works solid & error free.

For simplicity we will use only CAN 2.0 which can carry only 0 to 8 byte data at a time from one node to the other. All the nodes including the master gets an identifier (0 to 255) through which each will send & receive the communications. The lower the identifier the higher the preference of send & receive. Usually the master gets the lowest identifier. CAN bus has excellent error checking capability.

Typical CAN Bus setup:

That’s a typical CAN Bus setup. The number of nodes can vary from 0 to 130 on a single BUS and the length (L) also varies from few meters to few kilometers.

As the speed reduces more distance can be covered between the end nodes. However for going beyond a few hundred meters the CAN bus repeater may be used to improve the signal strength. The maximum nodes may be used on a typical BUS on CAN 2.0 is not more than 120. The extra advantage of CAN BUS over RS485 MODBUS is one can connect about 120 nodes unlike 32 nodes on the other.

BUS speedBUS length
(L or d)Cable stub
length (l)
1000 Kbit/sec  40 meter  0.3 meter
500 Kbit/sec   110 meter 0.3 meter
250 Kbit/sec   240 meter 0.3 meter
125 Kbit/sec   500 meter 0.3 meter
100 Kbit/sec   500 meter 0.3 meter
50 Kbit/sec1   300 meter 0.3 meter
20 Kbit/sec3   300 meter 0.3 meter
10 Kbit/sec6   600 meter 0.3 meter
5 Kbit/sec1     30 KM       0.3 meter

Solar PV cells health monitor: That means in one set up we can add 120 solar PV cells for getting it’s health related signals – the voltage and the current it contributes. Since the voltage is same all along the PV cells as all are connected in parallel, the only difference it creates is the current it delivers. Therefore, a simple current sensor is connected at the discharge point of each PV cell.

A CS712 is a hall probe for measuring current. It can measure current upto 30 amperes. It takes 5 volt supply and the current signal is generated on the ‘out’ terminal. The barrier strip is for connecting it in series with the power circuit. In international china market it costs around $2 a piece.

l oad_current = 0.075714*(analogRead(A0) - 512); //for direct current reading from an ACS712-30 current sensor whose ‘out’ pin is connected to the A0 pin.

Design: ATMEGA328 chip is built on Arduino UNO. The 5 volt supply is taken from the 24 volt output going to the 24 volt bus using a small Buck charger. The cost of this kind of buck charger is about $2 a piece. The advantage of using Buck charger instead of normal step down regulator is that it does not heat up, thus there is no heat loss except other than taking small power for running the Arduino.

Schematic: Besides dirt, grime and pollen the other irregularities that can happen with your solar panels are – Humidity resistance (small bubble formation on the surface), snail trail (discoloration of the surface), micro cracks and hot spot. Anything happens the output will go down as high as 35% which can be reflected in the current measurement.

Since we are not interested in measuring the absolute current contribution of the panel but the current number it delivers, therefore,

instead of measuring the absolute load_current = 0.075714*(analogRead(A0) – 512); in amperage , we will measure only load_current = analogRead(A0) – 512; in number. This number will be compared with a set number and with other panels number and and then a decision will be reached to raise an alarm.

Having read the alarm and the location, the bucket man will go to the panel and check for dust, dirt and pollen and then wash it once. If that solves the problem well enough ! if not then the next level of checking to start for hot spot detection or Humidity resistance etc. In the worst case the panel needs to be replaced with a newer one.

Diagram: Another unique advantage of CAN bus is that by adding a small 4*4 key pad one can send control command to the CAN receivers by directly entering into the keypad.

Software: Software is broadly classified in two parts – for Master & for slaves. The slaves will pick up the current reading from the A0 port and then will be relayed back to the master. The master has two modes of operation – Master on display mode and Master on control mode.

The master CAN is given an ID as 1 while the others are given as 254 and 255 or any other number between 2 to 253. In a network the maximum number of nodes can be 120, for adding more nodes one needs to add CAN bus repeater. The shielded twisted pair good quality copper wire can be used as the CAN bus.

Master on display mode: This is achieved by using one digital pin D-10 in a switch mode. When it is High the master goes into display mode. It collects data from all the slaves and then displays. It then finds out if any signal is less than desired level and then issues alarm for cleaning of that particular cell. The monitoring of solar PV cell with this type of configuration can be best use of it.

Master on control mode: When the digital pin D-10 is open or LOW the master goes into control mode. In that case the nodes are connected with relays – digital pins 0 to 8 are connected to the relays. There is a 4*4 keypad connected with the master CAN (id = 1). The master issues command like 25581#,25580#,13011# etc. and the respective node relays are made on or off to control the shower connected to the PV cells.

25580# … 255 is the node number; 8 is the digital pin number and 0 is off or 1 is on.
25471# … 254th node, relay connected to the Digital pin-7 and 1 is making it on.

25130# … 251st node, Digital-3 relay , off
# is used to terminate the command.

The master can have it’s own PV cell current sensor, connected to it’s A0 pin or it may be devoid of any PV cell connected to it.

One typical use of this type of configuration is to find out in a small city or park how many light polls are on or off. Also with this configuration each small units connected on the bus can be controlled from a central control room. The other uses include – hotel room call alarms for the guest, hotel lights and other devices controls. Instead of running all kinds of wires only two small wires will be enough to control everything connected on it.

CAN Bus Master on display mode – measures current & raises alarm

CAN Bus on control mode - relays connected to it which is used for controls.

CAN BUS controller with 4*4 keypad.

Bye bye,

Lees het volledige stuk
Toon minder
CAN BUS on Arduino
CAN Bus with relays output to control devices.
CAN Bus master with 4*4 Keypad for command
CAN Bus master with 4*4 keypad for transferring command
stable processing output
CAN 10x10 solar PV cell display

Reacties worden ingeladen...