Κυριακή 28 Απριλίου 2019

THE RISE OF THE DRONE ERA


UPDATE 1/1/2017 Due to new legislation about drones I cannot fly my drones any more because they need an airworthiness certificate from Hellenic Civil Aviation Authority. Never mind, the costly Li-Pos are already exhausted and I thing  it is about time to move my autonomous vehicle interests to other more legal regions :) .So far so good then, I learned a lot about autonomous vehicles and most certain I HAD A BIG FUN FLYING THEM (and a huge aerial  photo collection).
    
Ok let's admit it. Can somebody who likes microprocessors, GPS's and high tec electronics stay away from drones? Nay !!!! So I entered this uncharted region plenty of fear due to the fact that I had once lost a model airplane due to my ignorance of how to fly model airplanes. However I have no fear at all to make a car - ship - airplane - drone -submarine - whatever. So I acquired some aluminum plates, bars, tubes and 3mm inox allen screws and bolts, purchased from E-bay motors , propellers, batteries , autopilots ,GPS , telemetry modules and here it is.... my first drone back in 2013 IN FLIGHT !!! 


First quad in flight  - RIP

RIP ??? How's that ? Well , I went totally unprepared, without on board pilot camera, no video link, just a simple short range bluetooth telemetry, a 1HZ GPS module  (the late EM406) which took for ever to lock , no failsafe programmed on autopilot, on a windy day to a mission which seamed very easy, very close to my house. Failsafe was a nuisance to program and once the quad  returned to launch (RTL) on his own and crashed before I understand what happened. I flew it without gps lock and when it got over 30m it drifted away due to strong winds. I tried to bring it back but since I had no colored stripes (or colored propellers) on any of the arms to know where it was heading , I drove it further away and it just disappeared from view towards a hilly forested area. Needless to say that my flying skills were (and still are) NULL. 

The broken propeller issue and Murphy’s Law
"Even if you fly in a totally bushed area your drone is going to crash on that single rock between the bushes." The frame below shows the propeller blade separating and causing a drone crash. At first I thought that responsible for the crash was some kind of RF interference. The on board video camera caught the culprit : We had an in-flight propeller blade separation.

propeller blade separating

 ...and that single rock

Quad  MK II 
After considering more seriously about flying drones I assembled the MKII. It still flies today (2016) despite a few crashes that costed me no more than a few propellers and some twisted aluminum arms and plates. Here it is:


Quad  MK II

Lessons learnt
  1. Don' t use cheap 9.6 inch propellers on a 1.5kg drone - they use to flip on air (happened to me twice). 
  2. Cheap batteries have unexpected behavior . 
  3. Use video link and a camera for the pilot 
  4. Wind velocity rises dramatically 30m or higher or when clear of trees or houses. 
  5. Schedule your mission very carefully 
  6. Be sure that telemetry and osd video are working 
  7. Do a range test 
  8. Check for RF interference 
  9. Program failsafes 
  10. Wait for the gps to lock.  
  11. Stay away from people -cars -airplanes and generally urban areas - 1.5 kilos is not a negligible weight when falling from 70m 
  12. Do preflight tests based on a thoughtful prepared list 
  13. Connect the battery low warning buzzer 
  14. Put a lost model module buzzer on an unused channel 
  15. Write you phone number on the drone. 
  16. Use different color for the drones back arms. 
  17. If you 're not a competent pilot, then  let the electronics fly it for you - believe me they can do it both economically and safer too.
I decided to fix some of the problems discovered during the first and second drone development.

  1. The drone should have ample space for the onboard electronics and they must be accessible without major strip down.
  2. Video camera - the excellent Mobius actioncam - should be on a proper gimbal offering unobstructed front view and placed well away from the propellers.
  3. The drone must be foldable and could be easily carried in a plastic tube of 15cm diameter.
  4. Battery must not hit the ground, but it must be housed and protected inside a frame, and able to be moved to adjust the CG of the air-frame. (this is accomplished by using velcro straps)

The new drone named MARK V (MK V) was designed back in 2015 from scratch using a CAD software .
3mm and 0.8 mm aluminum was used for the baseplates and 1x1 1.2mm aluminum "Pi" frame for the arms.
Notice the orange colored tape on the back legs ..... 
.    
  CAD of quad MK V

  CAD of quad  MK V

