MakerFaire Ljubljana 2017

Last week I have attended and helped at the first local Maker Faire event in Ljubljana. This is an event that tries to bring together people or organizations that create things (everything from software and electronics to art and woodwork) in order to promote science, curiosity and knowledge transfer.

In the stands we could meet with the makers from Slovenia and all other neighboring country. Among other things it was apparent that there is a strong motion towards using 3d printers and Arduino platforms as most of the stands showcased a product or idea based on one of them.

The biggest advantage of an event like this for me was a practical aspect of it. There were numerous hands-on activities where you cold try the state-of-the-art equipment, play with different experiments or create your own simple electrical circuit.

Official website of the event: http://ljubljana.makerfaire.com/

Image gallery:

Arduino weather station part 2

Sometimes I just do not have time to connect to the internet and check current weather conditions. This is the reason why I made this indoor LCD weather display based on Atmega328 Arduino MCU. The circuit board consists of two LP2950 voltage regulators, MCU, four buttons, ENC28J60 Ethernet module and LCD12864 graphic display module.The Ethernet module is used to connect to this website and to download current data. With it I am not limited to use only at home, but it can be used in any place with internet access. The input voltage is 3V3 so this is the reason why I have two voltage regulators. The connection to MCU is established using SCK, MISO, MIMO and SS digital pins.

Indoor weather station display disassembled.

The LCD12864 display uses ST7920 controller that has the option of parallel and serial communication. Serial communication is preferred because it uses only three digital pins (3, 8 and 9) instead of ten or more for parallel. Another advantage with this display is that it can be used in graphic mode. With it you can control individual pixels on screen. I used this to draw the sun or clouds depending on a outside conditions.

Display showing the current data.

LCD display in action. On the first screen you can see the current weather data (temperature, humidity, wind pressure, cloud coverage and sky temperature), the time when they were recorded and if the change from earlier time is positive, negative or constant. On the second picture the display is showing maximum and minimum within certain period and they can even be reset. All the captions are in Slovene language. More pictures can be found in gallery.
Display showing the limiting data.

The original library was meant to be used with Arduino Mega that has 4 times as much SRAM as ATmega328 I have been using. The screen buffer alone needs 1KB (128×64/8 = 1024 bytes) of memory that is half of the total memory one could use. Beside this in graphic mode you have to store every individual pixel of any character used, leading to overflown memory, leading to broken code and unexpected errors. If you do not want to change the look of the character while the program is running you can store them in FLASH memory along with the source code. Any variable the contents of which will be constant and not changed after initialization can be stored in FLASH using avr/pgmspace library. Doing so updated library can be successfully used on UNO an Duemilanove Arduino broads. Here you can download my updated version of the library I have been using for LCD 128×64.

Wiring diagram

Useful links at building this device:

Sorce of Arduino library for graphic display
Arduino ENC28J60 Ethernet library

Arduino weather station part 1

Finally the weather shelter is no longer empty. Inside it I put Arduino based weather station, made by me. I wanted it to drain as low power as possible so the Atmega328 MCU is sleeping most of the time except when it gets interrupt to send data to PC or when it detects that anemometer (wind speed) is moving. As voltage regulator I am using LP2950 instead of LM7805 or LD1117 as it has way lower quiescent current of aprox 100uA. That is 50 times less than 5mA as a LM7805 has. Station is running on four AA batteries so every mA counts and with this settup I get for around of two weeks energy. Connection to PC is done using serial Bluetooth module. All the data sent from the station can be seen here.

Inside the weather shelter.

Closer look.

Detectors used:

Anemometer – wind mill:

Windmill

This one is made of scrap material found at home. The magnet is attached inside the cap and when it passes the hall switch US5881LUA detector Arduino gets interrupt to increase an integer that is measuring wind speed. The calibration was done with anemometer attached to the bicycle. I tested it while cycling at speed form 5 to 25 km/h and got a nice linear graph.

Hall switch with two stabilizing capacitors and pull-up resistor.

MLX90614 as cloud detector:

MLX90614 mounted on a top of the PVC pipe cap.

The MLX90614 is high-resolution I2C non-contact infra-red thermometer. For my purpose it is pointing to the sky and it is measuring the sky temperature. The temperature depends on whether the sky is clear or overcast. When the sky is clear the temperature is lower and when it is overcast the temperature is higher. Sadly this is not enough to detect clouds. In addition, it is necessary to measure the ambient temperature too. Cloud detector calculates the difference between the sky and ambient temperature. From the tests I deduced that difference of lees than 5 degree means 100% cloudy and difference higher than 22 degree is clear sky. My MLX90614 is not the best for this work as it has field of view of 90°, more suitable would be the one with FOV of 20° or 10°. The casing of the sensor is hermetically sealed and that way it can be directly mounted on top of the shelter without any need for additional rain protection.

BMP085:

This is digital high-precision barometric pressure and ambient temperature sensor. It is designed to be connected directly to a MCU via an I2C bus.

HIH-4030:

Analog humidity sensor.

Humidity (left) and pressure+temperature (right) sensor.

Pluviometer – rain gouge:

Tipping bucket

I even build rain gauge with tipping bucket, but it is not used in final setup as I have no use/need for precipitations data.

Wiring diagram, click on the picture for better resolution.

Update:
For even lover power consumption I replaced Bluetooth module with NRF24 wireless radio transmitter and added internal watchdog timer that wakes up microprocessor when it has to transmit data. NRF24 in comparison with BT drains current of tens uA in contrast of 5mA current for BT. The biggest difference can be seen when modules are not connected to PC. NRF uses the same amount of power in contrast to the BT that draws more than 50mA. Now the only serious power consumers are sensors that remain unchanged.

Useful links:
More pictures in gallery
Arduino library for MLX90614 IR Thermometer
BMP085 Sensor Tutorial
HIH-4030 can work with 3v3 input

Arduino telescope focuser

My goal was to use Arduino board to drive a stepper motor (from an old printer) that would be controlled via PC or hand held remote. Bipolar stepper motors can not be controlled directly with Arduino board so I had to use additional driver circuit (Allegro A4983). Ardunio feeds driver with three signals: step, enable and direction which determine the angular speed and direction of rotation. Remote has six buttons but so far only four are used for increasing/decreasing speed and movement control. Computer communicates with board over RS232 port with ASCOM drivers made by ejholmes. ASCOM standard is used in many astronomy software like MaximDL, Sharpcap,.. so you do not need additional software to control focuser.
Focuser works better than expected and is mainly used during imaging planets and DSO objects. Focusing by hand at that time is less accurate and almost impossible. The whole project costed me few € because I already had everything at home except a shaft coupler.Link to a source code for the focuser. Fell free to use, improve and comment, your feedback is desired.

Here is a picture of my telescope focuser with one of the focuser knobs removed and motor focuser attached instead of it. The motor’s and focuser’s shaft are joint directly by a shaft coupler.

Motor and circuit attached to focuser and telescope, ready for test under clear sky.
6-button remote, connected to Arduino by two 4-wire stretchable telephone RJ11 coiled cables.
Focuser wiring diagram

Helpful links at building this device:

More pictures in gallery
Ejholmes github site for ASCOM driver