1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Radio control by location

Discussion in 'Oshonsoft' started by camerart, Feb 6, 2018.

  1. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I play with Tricopters, which are a 3x propellor helicopters. I've enjoyed making them and learning to fly, but I don't find it easy, with eyes not like they used to be, I sometimes find I can't see which way round they are. If there's a risk of them flying away, I crash and repair them, which happens quite a lot, when they are high or a distance away.

    [I've seen the latest flying machines like the Mavic etc, which I find amazing]

    I thought I would try experimenting with sending height and location, instead of the usual RC transmitter method, which would allow me to fly in a more controlled way, and HOLD if nothing was sent.

    I hope to build ideas on how to do this here.

    Camerart.
     
  2. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,280
    Likes:
    555
    Location:
    Cleveland, OH, USA
    In the US, we are rapidly moving to 2 distinct categories of "drone," including fixed wing versions:

    1) Those flown by hobbyists for pleasure within visual range and control at ALL times; and
    2) Everything else, including commercial, military, and civilian (e.g., search and rescue) and maybe anything with FPV.

    It is a hot topic and regulations are evolving rapidly. Incidents, such as this drone hitting a military helicopter are driving that change:
    The outcome could have been much worse.

    Hobbyists like myself see no need to fly out of visual range, and consider FPV is just a gimmick that wears off or can be done without. RC models have been a part of my life for over 65 years. As a group, hobbyists like myself are very concerned that current regulatory exclusions will be eroded and even eliminated by reckless behavior of "lone wolves."

    The "everything else" will have increasingly stringent controls and costs. For example, annual licenses, inspections, mandatory flight plans, positive control, and pilot proficiency requirements are likely to happen or have already happened. Many individuals in government would be happy to see the hobbyist exemption disappear and incidents such as above don't help.

    The FAA has recently reinstated its requirement that every pilot must register and have that registration information in the drone. Fools, like the individual who hit the helicopter don't do that -- just like some fools drive without a valid driver's license. Unfortunately, drone hobbyists are a very small group compared to non-commercial drivers in the US. While it is unimaginable that the government would require all automobile drivers to follow commercial requirements. The same can't be said for drone flyers. Monetary fines won't help eliminate the trouble makers. The chance of being caught is slim, and when caught, the violator will plead poverty. Thus, there will probably be criminal penalties, but the most effective and probable outcome will be elimination of the hobbyist exemption. Unfortunately, the American Bill of Rights does not include flying drones.

    My advice: Don't fly out of visual range. Don't jeopardize a very rewarding past-time for others. Play with the electronics all you want, but always fly with a safety pilot when you might be distracted by some gadget on board the aircraft.
     
  3. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi J2,
    I quite understand your concerns, and I have the same ones.
    I don't intend to fly out of the legal UK rules, i,e, out of sight.
    My problem is, that unlike you I have only recently taken up RC flying, and while I can see a long way, I can't always tell which way round my Tricopter is, so I purposely crash it.
    The idea here is not to do anything different to normal RC, but to control the model in a different way.
    C.
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  5. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,730
    Likes:
    1,277
    Location:
    Cardiff, Wales
    Sounds like you want a 'return-to-base' function which can be invoked by you or automatically. Some hobby drones already have this.
     
  6. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,280
    Likes:
    555
    Location:
    Cleveland, OH, USA
    Off hand, I can imagine a GPS or solid state compass doing what you want. The GPS might be more complicated and less sensitive for the yaw (vertical) axis. Most compasses come with accelerometers in the same plastic IC, In most cases, you can ignore what you done't want. I have experience with the BMC156, MPU9250, and AK8963. The MPU9250 actually incorporates the AK8963 as I recall. It is the most complicated to deal with as it requires both SPI and I2C for the compass.

    My personal favorite was the AK8963. It was easy (SPI), sensitive (more than the BMC), and gave fast response. Response time is under user control as you control the number of readings being averaged. My code is Assembly and for an enhanced mid-range PIC (probably the 16F1829). I found its datasheet easier to understand than the BMC's too.

    I have attached a zipped file of the MP4. Not sure I can upload MP4 here. Hope it works.

    John (aka JP or J1 :) )

    EDIT: I had forgotten that I wrote a short review of those 3 chips:
     

    Attached Files:

    Last edited: Feb 6, 2018
  7. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi A,
    As mentioned I've seen what Mavic style drones are capable of, and I have such stuff which will return to home.

    I am talking about controlling the model by location, where the transmitter would send e,g, instead of THROTTLE being sent with PWM, then an ALT would be sent and the model would go to and stay at that height till it was changed.
    C
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  9. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi JP,
    I have just ordered some GY-282 HMC5983 compass modules, and will hopefully get them going back on the other thread first.
    On my models I use KK2 boards for control.
    I'll come back to this message later and look closer, thanks.
    C
     
  10. Musicmanager

    Musicmanager Active Member

    Joined:
    Dec 4, 2014
    Messages:
    651
    Likes:
    57
    Location:
    Birmingham, UK
    Hi Cam

    I've been toying with the idea of buying a drone for a while, greatly spurred on by the various 'offers' that appeared during the Xmas frenzy. Many of them seem to have a 'Do nothing and stay where you are' control and also a return to controller .. but, to my mind, lots of tech means lots to go wrong. I never did buy anything.

    This may be loopy but I recognise the eyesight problem only too well. If you were flying a full size aircraft you would have a red, green and white navigation light system to indicate to others your direction of travel from a distance.

    Would that be a relatively easy solution ?

    S
     
  11. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi M,
    There are many models to choose from. I've seen a Mavic in action and if you are ok to spend hundreds of £sss, I would buy one, they're fantastic.

    I have a 'T' of LEDs White at the front, red on the left and blue on the right. As sometimes it is necessary to make a muscle memory fast decision, I found I couldn't, so for the sake of safety etc, I choose to crash, which obviously isn't the best.

    With conventional PWM RC if the model has been 'told' to go forward away from me, and I can't see it properly, the situation can soon turn awkward, so I'm trying a different method, to suit me.
    C.
     
  12. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I received a comment regarding the accuracy of an air pressure controlled model.

    I tried a test using a PCB with 18lf4520 PIC and a BMP280 barometer module. I moved up and down to try to keep the READings from the output screen the same, and I had to lift and lower approx 2ft, which gives a first impression of accuracy.

    This was indoors, so I wonder what will happen when in windy etc conditions.

    For my purposes this accuracy is ok, but I would like it better. Perhaps as it develops, the accuracy can be tightened up a bit.
    C.
     
  13. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi C.
    Perhaps I am missing a point.
    If the Base station that you are holding has say a GPS NEO module, that will have the Base Altitude value.??
    Also why are you sending the Base Alt to a Remote point/station.?

    E
    NOTE:
    If you are doing the Trig maths in the PIC, using the GPS data as Degrees, remember that the String value has Degs and Minutes.
    So before converting to a final Single value the Minutes needs to be divided by 60.
    This is the way I do it for display on a 5110 LCD

    Define SINGLE_DECIMAL_PLACES = 6

    Dim strdec As String' String for minutes Decimal value
    Dim sinlat As Single
    Dim sinlong As Single
    Dim sinalt As Single
    Dim sindec As Single' Single for Minutes Decimal value

    ''font1 add this
    Case "\"
    SPISend 0x06
    SPISend 0x09
    SPISend 0x09
    SPISend 0x06
    SPISend 0x00

    call get_val

    msg1 = "T=" + strtim
    Call wr_msg(0, 0, msg1)

    msg1 = "N=" + #sinlat + "\" ' using fwd slash as Degree symbol, add it to the Font1 table
    Call wr_msg(0, 1, msg1)

    msg1 = "W=" + #sinlong + "\"
    Call wr_msg(0, 2, msg1)

    msg1 = "A=" + #sinalt + "M"
    Call wr_msg(0, 3, msg1)

    Hserout " T=", strtim, " N=", #sinlat, " W=", #sinlong, " A=", #sinalt, CrLf

    ...............
    get_val:
    Select Case csv
    Case 1
    Case 2
    strtim = LeftStr(msg1, 2) + ":" + MidStr(msg1, 3, 2) + ":" + MidStr(msg1, 5, 2) ' Time msg
    Case 3
    strlat = LeftStr(msg1, 2)
    sinlat = StrValS(strlat)
    strdec = MidStr(msg1, 3, 6)
    sindec = StrValS(strdec) / 60
    sinlat = sinlat + sindec
    Case 5
    strlong = LeftStr(msg1, 3)
    sinlong = StrValS(strlong)
    strdec = MidStr(msg1, 4, 7)
    sindec = StrValS(strdec) / 60
    sinlong = sinlong + sindec
    Case 12
    stralt = msg1
    sinalt = StrValS(stralt)

    Case Else
    EndSelect
    msg1 = ""
    Return
     
    Last edited: Feb 9, 2018
  14. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,
    Regarding the BASE ALT to DRONE question.
    I haven't thought it through, but it will be something like:
    The BASE and DRN ALT is set to GND, allowing for the GND PRESS to go '-' negative (Below GND) i,e, always a positive NBR.
    The BASE transmitter would send an ALT NUMBER 'say' 1Mtr above GND and the DRN would fly 1MTR above GND, until the PRESS changed. The difference at BASE would be added/subtracted from the NBR and re-sent keeping the DRN 1MTR above GND.
    NOTE: The DRN NMB would then be converted to PWM to feed to the control panel. I haven't thought this through)

    I'm not sure how GPS works out the direction, as I assume it needs to be moving. If there is a way of giving DIR while stationary, let me know.
    I have ordered some HMC5983 compass modules for DIR, which may be easier.
    Thanks for the calculation.
    C.
     
  15. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    Later I'll be trying to send LOCation DATA from one PIC to a second PIC. I will need to decode the DATA and convert it into most likely PWM or possibly PPM.

    Are there any experts out there to give tips please?
    C.
     
  16. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,615
    Likes:
    697
    Location:
    Derbyshire, UK
    Exactly what are you trying to do?, if it's transferring data between two PIC's those look to be about the most unsuitable ideas you could find?.
     
  17. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    It sounds like I haven't explained well enough.

    One component of the LOCation, ALT see #12, would be sent as DATA, between two DATA radios. The RX/PIC would then convert the ALT DATA into PWM to lift the model to the sent ALT.

    C.
     
  18. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,615
    Likes:
    697
    Location:
    Derbyshire, UK
    OK, so you didn't explain it very well - one PIC sends data over a radio link, the other receives the data and controls a motor (or motors).
     
  19. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    That's clearer.
    C
     
  20. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I've got some HC12 radio modules for TX/RX

    I've decided to use PWM, and I'm now looking into PIC timer control.
    I have some TMR0 and TMR1 example programs, but they are complicated, and I seem to recall that Oshonsoft has difficulties with it.

    Here is an image showing the PWM 20ms cycle with the 'up to 10 channel' 2ms examples. Will this work with one TIMER or does it need a TMR for the 2Ms plus a TMR for the 20Ms.

    [I modified a PPM image to make the attached PWM image, will someone double check that it is correct please?]

    C.
     

    Attached Files:

    • PWM.jpg
      PWM.jpg
      File size:
      64.8 KB
      Views:
      5
    Last edited: Feb 12, 2018
  21. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Last edited: Feb 16, 2018
  22. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,816
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I've found some 18F2431 PICs, that I can use before moving to the 18LF4431.
    I've been setting up the 18F2431 PICs and working through the D/S. These are for the RX DATA to PWM program.
    Does anyone have tips for their process of setting up PICs please?
    Here's where I've got so far:
    NOTE: POWER CONTROL PWM MODULE in D/S
    C.
     

    Attached Files:

    Last edited: Feb 16, 2018

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice