Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

stargazine_ep8_banner.thumb.jpg.7fc4114c7705b14c0786cf342cea1f9c.jpg

HN50

Members
  • Content Count

    117
  • Joined

  • Last visited

Everything posted by HN50

  1. And now fitted in a project box for a little protection.
  2. Hi, Thanks for the suggestion, I got the sleep mode to work (more later) and have put in a loop that reads 50 times before I actually start taking measurements. My work this week. I pulled the data out yesterday from the new MKR 1010 rig to see how things went... It has been running all week as expected despite the furnace-like temperature of nearly 40 Celsius up there towards the end of the week. So it is running successfully. Eyeballing things I could not decide if the data looked noisier than with the Barebones Arduino, so I tried to analyse the data by plotting standard deviation of the two rigs by hour. Things are a bit all over the place at night, while the Barebones data has a greater stdev around the maintenance window time; this only happened once in the last week for the MKR 1010 data. But between 10:00 and 17:00 when the signal plateaus I think it is not as clear, but perhaps the MKR 1010 does have a slightly greater standard deviation than the Barebones output and I would therefore assume noisier signal. The Barebones data is everything from 5th May, the MKR 1010 just 5 day's worth so I might collect more data before I pass judgement. I could look to code a 5 minute moving average within the data using an array to try and smooth the output I suppose. Otherwise I now have the code going into deep sleep between taking measurements. I thought it was not working as when running it from the IDE I would get my start up messages in the Serial monitor and then nothing. When I looked at the SD card though the Arduino had been logging data, what I think happens is that when the MKR 1010 goes to sleep it loses its connection to the previously assigned COM port and when it awakens does not reconnect. This is different to the Bareones Arduino which appeared use the same COM port on wake-up and so kept outputting its results to the Serial Monitor. The upshot is that no new event data gets posted to the Serial monitor for the MKR 1010 which is why I thought the sleep mode was not working. I also find it 'a bit difficult' to compile code to the MKR 1010 when it is asleep, so it now only goes to deep sleep when it cannot find the Serial port (i.e. under battery power). A slight reverse of the wait for Serial problem I had the other week. if (!Serial) { LowPower.deepSleep(); } Aside from that the spare RTC I bought seems to have a problem in that I need to look at (or cut losses and get another for a couple of quid) and I have just about all the parts now to finally get it into a plastic casing. I will look to assemble the case for it today. Thanks for reading. VLF_MKR_20200627.TXT
  3. @7170 Sorry, I missed that. Yes, it is always positive, either 0-2.5V or 0-5V. Dave
  4. It is now logging in the roof, so I will give it a week and see what comes out... Data up to today below. VLF_T2_20200621.TXT
  5. @Tomatobro glad it is running, look forward to seeing the outputs. @7170 thanks for your comments. In terms of the ADS1115 I am certainly not against the idea of going to a higher resolution, at this stage I am trying to keep down the number of extra add-ons while I learn more about Arduino. 10 bit is giving reasonable results and I think that the MKR 1010 can be increased to 12 bit. But I did make the change you suggested of taking an average of 1000 readings so am looking forwards to seeing how that affects things. My progress... In terms of data not too much has happened in the last fortnight, though late on the 13th the signal starts to jump about as I assume they were testing/fixing (???) something at the transmitter. Anyway, the radio appears to be working as expected which is giving me increasing confidence. GIF for teh last fortnight; The signal on the 13th looks like; Which does make me wonder if the funny readings I got way back at the beginning were something happening at the transmitter rather than within my setup. The average data looks like the following. Nothing especially amazing but the data continues to settle down; It occurs to me that I should average by month as the diurnal profile will alter as the day length changes. Coding today has gone well, the chassis I built works when powered from the laptop and before powering it from the power regulator on the chassis I checked that what was coming was indeed 5V as I didn't want to fry the Arduino. It was, so I tried to get it logging powered by the supplied by the radio. It did nothing. The Arduino powered up but no logging was attempted. After scratching my head I found the offending code. while (!Serial) { ; // wait for serial port to connect. Needed for native USB } I added that to get the Arduino to wait until the Serial port was connected so I could see the comments I added to check which parts of the code have been executed in the setup function. Unfortunately when running from VIN/ground pins the serial port will never connect anyway so it was going into an endless loop. I made a hasty tweak logging now occurs under battery power. It is not waking up from sleep yet (need to work out why) but I am keen to get the MKR logging data properly so will look at this during the week. The linear regulators get warm but nothing too bad and I will just bear this in mind at the moment, I used them as I already have them in and did not want to buy more parts than I have to. Otherwise i can look out for a bit of copper or aluminium for a heat sink. And just as importantly, the RTC is now set to GMT! So all in all not bad, I just need to work out why the wake from sleep is not working. But another week or two and I think I can start looking at connecting it to my WiFi and looking into Azure IoT... Thanks for reading.
  6. Hi, Sorry for the delay, did you get to the bottom of the problem? Do you think it is radio interference or a problem within the microcontroller? My progress... It has been a bit of a busy fortnight with work so I have not been able to do too much on this, I have several weeks of data to analyse and will do that tomorrow. However today I sat down with some stuff I had ordered and soldered the chassis for the MKR 1010 to plug into. Have not tried it yet so will do that tomorrow as well. I left the board bare on the left in case I need to play around with the voltage divider. Top right is the regulated power supply that drops first to 9V and then to 5V before being fed into the Arduino. It looks like it should work but I will reserve judgement until I switch it on..! Thanks for reading.
  7. You have quite a few things on the go! I have added my data for this last week below. VLF_T2_20200606.TXT
  8. Well, I have checked the data for the last week and not a whole lot has happened - below is the weekly GIF. And in the average for all time the numbers continue to settle down. This week I have been focusing on getting the MKR running as a 1:1 copy of the bare bones Arduinos that I can't currently reprogram, and can say that I now have it running on the breadboard. It is doing pretty much what I want it to, I just need to get it to go into sleep mode but all in all I am quite pleased. So while the Sun may have been quiet this week things have been busy on the programming side. I have also posted my code as well at the bottom. I will order some more stripboard so I can solder up a chassis and also a plastic project box for it all to sit in. I am chosing plastic as if it is metal I am not sure the WiFi signal will be shielded. Not a bad week though. Thanks for reading. Dave #include <DS3231.h> //v1.0.2 https://github.com/NorthernWidget/DS3231 #include <Wire.h> #include <SD.h> //SD card library //#include <LowPower.h> // https://github.com/rocketscream/Low-Power DS3231 Clock; bool Century = false; bool h12; bool PMT; #define ALRM1_MATCH_EVERY_SEC 0b1111 // once a second #define ALRM1_MATCH_SEC 0b1110 // when seconds match //#define ALRM1_MATCH_MIN_SEC 0b1100 // when minutes and seconds match //#define ALRM1_MATCH_HR_MIN_SEC 0b1000 // when hours, minutes, and seconds match byte ALRM1_SET = ALRM1_MATCH_SEC; //Variables for SD card START Sd2Card card; // set up variables using the SD utility library functions: const byte chipSelect = 6; //CS pin for SD card String logFile = "VLF_MKR.txt"; //Variable to hold filename to be created/written to //Variables for SD card END //Variables for voltage calculation START byte interruptPin = 7; //float value = 0.0; int var; int loops = 10; float voltage; const float referenceVoltage = 1; //Variables for voltage calculation END //Variables for RTC START //bool showRTCFlags = true; bool showRTCFlags = false; volatile bool alarmflag = false; byte timeComponent; //Variables for RTC END void setup() { // Start the I2C interface Wire.begin(); // Start the serial interface Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for native USB } Serial.println("Turn off alarm 1 & 2..."); Clock.turnOffAlarm(1); Clock.turnOffAlarm(2); Serial.println("Set alarm clock time..."); Clock.setA1Time(0, 0, 0, 1, ALRM1_SET, true, false, false); Serial.println(F("Turn on alarm 1...")); Clock.turnOnAlarm(1); Serial.println(F("Attaching pin interrupt...")); // Attach interrupt pinMode (interruptPin, INPUT_PULLUP); digitalWrite(interruptPin, HIGH); attachInterrupt (digitalPinToInterrupt (interruptPin), clockTrigger, FALLING); Serial.print(F("Pin interrupt on ")); Serial.print(interruptPin); Serial.println(F("...")); Serial.println(F("Initialize SD card...")); // see if the card is present and can be initialized: if (!SD.begin(chipSelect)) { Serial.println(F("Card failed...")); // don't do anything more: return; } Serial.println(F("SD card initialized...")); if (SD.exists(logFile)) { Serial.println(logFile + F(" found...")); } else { Serial.println(logFile + " !found, creating..."); File dataFile = SD.open(logFile, FILE_WRITE); dataFile.println(F("D,T,V,K")); Serial.println(logFile + F(" created...")); dataFile.close(); } analogReference(AR_INTERNAL1V0); //Set to use internal 1V reference voltage - so that the 8 bit //range is measured over a smaller range } void loop() { voltage = 0; var = 0; while (var < loops) { voltage = voltage + analogRead(A4); delay(5); var++; } voltage = voltage / loops; voltage = voltage * referenceVoltage / 1023; float temperature; temperature = 273.15 + Clock.getTemperature(); //((Clock.getTemperature()) / 4); if (alarmflag == true) { File dataFile = SD.open(logFile, FILE_WRITE); if (dataFile) { if (showRTCFlags) { Serial.println(F("AlarmFlag is true")); } printString("20", dataFile); timeComponent = Clock.getYear(); printByte(timeComponent, dataFile); printString("/", dataFile); timeComponent = Clock.getMonth(Century); printByte(timeComponent, dataFile); printString("/", dataFile); timeComponent = Clock.getDate(); printByte(timeComponent, dataFile); printString(",", dataFile); timeComponent = Clock.getHour(h12, PMT); printByte(timeComponent, dataFile); printString(":", dataFile); timeComponent = Clock.getMinute(); printByte(timeComponent, dataFile); printString(",", dataFile); printFloat(voltage, 4, dataFile); printString(",", dataFile); printFloat(temperature, 2, dataFile); Serial.println(""); dataFile.println(""); alarmflag = false; dataFile.close(); } } if (Clock.checkIfAlarm(1)) { if (showRTCFlags) { Serial.println(F("checkIfAlarm(1) is true")); } } } void clockTrigger() { alarmflag = true; } //Only use these when SD card is initialised //and has been started ready for writing... void printByte(byte value, File dataFile) { if (value < 10) { Serial.print("0"); dataFile.print("0"); } Serial.print(value); dataFile.print(value); } void printString(String value, File dataFile) { Serial.print(value); dataFile.print(value); } void printFloat(float value, byte places, File dataFile) { Serial.print(value, places); dataFile.print(value, places); } //Only use these when SD card is initialised //and has been started ready for writing...
  9. That is looking good, I look forward to comparing data. I am slowly rewriting my code so that the MKR 1010 will do what my existing Arduino does. Had a few issues over weekend so not quite as far along as I had hoped. Once that is running again I will look to get using the WiFi.
  10. After a couple of hours of battle with LibreOffice Calc I have charted my data against the GOES x-ray flux data for the same time, and the results are below. As I had thought the M-class (biggest since Oct 2020 https://www.swpc.noaa.gov/news/first-m-class-flare-observed-years) fell slap in the middle of the routine maintenance window and so was undetected. Ain't that the way? However the following C-class flare did cause a SID as the signal strength for DH038 dropped appreciably and gradually recovered. The data from both datasets correlates spot on. Throughout the afternoon and evening there were further events but I can't correlate them in the same way so I guess these events led to the ionosphere being disturbed and causing the signal from DHO38 to jump about. So whilst I missed the big fish I did indeed detect a following flare. I am very pleased, we can turn the internet off now. I will have a think this afternoon about what I do next whilst I enjoy the sun, data attached if it helps anyone. Thanks for reading. Dave VLF_T2_20200530.TXT
  11. Thanks! Doing battle with LibreOffice at moment to brink them together. Hopefully will have a chart out soon.
  12. Hi, I will analyse properly tomorrow (I took some screenshots of the GOES data so will tie up times), but at first glance it does look like there has been some activity detected today. My times are BST rather than UTC so I think the peak at 07:00 UTC has fallen into the 08:00 - 09:00 maintenance window, and I think the downward spike was the transmitter going offline. However the GOES spike at 11:45 UTC corresponds with a sudden drop in signal in my plot at about 10:45 BST. So I think I have detected a flare. I will look again later when my brain is more awake as there are a few features to correlate, and it would help if I converted my times to UTC.... Interestingly they are negative which suggests to me that the changes in the ionosphere make the ground wave and skywave further out of phase (?). Dave
  13. !!! Thanks for the heads up. Things are looking quite lively still, I will leave it until late tonight or tomorrow and pull out the data. Fingers crossed... Dave
  14. Hi, Glad it looks like the radio is okay. I am in the midst of 'Arduino Can't Find Drivers Part 746'. I think though that I might have got to the bottom of it, I am writing it here as much for my reference as anyone else's! When CHRG light stars flashing and IDE can't find COM port, unplug Arduino MKR 1010 Restart laptop Unplug I2C modules (in this case the RTC), also unplugged the SD card even though not I2C (I found a posting in https://forum.arduino.cc/index.php?topic=567417.0 that gave me an idea) When laptop restarted plug in Arduino CHRG light may flash but should hopefully go out after a couple of seconds, in Device Manager should see Arduino MKR WiFi 1010 under a COM port Try uploading a sketch Plug in I2C RTC and SD card Should now upload code successfully in IDE Universe is in balance again That is a rather long way of saying turn it off and on again. I like Arduino a lot but I find I can burn up hours trying to resolve these issues. And now on to what I actually wanted to do today... !
  15. Sorry to hear that, hope you get it working.
  16. Weekly update... I pulled out the data and passed it through my trusty LibreOffice spreadsheet and generated the following GIF (I won't post each individual day but will do if asked). The data looks okay and the unit is running as I would have hoped, but yes, quite an uneventful week. If we are at a deep solar minimum then I guess we have a few years to get this all perfected! I also recalculated the all time averages as well and has hoped the averages are stabilising with continued normal functioning. @Tomatobro - I looked at 22/05/2020 to compare to what you had recorded. The whole day looks like; I see a drop at about 15:00 (my RTC is running on BST at the moment), so I zoomed in further. I must admit I am not sure I see the same output, there is a dip in signal but I don't see that high/low output you were getting. Do you have a plot for 23/05/2020 (mine is pasted below)? There seems to be several on/off events in the evening so would be good to see if you detected these. In terms of development, I have been looking at getting a MKR 1010 prototype running on a breadboard. I have got it writing to the SD card but one thing I have found is that the DS3232.h library I had been using is not compatible with the MKR 1010, I think there are some reserved keywords in there that clash and error when you compile. I found this posting https://forum.arduino.cc/index.php?topic=626051.0 which refers to a particular v 1.0.3 version of an alternative RTC library to use so I downloaded that. The keywords are different so I have spent today getting to grips with setting the time and using the alarm functions. Pretty poor photo but that is just a sketch that shows the time and various alarm settings. So I think the next step will be to get the various bits (RTC/SD card/low power) all working together on the breadboard prototype. I also need to check the voltage divider as I am not sure there is a setting to put the internal voltage reference to 1.1V in the MKR 1010 so the divider will need to drop the radio 5V to 3.3V instead. I am not too concerned as I can set the ADC to 12 bit. Anyway, things to do in the coming days. Thanks for reading.
  17. Hi, I will try and get the data out the SD card tomorrow, I am hoping to see a similar pattern. Dave
  18. Double clicking the reset button when connecting the MKR1010 to the laptop via USB seems to help the drivers get set correctly. Beats me but there we are.
  19. Hi, I like it, I am trying to visualize it - that is pretty small, isn't it? Do you have a block diagram of how your setup will work? Well, a bit of a mixed bag in terms of progress this week. Firstly, the good, my data capture is going on well. The overall signal strength seems down as compared to earlier weeks, however the results seem to be stable. There do not seems to be have many maintenance shutoffs either. Weekly animation is below. Another week and has passed and my rig seems stable, the logger and radio are working, and I am getting a steady profile. I am interested as to why the overall signal is weaker as compared to the late in April, so I wonder if the transmitter is operating at reduced power? I also checked the GOES X-ray flux data for the last 7 days but nothing bigger than A class has happened. I have also produced an average plot by hour of all data logged so far which is starting to show that certainly the mean is gradually settling down to resemble a quiet day as extreme data becomes less significant. And now the bad. 1) I still can't push code out to the barebones Arduinos I have built, I keep getting an 'avrdude not in sync error'. This seems to be a little cryptic to work out what is going on. I have; > Bought a new usb to serial chip in case this was the cause - it isn't as I still get the same problem > Run the logger under external power to see if it is working or the Atmega328p chip is fried. It works and happily logs, so that isn't the cause. > Reburnt bootloader to chip to see if that had corrupted. I could do this successfully however I still can't upload my code to the chip. So still a problem that I can't push out updates..! 2) After spending a lot of yesterday and today on the above, I have been experimenting with getting the MKR1010 working if I can't now upload code to the Atmega328p models. I have it writing to an SD card and have been trying to get it working with an RTC. There is one built into the MKR1010 however it needs to be set via a WiFi connection and has no battery backup. In initial experiments I have found that if you have a sketch that sets the clock via the internet and then upload the logger sketch the RTC starts up at the last time the previous sketch ran and does not increment between. There may be settings that deal with this, I am still investigating how it works but I do not want it to be constantly connected to the internet in case I need this to be battery powered. I am also seeing if I can use the DS3231 RTC as I like it being battery backed up and has several alarms built in to it. So while I have not got round to building anything I am at least investigating what the MKR 1010 can do. That all sounds good, the bad part in the above is in the last hour my laptop has started refusing to detect the MKR1010 at all. I think the drivers became corrupted so now I can't upload to code to the new Arduino either. Three steps forward and three back this week, those emoticons are rather apt. Thanks for reading.
  20. Hi, That is interesting, if you get rid of the laptop what is the unit a custom built computer/microcontroller? I ask that as I see you mention EEPROM which is available on the Arduino. You only get 100k (I think) writes Arduino though which would get used pretty quick with the loop that is triggered every minute. How many writes to do get before it corrupts? Well, here is the Sunday post. As I ever I resisted the temptation to hoick out the card before today. I copied over the data into LibreOffice Calc and analyzed it. The good; >>> Orienting the antenna did not seem to make too much difference. I realised that I was already nearly pointing in the right direction. >>> I don't think the significantly higher temperatures this week affected the radio The bad (well, not sure, I don't think I have any control over it but it becomes clear from the plots). There is a time jump in the first screenshot as I had it switched off for a few hours doing work on it. 'Something' happened on the 04/05/2020. Prior to that the signal strength of the transmitter was of a range I had seen before, however after the maintenance window on Star Wars Day (May 4th, boom boom) the signal strength of the transmitter has been significantly down all week up to and including today. I have not made changes to the radio's tuning and the fact that this behaviour takes place after the switch on on the 4th makes me wonder if the transmitter is running at a much lower power..? I suppose I will get an idea when I pull out the data next Sunday. So I won't worry too much at this stage as my setup still seems to be working. GIF for the week. I have also started looking at the Arduino MKR1010, I have played around with some of the sketches and have got it logging details of WiFi connections available around my house. I think there will be a bit of a learning curve with it as I have not quite been able to get some of the WiFi enabled projects working, though they do focus on it being used as a server and as a data logger I think it would be a client. In addition there will be some rewriting as it has its own RTC built in and I am not sure if the DS3231 is compatible (the library for this is filed under 'Incompatible' in the Arduino IDE when you select MKR1010). Plus it runs on 3.3V not 5V so the chassis I plug it in to will need to be quite different to the YABBA ones I have built, but I had expected that. The biggest problem I have is that after installing the MKR1010 software I don't seem to be able to program my YABBA boards any more, I get a program error when I upload to the board(!!!). I was going to reset the RTC to be on GMT (I realise mine is set to BST) today but at the moment I can't. Let's hope my setup is reliable as I can't currently make changes..! Anyway, let's see how things go. If I can't program my existing boards then I have to migrate fully to MKR1010 and done with. I guess I had better get investigating it... Thanks for reading.
  21. Hi, Thanks for posting your output, that does look rather similar. When I first saw the 02/05/2020 plot it did make me wonder if there was a problem with my setup but it appears that it is a real result. Dave
  22. Hi, I could quite happily own a Fluke multimeter..! I posted my data for the last week so would be interested to see how it compares, not least as there were some strange readings yesterday morning around the maintenance window. Dave
  23. I was going to do some work on this yesterday however I found as the weather was unexpectedly better than I had thought it would be I spent it in the garden in the veg beds. By that I mean I was working on them, not lying in them. Today I worked out the bearing from my house to Rhauderfehn in Germany and it comes out at ~64 degrees, so once I start logging later I will re-orient the antenna. At present the antenna is not in this orientation, however it does put (I think) a lot of noise from the house into the null zone. So I am interested to see what the trade off will be - next Sunday I will pull out the data and have a look. Earlier I cut the power and hopped into the roof to pull out the SD card. Among other things I wanted to check was that the change to the voltage divider had not caused any problems, I don't know why that would be an issue but as I had made a hardware change I did want to confirm all is okay. The general trend looks okay, I can see the diurnal pattern, the daily maintenance period is there, the readings taken have have not berserk and the Arduino has been logging the temperature recorded by the RTC as well. By day it looks like the following; And in GIF: My setup is still returning the diurnal profile. Some funny stuff happened 02/05/2020 between 0800 and 1000 but I wonder if that was due to work at the antenna(?). Otherwise though the numbers logged look as expected, and I am gaining confidence that my setup is stable. I had a look at the GOES data - there was an event on 01/05/2020 at about 14:30 however I still think that this lower/mid B class is below what the radio can detect. For the first time I have temperature from the RTC being logged as well (red line). I am interested in this as the tuning guide says that temperature increases can push the radio into oscillation (page 16, #12) and my radio is up in the roof where things can get quite warm in the summer (touching 40 Celsius!). I don't think though at this stage I have enough data to give any meaningful results so I am going to use it for reference over the coming summer. Anyway, in all I am pleased with what has been logged this week and am thinking about what I will do next. I would still like to have the option to run from battery with power being supplied by the Arduino and the radio being turned on when needed. I looked around and found the ready-built MOSFET switch unit using an IRF520 transistor. Even more useful I found a website that as well as advertising the module for sale also gives a schematic of it; https://protosupplies.com/product/irf520-n-ch-mosfet-module/ Turns out I have all the bits. Handy! I am increasingly aware that needing to go up the ladder to get an SD card interrupts logging and, while fine for testing, isn't really conducive to real time SID monitoring. Earlier this week a page arrived with an Arduino MKR wifi 1010 arrived. I think I will try and work on the switching and initial MKR 1010 investigations in parallel. Thanks for reading - data is attached. Dave VLF_T2_20200503.TXT
  24. Hi, Thanks for the post. One thing I quite like about this work is that it generates data for analysis . Out of interest what are you using to measure your loop antenna response? Am I right thinking you have an A/C multimeter capable of going down to milivolts? Having tuned the antenna to 23.4kHz are you finding that the other transmitters are now attenuated or have you got SpectrumLab just logging DHO38? Dave
  25. Today’s work; I have built a 1:1 copy of the chassis so I can undertake further development and still leave my production set up logging in the roof. They look and work exactly the same, which is good! On checking through my components box I found I don’t have any 10nF capacitors (might have to check again as I don’t quite believe that) however I did find some discussion about the voltage divider and if your total resistance is 10k ohms or less you don’t need a decoupling capacitor. So I recalculated and used a 5.6k and two 2.2k ohms in series to drop to 1.1V. I also updated the code to log the temperature measured by the RTC. I converted it to Kelvin as, ummm, I could . It is all running again in the roof so I will leave it to see what comes back later in the week. Thanks for reading.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.