Go to advanced search

by emmi
Tue Mar 13, 2018 5:12 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

for example, I saw this comment in your source: //drain voltage from capacitor I think you meant "charge capacitor with current", as in the timing loop what you should do is to count how long it takes to charge a capacitor with a current to a certain voltage, in a situation where the charging resis...
by emmi
Mon Mar 05, 2018 6:37 am
Forum: C/C++
Topic: while loop does not stop [solved]
Replies: 4
Views: 768

Re: while loop does not stop

piense wrote:use ==
Right. One of these easy things you don't see anymore when you have looked for too long on your own code. Thanks!
by emmi
Mon Mar 05, 2018 6:22 am
Forum: C/C++
Topic: while loop does not stop [solved]
Replies: 4
Views: 768

while loop does not stop [solved]

Hello, I put the following loop into my code: while((tempAbs = -1000) || (tempAbs = 1000)) { tempAbs = measure_temp(0); } The temperature is set to 1000 or -1000 when the temperature is outside the data sheet range of the thermoelement (above 100 or below 0 degrees Celsius respectively). So I those ...
by emmi
Fri Mar 02, 2018 6:00 am
Forum: General programming discussion
Topic: Manually start an auto start program
Replies: 5
Views: 736

Re: Manually start an auto start program

Assuming you know the program name you maybe could run top to find its PID (and owner) and then kill the process (but if it locks files...). Trev. If yuor using the systemdaemon controller to autostart your program check out the 'systemctl status' command to see whats running if yu find your progra...
by emmi
Wed Feb 28, 2018 12:15 pm
Forum: General programming discussion
Topic: Manually start an auto start program
Replies: 5
Views: 736

Re: Manually start an auto start program

Yes it would, but the second program might fail to work properly if it depends on some resources the the first program has locked. If you suddenly have two program writing and reading the same files then in theory both program could stop working properly. Interesting. By now I figured the best way ...
by emmi
Wed Feb 28, 2018 10:19 am
Forum: General programming discussion
Topic: Manually start an auto start program
Replies: 5
Views: 736

Manually start an auto start program

