I need a program written!=

I'll explain more details later but I am wondering how much I would need to pay a person to write a decently basic Arduino program for me?

This thread sort of gives a gist of what it's about but I'll explain more.

https://forum.arduino.cc/index.php?topic=514814.0

Depends on how much work it is... As I stated in the other thread already, you have to come up with a very detailed list of required voltages and response times.

From what I read there my best guess is that it'd take me a couple of hours at most to write such a sketch and do some basic tests, but it all depends on your exact requirements.

As I understand you want a shutdown sequence for some turbine?
Press a button to start the sequence - activate one relay to slow down the thing - when the voltage drops below a certain level for a certain minimum time activate the second relay which then completely shuts it down. Fill in the actual numbers and it should be a quick job to write.
However you also mentioned voltage spikes and other side requirements - that has to be defined unambiguously, and adds complexity of course.

I'll define everything in detail and explain it all out later when I'm on my pc. It should not be too bad I hope.

wvmarle:
Depends on how much work it is... As I stated in the other thread already, you have to come up with a very detailed list of required voltages and response times.

From what I read there my best guess is that it'd take me a couple of hours at most to write such a sketch and do some basic tests, but it all depends on your exact requirements.

As I understand you want a shutdown sequence for some turbine?
Press a button to start the sequence - activate one relay to slow down the thing - when the voltage drops below a certain level for a certain minimum time activate the second relay which then completely shuts it down. Fill in the actual numbers and it should be a quick job to write.
However you also mentioned voltage spikes and other side requirements - that has to be defined unambiguously, and adds complexity of course.

First of all I quoted you.... not sure if that is needed or not on this site for you to know I replied.

Ok here we go. We will start with the first part of the dump load control for the wind turbine. For this part as soon as 2.4v is hit then one of the 5v outputs is activated until 1 second after the voltage drops below 2.2, to clarify this output stays on above this voltage as well, so if it goes to 4.4v it is still on until it drops below 2.2v. Time is not a factor for this part of the program besides the off delay of 1 second, so as soon as 2.4v is detected it activated without delay, only a delay on the deactivation of the output. I may need to modify these values and fine tune which I assume modifying voltage values in a program should not be that hard.

Now the second part is the overspeed shut down part of the controller. So if the voltage crosses 3.5v which is 70v before the divider then the clock starts. Clock stops once it drops below 55v (2.8v or so) which is back in the functional range. So if in a 10 min peroid the time adds up to 1 min then the second output is activated for 30mins. After this output is activated which completely shuts the turbines down then the first output can be shut off but if it makes the programming harder than it can stay on, it won't cause any issues. Considering the voltage would drop below it's 2.4v setpoint it would shut off anyway so nevermind.

I Think that is everything needed to make the program, If I am missing anything just ask. I will have to tweak the voltages in the program to get them correct for each turbine which I hope is not impossible...I am assuming numbers are still numbers in basic code :P.

Yes, it's all numbers. You'll get a set of variables set at the top of the sketch where it will be set.

Minimum voltage peak length that can be detected is a few microseconds, but much easier to program is for peaks 1 millisecond and up. That should be good enough for a wind turbine, they don't change speed that fast. Seconds resolution should do but milliseconds is actually easier.

That 10 minutes would have to be a sliding thing as well. Not restarting the measurement every 10 minutes.
What would be a reasonable resolution there? Half a minute increments? Then it would be something like "total 1 minute of overvoltage over the past 20 half minutes".

I hate my phone... I bumped the back key just as I had my reply written :(. All sounds good sofar except I'm not sure what you mean by a sliding thing? If it's only over volting a few times an hour then I don't want it to shut down for 30 mins. It can be done in number of times crossing the voltage threshold if that's easier? Like if 3.5v is crossed 5 times in 10 mins then shut down for 30 mins, 4 times all is good still. That may be a better way to do it actually. Maybe easier to? Wind gusts are usually 5 to 10 seconds long so half mins would be a bit long I think.

Shadow_Storm56:
First of all I quoted you.... not sure if that is needed or not on this site for you to know I replied.

No need. I'm getting notified anyway - the moment you reply to a thread you're subscribed and get notifications.

For this part as soon as 2.4v is hit then one of the 5v outputs is activated until 1 second after the voltage drops below 2.2, to clarify this output stays on above this voltage as well, so if it goes to 4.4v it is still on until it drops below 2.2v.

For that one second, does it have to stay below 2.2V or below 2.4V?

For the over voltage:
Create an array of 180, 5-second time spans. Record the time (in milliseconds) within those 5 seconds the voltage was >70, then when all those add up to >1000 milliseconds, shut off the turbine. Do this continuously so you always have a record of the last 10 minutes.

Now when to switch it off?
The moment the one minute of over voltage is reached, or ten minutes after the first time was detected?

In other words: say, the wind was light for all day, but suddenly it picks up and the output goes over 70V and stays at that high level.
Switch off after one minute?
Or wait for the 10 minutes to pass from the first time the output went over 70V? In that case you have 10 minutes of over voltage before it shuts off, so I suppose you'll want the first.

Yes I would want the first. Shut down for 30 mins and then start everything back up as normal. So if there is 1 min of over voltage in a span of 2 hours what would it do? Also for the first part is 1 second after it drops below 2.2. Come on at 2.4 and shut off 1 second after 2.2 is reached... this would be the most important and most active part of the system. On a windy day this would go off over and over again. The shut down is very useful but I can also do that manually so it's less important.

Side note... how do I get to my inbox on this site. It pooped up when you messaged me but I don't see a spot to go back there to reply

Mouse over your name, click on Messages. Then mouse over Messages for Inbox and Sent messages.

I don't see my name but in the right-top corner a circular icon with the outline of a head and shoulders instead. Hover over that, click Messages on the pop-up menu.

On a phone... So hover over does not really work. Also I did reply on here before I asked that part and yes the cost is fine as long as things are all good.

Shadow_Storm56:
Yes I would want the first. Shut down for 30 mins and then start everything back up as normal. So if there is 1 min of over voltage in a span of 2 hours what would it do?

This is what I called "overspeed" in the sketch.
Nothing - unless that happened in the past 10 minutes. No data older than 10 minutes is kept or taken into account.

Also for the first part is 1 second after it drops below 2.2. Come on at 2.4 and shut off 1 second after 2.2 is reached... this would be the most important and most active part of the system. On a windy day this would go off over and over again.

This is what I have dubbed "overvoltage".

For convenience you insert your actual voltages at the settings and a division factor. Currently this factor is set to 20, so 48V translates to 2.4V on the ADC pin.

So:

  • the moment turbine voltage goes over 48V the dump load is activated.
  • the moment the voltage drops below 44V a timer starts, after 1000 ms the dump load is switched off unless the voltage goes over 48V in the meantime.
    Or should it stop counting when it goes over the low threshold of 44V?
  • when voltage goes over 70V, the overspeed timer starts. It stops timing when the voltage drops below 55V.
  • the time it is in overspeed situation is measured and logged for 10 minutes, in 5-second intervals, the oldest data gets overwritten time and again.
  • if the total in the past 10 minutes adds up to more than 1 minute, overspeed shutdown is activated. This is checked every 4 seconds.
  • 30 minutes later overspeed shutdown is deactivated, and all starts again.

Activated: the pin is set HIGH. Deactivated: the pin is set LOW. Depending on your relay module you may have to reverse this.

Sounds perfect :slight_smile: I'll have to fine tune voltages but all is good otherwise.

How my program going?