Newbie very new to this - and would love some guidance please...

Hi there, I am Alistair and very new to this electronic approach.....

I am hoping one of you can show me the light :o

I am a DC electrician for JLR and have been deeply involved with electronics for the last 25 years I have been there. So the practical stuff I find easy, but with this Arduino I am finding that I can't seem to grasp its concept. I know you have an input, you use code to manipulate it, and you have an output.

I know what I want to achieve but cannot get started.

The project I want to do is to make a solar divert switch. This will comprise of a phototransistor picking up the red LED pulses from my solar panel export meter, into my Arduino Duo. It will then look to see if there is over 1 Kw being produced and if there is, switch a relay on. I know that 1000 pulses is = to 1Kwh, so
1000/60 mins is 16.6 pulses/min. This as far as I get, and I dont know what to look for next. I have spent many hours looking on the net and never produce anything.

Please, if anyone could help me I would be most greatfull!!!

Kindest regards

Alistair

Isn't there a better way of reading data from the meter? Modbus is common or at least PWM? What model is it?

You must define a produced Watts value for closing the relay and a lower value for opening. for example at 1100 W ON and at 900 OFF.

Hi Juraj,

The meter is a Landys & Gyr 5235B

Yes i agree, over 1kw on and 900w off. I thought (maybe I am wrong?) that looking for any two pulses that are not over 3 seconds between the two would be sufficient to trigger the output?

Alistair

I know what I want to achieve but cannot get started.

Take it one small-step at a time and start with something that you can test by itself... For example, can you build something that drives the divert switch/relay with a 5V low-current signal? Then you can run the Blink Example to make sure the Arduino can change the switch-state under software control.

Solid state relays can be great because you can get varieties that can be driven by the Arduino. But, you have to be a little careful on the output/power side because AC solid-stage relays won't switch DC, etc. And, you they are almost always SPST so you need multiple solid-state relays to make a DPDT configuration, etc. And, they are more expensive than electro-mechanical relays.

To drive a "high current" relay from the Arduino, you'll need a driver circuit (to get the required coil voltage/current) or you can buy a relay board with relays and drivers already installed.

On the input-side, do you have a phototransistor circuit that can detect light? i.e A circuit that is 0V with light and 5V with no light? (It's usually easier to use a pull-up resistor and use "inverted logic" like that.) If that works, is it sensitive enough to detect the LED?

Once the light detector is working, you can connect it to the Arduino and run the [u]Digital Read Serial Example[/u] to make sure the Arduino can detect the LED.

Then you can start on the programming. The two most important concepts in programming are conditional execution (if statements, etc.) and loops (doing something over-and-over, usually until some condition is reached). Once you understand those things, you can begin to understand how to make a program that does useful things.

For example, you can make a [u]while() loop[/u] that counts pulses for one second. Then you can exit the loop and decide what to do with the count. (Note that you can have nested loops).

For timing, look at the [u]Blink without Delay Example[/u] and try to understand how it works.

Note that you can write C++ statements that don't make sense in math: For example Count = Count +1; will increment the value of the variable named Count and if you put it in a loop you have a counter. (That can also be written as Count++;)

BTW - There is a [u]pulseIn()[/u] function that may help with what you're doing.

You may run into "issues" with the LED pulse not being "clean" or it may actually be pulsing faster than you can see when it appears "on", but that's something to work-out later if it comes-along.

It is the meter of utility provider (distributor)? Then it is untouchable. You could use your own smartmeter. But the red pulses perhaps will do.

My Arduino project is a heater regulator which asks smartmeter data over wifi and then regulates the power of heater to consume exactly the generated power.

Thanks chaps for the pointers. I think I will go down DVDdougs route. I need to start somewhere very simple and play for a while before I start messing around with complicated code.....

Alistair