Quad  MK V

Coming soon (?) ...


WTF is this ?
Be patient guys, if I 'm too much occupied with this blog I will never finish my projects.....Sorry

Σάββατο 10 Δεκεμβρίου 2016

AUTOPILOT MEGA (APM) - Now, we 're getting serious

Well beyond ardupilot I (best known as ardupilot legacy) , the excellent APM 2.5 (or 2.x) hardware and corresponding firmware gives the opportunity to fully explore the potential of modern mems devices and other electronic modules. In particular , using modern ultra fast and cheap GPS modules from China such as Ublox NEO 8M we can develop UAV's with astonishing position hold and track follow accuracy.

My new (gen II) auto piloted car is based on a simple wireless remote controlled jeep given as a NiCd battery discharging device with a SKILL portable drill. I changed the motor driver with a quick-and-dirty perf board with an ATtiny2313 and a L293D to control steering and traction motors.

ATtiny 2313 and L293D dual channel PWM motor driver

Then I (over) loaded the little toy with an APM 2.6 autopilot, a 5V power module,a Ublox GPS, 915MHZ telemetry module, 2.4Ghz R/C receiver, servo camera (or antenna, machine gun, whatever) gimbal, 5.8 GHz video transmitter and a 3c 2200mAh LiPo battery. It finally looks like this :

APM inside

Without camera or 5.8 GHZ video transmitter 

This particular rover is a fine platform for developing and testing autopilot modes, ground control stations (GCS), PID controller behavior, GPS accuracy, R/C remote - telemetry - video range , power consumption and electronic interference between modules. Its maximum speed is 0.4m/sec but with an 2200mAh LiPo battery it can travel for hours with everything on, and you can’t lose or crash it. You can hardly wear its "tires" too.

Let's see it in action at night with an automatic mission with 4 waypoints. Using the Ublox 8M GPS (16 satellites HDOP 1.35m) we get the following astonishing results regarding the track repetition accuracy of a such an economic combination of hardware and firmware !!! (even multipath issues are not affecting GPS performance -what else can someone ask ?)

Night testing of GPS - autopilot accurancy

On Michael Oborne's excellent Mission Planner GCS we can clearly see the telemetry data and 5+ track repetition accuracy.

  Ublox 8M GPS impecable performance  


 Ublox 6M GPS has a decent performance as well 

This little thingy has travelled literally lots of kilometers without any issues. Just charge the battery and go on. You can 't imagine the joy you get when seeing this little fellow driving on after one and a half hour, hitting one waypoint after the other with more than 60% of battery remaining !!!. 

Πέμπτη 21 Μαρτίου 2013

MAXIMUM RANGE OF ULTRASONIC MODULE

A trivial application of ultra cheap Chinese ultra-sonic modules like the US-020, is to use it as range finders. The question is what is the maximum distance we can measure. These modules have an on board microprocessor and so we don't have any access on front end receiving amplifiers or transducer driver stages. The signals we get are pre-processed. A search through the available cryptic manuals on the net depicts a polar diagram that shows max distance about 10' (~300cm) which is far less than the 400-500cm advertised on ebay.
We wanted our setup to be portable in order to have some outdoors measurements. So we connected our arduino mini to a linvor slave bluetooth module and used our mobile android phone as a terminal using an excellent free android application named Bluetooth SPP by Jerry Lee.  Bluetooth  SPP  realises the SPP bluetooth service on an android device and is rock solid, much more robust than standard microsoft SPP service on ms Win XP BT stack. Plus, it includes a file logger !!  At first we measured a distance of approx  5 metes and we certified it with a laser rangefinder. Accuracy is pretty good (within 1 cm )  for such a low priced device and consistency is impeccable as you can see in the following video.

Searching for the maximum distance in a noisy outdoors environment was quite difficult. We used an office chair to be able to rotate the measurement setup on  the horizontal plane. At last we could get 1009 cm as  the maximum reading in our terminal while 1135 cm seems to be our maximum software limt. Accuracy was in the range of 5cm and consistency was not bad at all using a simple software filter that rejected erratic measurements. 

Πέμπτη 3 Ιανουαρίου 2013

