
Recently I read two articles on Habré about
Explorer - 1 and
Explorer - 2 . Wanted to share a similar project.
Background and formulation of the problem
I have been reading the Cosmos hub for a long time on a habre and every time I understand that I want to feel the same thing as the developers of Curiosity or Rosetta, to face the same difficulties as they, the main of which is remoteness. My budget is more modest, so what are we going to do on the Arduino.
')
I took Explorer 1 as a basis, but I wanted to abandon the concept of hanging sensors and delve into the topic of remote control.
So what should a satellite do:
1) Actually, like any satellite, it must be able to receive and transmit data;
2) Must have sensors;
3) Must be autonomous.
Development
The role of the ground station served Arduino uno, and the satellite was the Arduino nano.
The satellite is launched into orbit (balcony).
I have a transmitter on the NRF24L01 + microcircuit. It provides two-way communication in packets of 32 bytes.

The choice of sensors fell on the DHT22, BMP180 and BH1750FVI. As you understood it will be a meteorological satellite.
All sensors - DHT22 (humidity and temperature sensor), BMP180 (pressure and temperature sensor) and BH1750FVI (light sensor) - I bought at home, through Avito. I still do not understand why no one uses it.



Autonomy is achieved by using a Krone battery (9 volts). I tried to make power from the solar battery through step up, like
this , but the panel lacked power.
I did not bother with the quality of the code - I still do it on Arduino. I will not give the code here, because it is ugly. Anyone who wants to do something like that will find everything he needs, the benefit of the Internet, and so is littered with a bunch of examples for working with sensors.
But the food I spread a special one: with filters and
current sensor, in the form of a resistor.The power for the sensors (DHT22, BMP180 and BH1750FVI) is taken from the controller's foot so that it can be turned off if something goes wrong, and a 100 Ohm resistor is placed between the sensor ground and the controller ground so that some voltage drops across it when the sensors are working . Arduin measures voltage, and with the help of Ohm's law, it is possible to calculate the current consumed by the sensors.
I do not know why the filters when powered by batteries, but it sounds cool.
ControlI thought up the commands in such a way that the satellite could be debugged as if it were right on my desk and not on the balcony (open).
Commands:
nop_sputnik // just send the answer
reset_sputnik // hardware reset satellite
test_i2c_sputnik // test the presence of i2c devices and return their address
make_log // make a log in eeprom in case there is no energy left to transmit the packet
Ananalog part:
test_5_volt // test the voltage of the 5-volt line
test_buttery_volt // test battery voltage
test_current_sensors // check sensor supply current
beep_sputnik // bibby through speaker
Well, just in case:
switch_off_termometr
switch_on_termometr
switch_off_pressue
switch_on_pressue
switch_off_humidity
switch_on_humidity
While collecting, I decided to add a squeaker as a system of interaction with the outside world.
Having combined all this in a pile, I was very surprised when it all worked the first time. But as it turned out, not for long .. but for now the satellite photo:

And the receiver on the ground:

I'm already in anticipation, connect the battery, the LEDs light up. Everything works, the receiver polls the satellite every 10 seconds.
I did it at night, sent the satellite to the balcony in a cardboard box, the receiver connected to the laptop and went to bed. This action took place at the end of August, so do not be surprised by the warm weather, now we have -10.
In the morning I immediately run to check the data and bummer.
last answer from satellitehumidity = 99.90
temp = 18.20
pressure = 57370
light = 0
data = 1
value = 623
The following graph shows the temperature overnight in degrees Celsius (information removed from the BMP180 sensor). At some point (see chart) BMP180 stopped working:

The graph below shows the pressure (in Pascals). And yes ... I myself do not know what this peak is in the middle:

Humidity (as a percentage) - (the humidity is 100% similar to the truth - it rained that night):

As it was at night, the light sensor almost constantly showed 0, except for the time when the light was on in the room.
Analysis of the causes of failure
Only BMP180 refused (although I thought DHT22 would be cut out). I2C bus, through which BMP180 and BH1750FVI were connected,
it seems worked.BH1750FVI sent 0 (in order to send a byte storing 0 in itself, the sensor must push the data line to zero, but 0 on the line could occur due to an error or poor contact).
In general, I am not sure of anything, but I think BMP180 is dead due to humidity.
Initially, I did not specifically measure the current consumed by the satellite and was not very surprised when the battery went down after 1 hour and 43 minutes.
In general - a
complete failure.Next time I want to add sleep modes, do some kind of data auto-verification system, for example, with sharp jumps (like pressure value that night) or if it’s a long time - the sensor sends the same data (like a temperature sensor). To treat this, I plan to reset the sensor. And, in the distant future, perhaps, after passing the EGE, I will rewrite everything on pure C and make a full-fledged fee on Atmega8 or STM32 to work as part of a weather station.
PS Tell me some program for processing large data arrays, but Excel is not very convenient.