Skip to content
View in the app

A better way to browse. Learn more.

Thailand News and Discussion Forum | ASEANNOW

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.

An Internet Enabled Solar Power Monitoring System - Another project from Crossy Labs

Featured Replies

  • Popular Post

A number of members have asked me about the gubbins that sends data for this site 

https://thingspeak.com/channels/991448

 

So here we are ????

 

Spare time boredom and disillusionment with the monitoring software provided with my solar inverters led to this project.

 

Features:-

  • Reads RS-485 (modbus) enabled energy meters.
  • Internet of Things connection.
  • Real Time Clock with NTP sync. = always correct.
  • Local data storage on SD card (as .CSV file, analyse later with Excel or similar).
  • Hardware watchdog - resets the processor if there's a lockup.

 

It displays:-

  • Date and time (doesn't everything).
  • Grid Voltage and Power Factor.
  • Grid and Solar supply current.
  • Grid power consumption.
  • Solar Power Generation.
  • Grid and Solar energy for the day.
  • Grid and Solar energy for the month.
  • Grid and Solar energy totals.

 

It looks like this:-

 

Image00001.jpg

 

And with the lid off like this:-

 

Image00002.jpg

 

More detail shortly.

 

"I don't want to know why you can't. I want to know how you can!"

13 minutes ago, Crossy said:

More detail shortly.

i love that. 

where do you order your parts from? 

  • Author
14 minutes ago, NCC1701A said:

i love that. 

where do you order your parts from? 

 

All will be revealed in due course, but the bits all came from AliExpress ????

 

Links to the actual parts used will be provided as we progress.

 

 

"I don't want to know why you can't. I want to know how you can!"

  • Author
  • Popular Post

For those who just want to get on with it.

 

Single line diagram:-

 

Solar Monitor 1.jpg

 

Arduino sketch Solar_Log__V4.0a.ino 

You can view the sketch using any Unix-aware text editor, I use Notepad++ or you can, of course, use the Arduino IDE.

 

EDIT Windows Notepad also seems happy to view the .ino files without screwing up the formatting.

"I don't want to know why you can't. I want to know how you can!"

  • Author
  • Popular Post

The main display:-

 

Image00003.jpg

 

Solar and grid daily and monthly display:-

 

Image00005.jpg

 

And the cumulative display:-

 

Image00004.jpg

"I don't want to know why you can't. I want to know how you can!"

My, but aren't we the evil genius, LOL!

 

But seriously, great work!! ????

  • Author
  • Popular Post
21 minutes ago, tao40 said:

My, but aren't we the evil genius, LOL!

But seriously, great work!! ????

 

The devil makes work ...

 

I have to keep my engineering brain active, I do way too much paper pushing these days. I'm lucky that I do still get to get out on site to wave blueprints around "What you've built doesn't look anything like the drawing!" the usual fix being to "adjust" the drawings.

 

Anyone reading my code will rapidly realise I'm not a software engineer, I'm a hardware man from the days when electronics had lots of glass things with heaters and connections that bit if you touched them.

 

All good fun of course.

"I don't want to know why you can't. I want to know how you can!"

  • Author

OK Time for a spot of shopping.

 

You will need:-

A box to put it in mine came from MegaHome.

 

"I don't want to know why you can't. I want to know how you can!"

Looks like fun. Only wish I had the time............

1 hour ago, Crossy said:

 

 

 

Anyone reading my code will rapidly realise I'm not a software engineer, I'm a hardware man from the days when electronics had lots of glass things with heaters and connections that bit if you touched them.

 

All good fun of course.

Good job Crossy.

Similar approach as to my attempts.

If anything good comes from this virus thing, it's the ability to get some stalled projects out of the way.

This is just one that might be of interest to you.

Cheers Jorgo

http://mode-zero.uk/viewtopic.php?f=81&t=970 

 

Will be interested to see your code, always open for new ideas.

2 hours ago, Crossy said:

that bit if you touched them.

I remember those days and I'm not even a 'sparky'. I just tied to fix things on my own... ????  But this type project is way above my pay grade.

  • Author

The two meters are installed in a cheap DIN rail consumer unit. The 2-pole breaker is the feed from the solar. The single pole breaker is currently unused, intention is to do away with the wired RS485/MODBUS connection so any electronics will need a power supply.

 

Image00010.jpg

 

Meanwhile, this chap (follow the blue arrow) is an ant who managed to get between the LCD backlight and the active element before dying. Interesting parallax effect which you don't normally see.

 

Image00005 arrow.jpg

 

 

"I don't want to know why you can't. I want to know how you can!"

Great thread and will hop on there with my projects, or a separate parallel thread from Metro Labs ???? very soon.

 

No time at the moment, FIL has passed away yesterday and I'm as the 'son' with him full time those days with the funeral which will be four days long.

 

Keep it going Crossy, it is truly food for my eyes to see/read ! 

 

My era is when both glass and silicon was used 50/50 and things got a bit safer to tough :whistling:

 

  • Author
8 hours ago, Metropolitian said:

My era is when both glass and silicon was used 50/50 and things got a bit safer to tough :whistling:

 

Ah, the "hybrid". Often much explosive fun to be had.

 

A certain, all bottles, RN sonar had a sensitivity modification consisting of a 741 with the associated salad-dressing running off a split +-15V rail. What wasn't immediately obvious was that the supply was actually +220V, +235V (marked on the board as 0V) and  +250V. Woe betide any innocent tech who placed a grounded scope probe on "0V". The resulting conversion of a 741 into 8 legs sticking out of the board and a slightly blackened area was, shall we say, "sphincter loosening". Ask me how I know :whistling:

 

Metro Labs projects welcome, probably best on their own thread. If there's sufficient interest maybe a sub forum "Micro Controllers" or something like, but then I'd have to moderate it.

 

Sorry about your FIL ????

 

"I don't want to know why you can't. I want to know how you can!"

  • Author

I'm not going to do a blow-by-blow "stick a wire in this hole" account, I'm far too lazy. I'll just detail the pitfalls I found so hopefully others won't fall in.

 

For example:-

 

As noted above the Arduino on-board regulator won't actually power much in the way of add-ons. Another project with just an Uno, 20x4 LCD and esp8266 is about the limit. On a 7.5V supply the Arduino regulator is just touchable.

 

The TTL-RS485 board I used has on-board surge protection on the RS485 terminals. But in order for it to work adequately the RS485 ground terminal must actually be grounded. I place a wire on the back of the board to the supply 0V.

It's also worth noting that the 8-pin device is a MAX485 

https://www.aliexpress.com/item/33023152548.html 

2 bucks for 20 inc shipping. Easy enough to swap out with a small iron and a steady hand, or get your local phone or computer repair chap to do it.

The other device is a 74HC14 

https://www.aliexpress.com/item/32557582115.html 

again 2 bucks for 20 and doesn't blow up with a surge on the 485 lines. I have 20 if anyone needs a couple ????

 

20200501_063002.jpg

"I don't want to know why you can't. I want to know how you can!"

  • Author

Now, about that watchdog.

 

I noted that occasionally coms with ThingSpeak would fail and stay failed until I hit reset. It's not clear exactly why but I needed a quick fix.

 

Enter the watchdog.

 

The Arduino does have a built-in watchdog which I've used on the Uno with good results, but Google told me that the MEGA can sometimes brick when using the watchdog. So I didn't.

 

There are all sorts of watchdog timers on the net, invariably based on the 555 timer, but all that I looked at have flaws.

 

So I took the best of all of them and came up with this:-

 

Watchdog 2.jpg

All the bits were hanging around, built on a scrap bit of stripboard (do we still call it "Veroboard"?).

 

If the keepalive pulses stop it takes about 10 minutes to generate a reset pulse.

 

How it Works.

 

The 555 is configured as an astable multivibrator which, if left to it's own devices, produces a 700ms negative pulse on pin 3 every 190 seconds or so.

 

When working as a watchdog positive pulses of 1ms or so are fed from a digital output of the Arduino. These will briefly turn on the NPN and keep the timing capacitor from charging. So not output pulse and no reset.

 

If the pulses stop the capacitor can then charge and when it reaches 2/3 of the supply voltage an output pulse occurs and resents the Arduino. This takes about 400 seconds.

 

Handy calculator here https://circuitdigest.com/calculators/555-timer-astable-circuit-calculator

 

On guard and ready to attack!

 

20200501_133305.jpg

"I don't want to know why you can't. I want to know how you can!"

  • 2 weeks later...

Some fundamental setups here is getting up nice.

Before hooking up sensors I decide to have the Mothership prepared first, all the data need to go back to the womb.

Also I am aiming onto " An Intranet Internet Enabled Solar Power Monitoring System" ???? 

 

The cloud is something nice, but oh when the power cuts I suddenly couldn't access the (cloud-based)meters and sensors.

 

The womb is currently in HASS (Home Assistant) which looks nice, but not all meters are supported so was mine (Cloud storage at Hekr).

A few http sniffing involved I got the right data for the 'offline' access and found some modules in github for hass.

 

Now, beside the data going to the cloud services I have Mother probing the data each 15 seconds and it looks surprising good.

 

image.png.e60c25c2af85b5b3ffac1d4854b0fdfd.png

Running 12K Aircon, TV, Fans and lights.

 

For monitoring the solar, I am thinking to remove the wifi module and use the modbus data (wifi module is plugged in that). With the same module as in post #15 that should do the trick.

Have to test it on another source first so not disturbing the inverter.

Until, as I like the cloud service, I am able to integrate it. Need to find a way to use the intercepted data from the inverter to the cloud (Senergy) , no resources on the web right now and I am not a coder..

 

 

On 4/30/2020 at 9:32 AM, bluejets said:

Crossy.

This is just one that might be of interest to you.

Well.. It interested me ????

I am missing the gear position indicator on my bike. 

 

Sometimes I try to get it in the next gear but there isn't a sixth as it was in the fifth and not fourth.

The same the other way around, from the third to the second approaching speed bumps.. but it was in the fourth and after the bump I stood still.. 555

Only have a green light for neutral.

 

Your project looks great for aiding in this when I can get a sensor at the gear clutch working and put the numbering inside the oled screen.

Have you done that already?

 

@Crossy could you have done everything on an ESP32 rather than the Uno and ESP8266?  Neat little boards, planning on doing a BLE logger for presence detection one of these days...

  • 6 months later...
  • Author
On 5/15/2020 at 12:46 PM, tjo o tjim said:

@Crossy could you have done everything on an ESP32 rather than the Uno and ESP8266?  Neat little boards, planning on doing a BLE logger for presence detection one of these days...

 

For some reason I missed this post only noticed when I came looking for the thread ???? 

 

Yes, hindsight being 20-20 even the ESP8266 could do the job on it's own. This was my first foray into IoT stuff and I would do a lot of things differently if I were to do it all again. 

 

"I don't want to know why you can't. I want to know how you can!"

On 4/30/2020 at 7:19 AM, tao40 said:

My, but aren't we the evil genius, LOL!

 

But seriously, great work!! ????

It's a freakin laser ????????????????????

Another interesting project :thumbsup:  but as someone already mentioned way above my paygrade.:whistling:

 

A tip that may be useful to some, for the low voltage wiring I use old single core phone wire.

 

With everyone going Fiber there is lots of it about. :smile:

61UjAptoyZL._AC_SL1500_.jpg.24ff1e6b423cf444e093753896bccb45.jpg    

Very cool way to measure your solar and grid via the 485 meters with the hardware display!

 

I went another way on mine, a Sonoff / Tasmota Wifi-enabled meter on both modules with Enphase microinverters, data uploads to my server in Singapore over MQTT + NodeRed.  My web page pulls the data from the server and formats nice gauges and charts.  I recently found a limitation in the Google chart I use, it silently non-displays columns after it reaches an arbitrary undocumented limit.  :^(  Thanks as usual Google!

 

You can see everything here: http://mike-land.com/Solar_Hua_Hin/solar_hua_hin.html

This is brilliant!  Crossy, perhaps you could take the time to teach some of us the basic of electronics, because we have too much time during covid, and I for one, would be very interested to learn!

  • Author
5 hours ago, mwbrown said:

Very cool way to measure your solar and grid via the 485 meters with the hardware display!

 

I went another way on mine, a Sonoff / Tasmota Wifi-enabled meter on both modules with Enphase microinverters, data uploads to my server in Singapore over MQTT + NodeRed.  My web page pulls the data from the server and formats nice gauges and charts.  I recently found a limitation in the Google chart I use, it silently non-displays columns after it reaches an arbitrary undocumented limit.  :^(  Thanks as usual Google!

 

You can see everything here: http://mike-land.com/Solar_Hua_Hin/solar_hua_hin.html

 

It's funny how these things develop, it was never really intended to be internet connected, more as a development of my previous power monitor logging to the SD card.

 

That unit worked well enough (and is still working) but the maths does some interesting things when exporting which in all honesty I couldn't be bothered trying to fix when cheap all singing, all dancing meters are available. The Uno also ran out of computing power and RAM when trying to measure more than one channel.

 

The WiFi and IoT angle came about when I was trying to implement an automatic dummy load to dump excess power and avoid exporting. The dummy load now sits folornly in the corner of my workshop waiting to be converted into a battery management system having been ousted by the arrival of an inverter with a "do not export" function (see the Solar Car Port thread).

 

Evolution in action and much more interesting (at least to me) than watching fruit flies (the usual model used for studying evolution).

"I don't want to know why you can't. I want to know how you can!"

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

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.