CENTRALIZED SPLIT UNIT AIRCONDITIONING CONTROL

  Maximum HVAC efficiency is obtained with the use of inverter airconditioning units that have a  CEP  3.5 or more.
  The idea is to control some (3 or more) sets of split type airconditioner units with a central (master)  unit.  This  master unit runs a time schedule by reading the onboard RTC, logs data and slave responces to a micro SD card,  communicates with the slave units via RF24L01+ modules at 2.4GHZ and even takes care of local room temperature by reading a precision centigrade temperature sensor LM35Z and controlling   the local airconditioner unit with an IR led that emulates the original (Hitachi's) infrared remote control. And last , but not least, an input from a power meter (like an Electric Owl CM160 ) monitors electric power consumed by all air conditioner units to prevent power overload.  
  Slave units comunicate with master via  RF24L01+ modules,  read temperature with a LM35's as well , and send infrared commands to the remote airconditioner units. In case of RF link failure they can even take over  local control.
     All units are based on Arduinos's MCU's. Behind the idea of centralised HVAC control is, of course the optimisation of mains power consumption. Below is a photo of a master unit  prototype. On the prototype shield on top of an Arduino duemillenove, you can see the RF24L01+ module, the RTC module (a DS1307) with the backup battery, the infrared led and 2N2222 driver. The temperature sensor LM35Z is behind the RTC module adjacent to the analog pins of the shield. Sd card is an optional add-on . On the paper are my so-far failed attempts to decode the manchester-encoded pulses of the electric Owl's  CM-160 receiver output. On the oscilloscope you can see the infrared pulses that control the shutter of a Pentax X-5 camera which plays the role of the receiving airconditioner unit just to make sure that no interrupt handling inside RF24,RTC,SD,SPI  or WIRE libraries interferes with the time sensitive infrared carrier signal of 38.4KHZ Two buttons are also  provided to send commands like "emergency Power OFF all units" or "set all units to SLEEP 1H  mode".  

Master unit prototype
Code on the master unit takes approximately 26K of flash memory and on the slave a mere 14K.(Atmega328). We can also provide all units with PIR detectors to sense human presence and to inform master to take care accordingly. Every unit can also be connected via USB to a pc for debugging purposes.  

Σάββατο 6 Οκτωβρίου 2012

CAMERA SERVO ADD-ON

Here is a servo adapter for non-infrared remote controlled cameras. Upper servo controls shutter and lower zoom functions. Servo position can be adjusted to fit multiple camera makes. The video shows adapter controlled by the arduino universal remote camera controller which controls the camera array of my previous post.
.

This adapter can be controller by a pc via an rf (xbee) link or arduino's serial usb port , the mini remote control shown here, the hacked helicopter remote control of the previous post, any  PWM R/C remote or by using time lapse and PIR / infrared barrier ports /buttons  on board  arduino pcb

Τρίτη 18 Σεπτεμβρίου 2012

REMOTE CONTROLLED CAMERA ARRAY

I really like remote controlled cameras. Unfortunatelly, affordable ones are very rare these days (like Pentax Optio S1) . An infrared remote control was considered standard accessory during the good old days of  mini-dv and other  tape camcorders but now one has to try hard to find the little red-purple  piece of plastic at the front face of contemporary video equipment.
So,I  decided to make an arduino infrared remote controlled camera array . An arduino prototype board with an infrared led and two servos controls at least four different pieces of video equipment and has a few  options useful for nature and wild life photography as well.  A motorized camera rig is on the way.
Oblique view of the  camera array

Rear view of the camera array
Camera array in action




Arduino sends infrared remote codes to the cameras in order to control functions like shutter press/release, zoom in /out, snapshot recording and video recording toggle. Arduino infrared is controlled remotely by either by a  PWM R/C remote control , a serial  digital link (or Xbee) ,  a 433MHZ 4-Channel  button remote control or locally using butons on the arduino board itself. Even two servos can be connected on the board to control shutter and zoom in manual-only cameras. A relay output and an user configurable input can be connected to a PIR detector or an infrared barrier.
A "hacked" 433MHZ radio link -we just get TTL Rx/Tx signals and 5V to feed  Arduino

Arduino infrared prototype feeded by a  7.4V  LiPo (5400mah!!) , a 3A/ 5V swiching regulator, and a hacked 433Mhz serial link . Bottom center is the Infrared led and one of the two optional servos for shutter and zoom functions.  

The not-so-innocent cheap helicopter model remote control and hacked  433Mhz serial receiver. Everything inside original remote  was discarded and a 433Mhz serial link (the same as the receiver) was added  together with an arduino mini at 16 Mhz, another  two axis left joystick and two extra buttons below it.  Power comes from  4 NimH batteries and a 5V/3A switching regulator,  Line-of-view range is about 300 meters.  

Arduino infrared prototype is controlled by an -also hacked - 4-channel 433 Mhz garage door  receiver. The minimalistic remote shown on the right has a line-of-view range of 300 meters ! It can control shutter , Video recording and Zoom functions of every camera in  the array.   

 2 channels of a common  PWM R/C receiver are connected to the arduino prototype. We can control  shutter , Video recording and Zoom functions of every camera in  the array also,  using flap  (CH6) switch for shutter and Video record toggle, and  throttle (or elevator) joystick (CH3/CH1) for Zooming functions.     

Another useful option is the built-in intervalometer   which takes time-lapse videos like this one :

You can see a FHD of the above video if you click on the following  link :
or this one :


Δευτέρα 26 Σεπτεμβρίου 2011

MEADE ETX-70AT TELESCOPE REMOTE PC AND ARDUINO CONTROL

These fine nights of September when Orion rises early the morning above the horizon, and Jupiter dominates the sky, its a pleasure to use the small ETX-70 telescope guided by its Autostar 494 controller. That telescope costed a mere 200 Euros at Lidl and in my opinion it isn't just a fine little telescope for the beginer, but it's also  perfect for land surveing. When Lidl sold its Bresser microscope (another 60 Euros welll spend), it supplied it with a USB camera that fits not only to the microscope , but via an (supplied) adapter to the 1.25'  eyepiece holder of the ETX-70. Even though the USB video adapter has a resolution of just  640 x 480 pixel , it is very good for land surveying as  shown on the following  video. At this case the distance to the subject (the Mi-8 Helicopter) was about 2.5 kilometers, temperature was about 27 deg. C, a sea area existed between the scope and the target and atmospheric conditions far from perfect. Barlows 3x lens was also used that deteriorated the resolution but I wanted to push it to its limits.


 

From the point of view of an electronics engineer the most interesting feature of the ETX-90  , is the precise guiding mechanism which can be controled by the computer's serial port. All you need is the optional 506 cable set from Meade which is actually an RS232 to I2C adapter that connects to the AUX port of the microscope. A lot of info is written about Meade's serial protocol but the best way to learn about it (exactly as I did) is to tap the serial cable and spy on the data when controlling the telescope with a proper software such as Drsoft 's Meade control panel , Carte des Ciels or Stellarium. A much more elegant solution to taping the cable is to duplicate the controling serial port using a serial to ip server, and open a teminal (like TeraTerm) at 9600N81 to view and log the traffic.After all my finds were :

#:Mn#  Slew north (up)
#:Ms#  Slew south (down)
#:Me#  Slew east  (left)
#:Mw#  Slew west  (right)

#:Mw##:Mn#  Slew right up    (NW)
#:Mw##:Ms#  Slew right down  (SW)
#:Me##:Mn#   Slew left  up    (NE)
#:Me##:Ms#   Slew left down   (SE)

#:Qn##:Qs##:Qe##:Qw# Stop movement after above commands
#:Q# Stop movement for all motors

#:Sw2#   Slew speed slow
#:Sw3#   Slew speed medium
#:Sw4#   Slew speed fast

FOCUS  CONTROL - there isn't any focuser on the scope - we will talk about it later.
#:F+#    Focus +
#:F-#   Focus -
#:FQ#   Focus Stop
#:FF#   Fast Focus
#:FS#   Slow Focus
 
After reading the excellent info on http://www.weasner.com   I learn that : " when typing a single control-F on the terminal  the Autostar should echo an "A" or "P" depending upon whether it's
 set up as Alt/Az or Polar mount status and when typing #:GVF#  it should respond with its identification string, including the word Autostar and a time and date (when that firmware version
 was built at Meade) ".
Indeed  :
 Ctrl -F    ---> A
#:GVF#   ---> #Autostar|A|12Ea #