Hi, I have a program on my RPi which is configured to autostart when the RPi boots. That works fine. Now I am wondering what would happen if I start the program manually while it is running in the background because of autostart. (The reason I would like to get the program to run in the foreground a...
by emmi
Tue Feb 27, 2018 9:48 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

Your process depends mainly on infrared energy, to which the solar panel is insensitive, it even can show a negative coefficent if it warms up too much. True, but the solar radiation which is registered by the solar panel will be converted into infra-red energy when the rays pass through the glass ...
by emmi
Tue Feb 27, 2018 6:49 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

Okay, I was mistakenly under the impression the solar panel was what he wanted to monitor, if that not the case, and he simply want to measure the irradiance of a field then yes, a device specifically designed for that would be the best solution, but it might not be so easy to come by where he is l...
by emmi
Tue Feb 27, 2018 6:38 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

1. Does the OP needs a pi at all? If the aim is to only control a pump then a Schmitt trigger and pump driving circuitry only is needed. Of course, the schmitt trigger functionality could be replaced by suitable timing provided by a Pi! 2. when the voltage measuring circuit is working, if the only ...
by emmi
Tue Feb 27, 2018 6:26 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

Wow, I did not expect this many answers. I was out of town, so let me get back to you now. Reading things like "I always get results like 8.6V" makes me thinking how would you know the result (which is a time) represents 8.6Volt, unless you have compiled a table with charge times versus voltage. I u...
by emmi
Thu Feb 22, 2018 12:53 pm
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

Sorry for the poor quality, this site wouldn't allow me to upload much bigger files. The first photo is the wiring in the box (the voltage measurement and the temperature measurement, that's why it's so many wires), for the second one I took it off the GPIO pins so one can see a bit more. IMG1.JPG I...
by emmi
Thu Feb 22, 2018 10:19 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

So it partly was a code problem/fault which was discussed here and is solved now. Now the remaining problem is, that I do not get less than 1.3 V anymore but always 8.6V which is odd because the panel, according to the data sheet, only goes up to 6 V. When I test with a multimeter, I get voltages be...
by emmi
Thu Feb 22, 2018 9:35 am
Forum: C/C++
Topic: negative number in C++ code is giving problems
Replies: 15
Views: 1228

Re: negative number in C++ code is giving problems

long unsigned int start_time; long unsigned int time_difference; try signed if your going to have negatives The time_difference itself should be positive though. I included the unsigned because before I got negative values for time_difference which should not be possible if the system was working c...
by emmi
Thu Feb 22, 2018 9:32 am
Forum: C/C++
Topic: negative number in C++ code is giving problems
Replies: 15
Views: 1228

Re: negative number in C++ code is giving problems

As that might (or might not) be relevant as well, these are the libraries included in the header: #include <iostream> #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <string> #include <fstream> #include <math.h> #include <time.h> #include <wiringPi.h> using namespace std; I also ...
by emmi
Thu Feb 22, 2018 9:26 am
Forum: C/C++
Topic: negative number in C++ code is giving problems
Replies: 15
Views: 1228

Re: negative number in C++ code is giving problems

This is the function that is misbehaving: //insolation measurement by U of PV module double measure_light() { wiringPiSetup(); //drain voltage from capacitor pinMode(0, OUTPUT); digitalWrite (0, 0); delay(10000); long unsigned int start_time; long unsigned int time_difference; struct timespec gettim...
by emmi
Thu Feb 22, 2018 8:43 am
Forum: C/C++
Topic: negative number in C++ code is giving problems
Replies: 15
Views: 1228

negative number in C++ code is giving problems

Hello, in my C++ code the line double Ulight = 1.3 / (1 - exp(-time_difference/(R*C))); is giving problems. I have worked out now that the problem is with the minus in front of time_difference. I used the minus from the number block on my keyboard to type it. R and C are global constants (double), 2...
by emmi
Wed Feb 21, 2018 12:18 pm
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

Update: for the second time now, the program measured the temperature and then got hung up or something, i.e. it did not give out any voltage. When I stop the program and then start it again, it goes back to giving me voltages below 1.3V. I inserted two more outputs to the screen so I will hepofully...
by emmi
Wed Feb 21, 2018 10:37 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

You should first clarify: what is powering you Raspberry Pi? If it is on mains, why do you need a solar panel? The idea was to run it on solar power eventually, but at the moment everything is connected to a 200 Ah battery. The very small solar panel (0.3 W) that is connected now is only there to m...
by emmi
Wed Feb 21, 2018 10:33 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

You say your temperature measurement works, and that it uses the same principle, does that mean you are using an NTC? by the way, if you want to read more about how this method works read this: https://learn.adafruit.com/basic-resistor-sensor-reading-on-raspberry-pi/ Yes, I am using a NTC temperatu...
by emmi
Wed Feb 21, 2018 9:25 am
Forum: Beginners
Topic: Measure the voltage output of a PV module
Replies: 54
Views: 3055

Re: Measure the voltage output of a PV module

So I put it together like mahjongg suggested (with some other values for the resistrs though) and thought I had it working for about two weeks. Now I am not so sure anymore if it was ever working because since last week the program has always returned me a voltage value of less than 1.3 V. I measure...
by emmi
Mon Feb 19, 2018 1:01 pm
Forum: Beginners
Topic: power on raspberry pi via ssh [answered]
Replies: 2
Views: 239

Re: power on raspberry pi via ssh

Oh, too bad. Thanks for the answer though.
by emmi
Mon Feb 19, 2018 12:41 pm
Forum: Beginners
Topic: power on raspberry pi via ssh [answered]
Replies: 2
Views: 239

power on raspberry pi via ssh [answered]

Hello there, I was wondering if it possible to power on a RPi via SSH? I am explicitly not asking for reboot but to power it on after is was switched off for a while. I can also switch it on by unplugging and plugging it back in, but as it is lying a bit far, it would make things much easier if I co...
by emmi
Wed Feb 14, 2018 12:47 pm
Forum: Beginners
Topic: [killall] <defunct> without trying to kill a process
Replies: 3
Views: 235

Re: [killall] <defunct> without trying to kill a process

Maybe I should add that the RPi is connected to the local server via wifi. It is not used to access the internet beyond this local network though. This are all the processes used by www-data: www-data 1592 0.0 1.3 106340 6188 ? S 08:10 0:00 /usr/sbin/apache2 -k start www-data 1593 0.0 1.3 106340 618...
by emmi
Wed Feb 14, 2018 11:01 am
Forum: Beginners
Topic: [killall] <defunct> without trying to kill a process
Replies: 3
Views: 235

[killall] <defunct> without trying to kill a process

Hello, currently I have the RPi constantly running with a small program running in the background. When I access the RPi and check for the running processes, just out of curiosity, with ps -aux I often get a message like www-data 2624 0.0 0.0 0 0 ? Z 08:13 0:00 [killall] <defunct> among other proces...
by emmi
Fri Feb 09, 2018 4:58 am
Forum: Beginners
Topic: Reading a specific voltage/current
Replies: 10
Views: 508

Re: Reading a specific voltage/current

Here https://www.scribd.com/doc/101830961/GPIO-Pads-Control2 you will find the limitations for the voltage and current on the GPIO pins: no more than 3.3V and no more than 16 mA per pin and not more than 50 mA in total. If you only want to measure, if your power generating device/the input voltage i...

Go to advanced search