Articles

NodeMCU

Image
NodeMCU NodeMCU is formed by an ESP12E

Sensor Si7021 - Humidity and Temperature

Si7021 Sensor  for measuring humidity and temperature The  Si7021  Sensor  integrates   humidity   and   temperature   sensor   elements,   an   analog-to-digital converter, signal processing, calibration data, and an I2C Interface. The Si7021 offers an accurate, low-power, factory-calibrated digital solution ideal for measuring humidity and temperature Features Precision Relative Humidity Sensor ± 3% RH (max), 0–80% RH High Accuracy Temperature Sensor ±0.4 °C (max), –10 to 85 °C 0 to 100% RH operating range Up to –40 to +125 °C operating range Wide operating voltage – (1.9 to 3.6 V) Low Power Consumption – 150 μA active current How to wire https://learn.sparkfun.com/tutorials/si7021-humidity-and-temperature-sensor-hookup-guide/all Library https://github.com/adafruit/Adafruit_Si7021/blob/master/examples/si7021/si7021.ino#L36

Wemos d1 - Battery powered thermometer v2

Image
I built few thermometers powered by battery to check temperature's rooms in my house. For my tests I used : Webmos d1 mini 18650 battery  Sensor Si7021

Attiny13A sleep mode

Image
Attiny : arduino's little brother Arduino is a very good card but if you need a very smaller card size or if you don't need alls pins and less memory, Attiny is a good alternative VCC =Voltage is 2.7-5.5 v Notice : Pins output high voltage is 4.3 volts with a Vcc of 5 volts. For 3.3 Vcc, pins o utput  voltage is 2.5 V  So be carefull, this is not 3.3 volts like Arduino How to program Attiny  To program attiny, just use Arduino IDE.  To do this, you will have to connevt Attiny to arduino.  Arduino will now be used as bridge Initial step Upload ArduinoISP sketch on your arduino : Select card Arduino Uno Load sketch Samples > 11.ArduinoISP  Tips : be sure to unplug all wires before to upload the sketch First step First time and only once, you have to write bootloader on Attiny : Choose 'Arduino as ISP' as the programmer prior to burning the Arduino bootloader onto the ATtiny Select card ATtinyXX Verify Board Properties...

ESP8266 ESP-12

Image
How to wire You need : ESP8266 ESP-12 FTDI FT232RL Module - Select 3.3v output An external 3.3v power (because FTDI module is unabled to give 200 ma current) Tutorial :  https://www.fais-le-toi-meme.fr/fr/electronique/tutoriel/programmes-arduino-executes-sur-esp8266-arduino-ide

Mosfet N Channel

Image
Mosfet N channel Mosfets can be used to act like a switch For Mostfet N channel Source : Connect to ground Drain : connect to led -> resistor -> +VCC Gate : Connect to +VCC to led ON, Connect to Ground to led OFF See tutorial on Youtube :  https://www.youtube.com/watch?v=gTwq6lxDolM I used STP16NF06L - MOSFET N-Ch 60 Volt 16 Amp Specification Value Supplier Package TO-220-3 Transistor Polarity N Maximum Drain Source Voltage 60 V Maximum Continuous Drain Current 16 A Maximum Gate Source Voltage ±16V Maximum Power Dissipation 45000mW Number of Elements per Chip 1 Peak Forward Voltage 60VDC Output Power 45W Peak Non-Repetitive Surge Current 64A Peak Reverse Current 10uA Channel Mode N-Channel Enhancement Peak Reverse Recovery Time 50ns Channel Type N Peak Reverse Repetitive Voltage 60VDC Configuration Single Maximum Drain Source Resistance 0.09 Ohms@10V Category Power MOSFET Maximum Continuous Forward Current 16A Typical Fall...

Esp-01 deep sleep mode

Image
ESP-01 Esp01 is a very small esp8266. Less pins and small size. So it is wonder for iot projects But ESP-01 consumption is around 90 mAh. So you can't power it with a battery because lifetime will be only few days. To decrease consumption you have to put esp01 in a sleep mode. Best mode is deep sleep mode which reduce consumption to less than 1 uAh. Power consumption - See datasheet Standby ~ 0.9uA Running ~60-215mA, Average ~ 80mA How to power To power ESP-01 you have to use a 3.3v battery connect pin 1-GND to ground connect pin 8-VCC and to 3.3v Found a 3.3v battery is not easy. A solution is to use 18650 battery 3.7v (or 3x AA) and drop voltage to 3.3v. To drop voltage, you can use a LDO like MCP1700-3302E/TO VIN : 2.3-6v VOUT : 3.3v Goto Deep Sleep mode To use deep sleep mode, it is pretty easy. Just add ESP.deepsleep(5*1000000) in your code to go to sleep for 5 seconds. After 5s ESP will wakeup and restart and run setup() again ...

Wemos D1 mini

Image
Wemos D1 mini Webmos D1 Mini module is an ESP-12. It features are a3.3V LDO controller, a 3.3V input, a 5.0V input and a micro USB socket for power and programming. It has 11 ports and all have an interrupt (IRQ), andPWM, I2C. Like all ESP8266 based development boards, it is very easy to program using the Arduino IDE It is a little bigger than an ESP-01. But unlike the ESP-01, it has the advantage of having a pin GPIO16 which connected to the pin RST, wake up the component of deep sleep mode. Be careful, these 2 pins must not be connected when you upload your sktech.

Battery powered thermometer

