Posts

ESP8266 connection to MQTT server (Attempting MQTT connection...failed, rc=-2)

Recently I had a problem when trying to program NodeMCU with Arduino. I flashed arduino with basically default pubsubclient test program. After programming NodeMCU connected successfully to Wifi, then tried to connect MQTT server and failed: WiFi connected Attempting MQTT connection...connected ............Attempting MQTT connection...connected ............Attempting MQTT connection...failed, rc=-2 try again in 5 seconds I researched and tested many Arduino scripts. All failed with the same error -2. I logged into the MQTT server and watched logs. The NodeMCU didn't even connect to the MQTT server. I was clueless. Luckily I bought a few NodeMCUs from different sellers. Opened up another NodeMCU and hooked it up. Flashed the exact same code to it and it connected and worked like charm. Then I tried to flash the first problematic NodeMCU with Arduino and exactly the same error -2. I had also a ESP12E that had the -2 error before. Flashed it with the same code, still error -2.

Making PCBs with 3D printer

Image
I always wanted to make PCBs at home. I have tried most of the processes from the internet to make PCB-s (by hand with marker, with printer and glossy paper, ....). Recently I got 3D printer and thought that the precision should be enough to make simple PCBs with it. So I searched from internet and found this page: http://www.lamja.com/?p=635 I had some old rod from an old printer from scrap. Next I designed a rod holder that would fit the printer. The printer is modified Ender 3 and has new cooling. So the rod holder had to be designed from scratch. I found some usable size spring that I made a bit bigger. I tried the process with marker and it worked but the result was not very good. So I had a idea to use nail polish and scrape that off with the rod. I used some random old nail polish. This resulted much better PCB board than the marker. Other parts of the process are the same as the link above. I had some trouble to get the *.svg file to FlatCam, because FlatCam
Image
Automatic greenhouse door opener Goal Opening the greenhouse door automatically when the room gets too hot. I have set it to 24 degrees C that the door opens and door gets to maximum position when there is 32 degrees C. Used hardware In box Arduino Nano clone - main "brain" of the project 5110 LCD - LCD to show info DS18B20 - temperature sensor SRD-05VDC-SL-C - 2 relays LEDs x 6 - for indicators Resistors Capacitors - 3x Level shifter 5V->3.3V 7805LM - 12v to 5v 10A fuse and fuse pcb mounts PCB screw terminals On door Car side window lifting motor and mechanism Magnet and PS-3150 Reed Switch Switch - for door "homing" bolts, nuts, threaded bar Software I wrote code for the arduino to control the door. Arduino checks if the home swich is pressed. When home switch is not pressed the arduino tries to close the door. When door is closed now the arduino knows the "0" place. Measuing temperature. When temp is <24C then does not

Temperature and humidity controlled fan

Image
PRINCIPLE: Basically this device is used to switch on fan, when conditions are good for drying wheat. Conditions are good when the humidity is lower than RH<70% and T<24 º C. When these conditions are met, the fan has to switch on. The fan is big and needs to be switched on rarely and switching on the fan frequently may kill the fan starting schematic. Therefore it doesn't need to change the relay state frequently. HARDWARE: I am using for this Arduino Mini Pro 3,3V, Nokia 5110 LCD, relay, LEDs, AM2305, BC547 transistors and voltage adjuster. The brain of the whole thing is Arduino, directly is connected to it 5110 LCD, relays are being run through the BC547 transistors. AM2305 sensor is connected to Arduino pin. SOFTWARE: For controlling the LCD is used LCD5110_Basic library. The LCD displays info from sensor: temperature, humidity, temperature limit, humitity limit, relay state and countdown timer. The code checks sensor every 30 seconds and updates display accord

Kairos planet

Image
SISSEJUHTATUS:      Umbes 2015 novembris kuulsin esimest korda sellest, et on võimalik raha teenida rentides enda arvuti kõvaketta mahtu. Tundub huvitav ja hea pakkumine, kui saan enda arvuti tööle jätta ja raha niimoodi teenida. Kuna oli kuulda tuttavatelt, et mõned on sellega tegelema hakanud, siis otsustasin enne uurida teemat ja seejärel võimalik, et ka liituda süsteemiga.    Peale mõningast google's surfamist leidsin väga vastakaid ülevaateid antud firma kohta. Ühed arvasid, et nüüd pole enam rahamuret ja teised, et tegu on püramiidskeemiga, mis on pettus. Kas ongi see pettus või saab raha teenida? Lehekülg tundub ju usaldusväärne, samuti, et on finantseeritud vormeli meeskonda. Lisaks pidi ka üks suur autotootja olema klient. Tundub hea pakkumine!? LIITUMINE: Uurisin edasi, mis on pakutavad variandid antud tootega liituda. Tuli välja, et on neli paketti: Kõigi pakettide puhul peab töötama arvuti päevas 10h.    Tundub kuidagi imelik, et 10h peab arvuti tööt

MediaTek LinkIt Smart 7688 Review and Garage door opener project

Image
   I was searching a device that would have many GPIOs, USB and would have wifi connection. A device that was pretty good was WRTnode, that I was using before to open garage doors. I wanted to make an upgrade, because I had multiple PCB-s around and connections between the PCB-s were problematic sometimes.    Searching through internet I found that Mediatek has made LinkIt Smart 7688 device, that would be pretty good for me. It has loads of memory, flash storage and powerful cpu and it costs about 13$. So I bought three of those devices.   After about 2 weeks LinkIt devices arrived. Immidiately I plugged one to power and started testing. HARDWARE: The hardware is very nice for that kind on price, the board and connections seem well done. Really good is that the flash memory is visible and can be removed when needed. CPU and memory are covered with metallic covers. When running it gets comfortably warm, nothing hot. There is very small Chip Antenna on the device. My thought wa

Audi A6 C4 Webasto DBW46

Image
Probleemiks oli autol, et ei tööta Webasto. Esmalt oli kaitse läbi, peale mida hakkas nagu asi pooleldi tööle. Toimis tsirkulatsiooni pump, kütuse pump ja ahi. Probleemiks oli imelikku häält tegev ja kaootiliselt töötav ventilaator. Sai webasto alt kruvitud. Tundus, et webasto originaal pistik oli halb ja väga halbade ühendustega. Tuli ümber teha, uueks pistikuks sai vanad kindlad audi pistikud, ehk originaal 1x12 pin pistiku asemele tuli 2x6 pin. Pistikute jama sai korda, kuid ventilaator tegi ime häält ja töötas ainult umbes 1 kord 10-st. Lahti võttes oli mootori sees seib, mis takistas töötamist. (Sellest pilti pole kahjuks) Kokku pannes suutsin ühed keermed alumiiniumi sees maha keerata. Õnneks olid augud kuni ventilaatorini välja ja seega puurisin läbi 6mm puuriga. Asemele panin mööblipoldi, millel pea käiasin väikseks, et ei jääks ventilaatori labade ette. Töötav ventilaator: Kui ventilaator sai külge pandud liikus õhk väga ilusti. Nüüd tuleb auto küljes proovi