Image
My idea is to build few thermometers powered by battery to check temperature's rooms in my house. Theses thermometers will report temperature regularly to my server and I will display datas in a graphic web page. I wanted : to get temperatures every half hour (or more if i can) battery life is at least 6 months (or more if i can) to test esp8266 components For my tests, I bought : 18650 battery 4200 mAh  Esp-01 DHT22 module for Esp-01 First idea My first idea was to use Esp-01 because it is very small, so i bought a DHT22 module.And just plug Esp-01 on DHT22 module and power it and it is finish ! ESP-01 DHT22 Temperature & humidity sensor for esp01 And I upload this sketch in the esp01 Code formatting with  http://hilite.me/ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 ...

Install and configure OpenVPN on OSMC

This is a tutorial on how to install and start an OpenVPN connection when your Linux system boots. Install OpenVPN  sudo apt-get install openvpn copy your config files provides from your VPN to /etc/openvpn save your credentials in a file and modify your .ovpn config file like described below start and test it using sudo openvpn --config myvpn.ovpn use traceroute to see if vpn is working. Launch traceroute before connecting vpn and after. You should see differences in routes.   Auto-connect OpenVPN via terminal 1. Create auth.txt file inside /etc/openvpn directory via this command: sudo gedit /etc/openvpn/auth.txt Fill it with your VPN credentials: username password Save it. 2. Then open the file which you are using to establish a connection: sudo gedit /etc/openvpn/myvpn.ovpn And change this line: auth-user-pass into auth-user-pass auth.txt Save the file and change its name: sudo mv /etc/openvpn/myvpn.ovpn /etc/openvpn...

Arduino flight controller

I found amazing project with many videos to build a quadcopter controlled using arduino uno. I am now analyzing the arduino code to understand how it works. I already found some interesting ideas : Loop frequency is 250hz. It means MPU6050 is read 250 times in a second and esc are updated 250 times too  It is a higher frequency than rasberrry zero can produce MPU6050 code to compute pitch and roll is different than mine. It seems to use acceleration rather than angle to compute pitch and roll. And it does not use dplf to reduce noise. I am surprised. It need to be tested. Battery voltage is read and used to increase esc pulses when voltage drops. It permits to stabilize quadcopter performances. Because when voltage decrease, motor rotation decrease too. Good idea. Esc pulses don't use the arduino servo library. They are generated manually using raw commands (pulse high for 1000-2000 us then low for a total cycle of 4000 us). So it needs a loop frequency of exactly 250 hz....

Arduino Test

Image
After few days thinking why my quadcopter python algorithm does not work during real test, I finally suspect the pwm pigpio libray does not do the job. So I decided to test my algorithm using Arduino beacuse it has 4 hardware pwm pins. I bought Arduino Uno. So I started to rewrite my python algorithm in C/C++. During rewiting my code in C/C++, I feel to go back 20 years ago...in the 1990s....Use basic functions, keep care low usage memory... Using Arduino is very very different from Raspberry, Logs are basics, you must use serial communication using an usb cable. It is not so easy....But I finally ended my code. MPU6050 code is finished. I read it and compute roll/pitch. PID and speeds motors are compute too. Now I have to test my code again as I did with Raspberry I have not yet tested pwm harware pins. I should have do this first but I got a basic problem. In fact, my usb cable between my computer and my arduino/quadcopter is too short ! So I have to w...

Mini quadcopter Eachine e55

Image
Few weeks ago I got an mini quadcopter Eachine e55 for the Father Day. After few flies, I bought 5 batteries on banggood. Now i can play with my quadcopter for 1 hour. It is fine. I use my smartphone to control it over wifi. It is easiest to control than the rc control (I am still a beginner) But two days ago I broke a motor... I found no help on the web how to repair it. So I decided to disassemble myself my Eachine e55. And I made my first youtube video to explain how to :  Some pictures Now I am waiting my motor order from banggood. I will receive it at the end of july

Quadcopter - What is wrong ?

Last 2 days I made few tests with motors ON All tests confirm my previous vitual tests . But reality is not virtual and the quadcopter does not do what I thought ! As in my    previous vitual tests , fo r the first test, I tilted  my platform  in front and start the quadcopter with motors ON. I  thought the lower side will raise to go and stay in horizontal position. In fact, the lower side raised as expected but it did not stop to raise when it got horizontal position. It raised again and then the quadcopter turn over the other side.... Considering another little problem which is sometimes at startup only 3 of 4 motors starts normally. I suspect pigpio library not to do the job. Is this libray able to send PWM signal for all 4 motors ? Just remimber this is not a hardware PWM signal.... So today,.I don't know where to search...  I am a little desperate...

Indoor Test - Pitch and Roll computation

Image
I have written my first algorithm to compute pitch and roll. So I made few tests to check it. Pitch shows if quadcopter tilt front (pitch is positive) or tilt back (pitch is negative) Roll shows if quadcopter tilt left (roll is positive) or tilt right (roll is negative) Determining pitch and roll is very important to control motors and get a stable flying quadcopter. For example, if quadcopter tilt front pitch will be positive. So, to get a stable quadcopter, we will need to increase front motors speed and decrease back motors speeds To do this, I found help on this page . It use acceleration in the computation.to correct read values from the sensor MPU-6050. All tests were virtual test with motors OFF For the first test, I tilted my platform in front, then I raise it to horizontal and then let it down Here is values read and used to compute pitch qay quadcopter acceleration Y read from sensor MPU-6050 qrx quadcopter ...