Plasma cannon control board

Discussion in 'Predator Props' started by pelletta, Aug 16, 2016.

  1. pelletta

    pelletta Hunter

    It's not a surprise that I'm working on this circuit board so I have decided to open a new thread.
    I have started 3 months ago because I wanted to add a feature to my wrist computer but this has become a nightmare. I thought it was easy but I was wrong.
    My goals were:
    • activate the cannon from the wrist computer - done;
    • manual activation with a button - done;
    • make a universal board, for normal cannon or for the "avp" version with the reload system (4 servos instead of 3) - done;
    • easy customization without connection to a computer, done;
    • power management for battery saving - done;
    • slot for a possible sound module - done;
    • have "movie accurate" movements - ouch!!!
    I have spent a lot of time and money to find a good sensor that detects the movements of the head.
    I have discovered that every affordable sensor has its limit. The most common is the yaw drift, there is no way to compensate it, here's a demonstration:



    As you can see it moves horizontally even if the head is stationary. This is not due to wrong programming but it's a common issue affecting this kind of sensors. Some people use a single accelerometer but the result is bad because an accelerometer can detect only the acceleration of a movement (with this data you can't get the angle for how much you are moving). To obtain those angles we are looking for, we need to add a gyroscope and a tons of math. But now comes a problem: the gyroscope will drift in the yaw angle if you don't add a magnetometer :mad: and of course the magnetometer must be calibrated. This means that it's sensible to the magnetic fields and it may return incorrect values without a good calibration on place. Of course, a magnet has the ability to fool the magnetometer and don't think to be safe if you haven't magnet... what do you think can happen if you make the calibration in New York and then you go in Colorado? I think that's the reason why people avoid to use the yaw angle because of this drift and they prefer to use the roll angle... it does not suffer for drifting but they have to tilt their head instead of turn it to the left or to the right. This is not very realistic, I know... predators are not human beings but this is an insane way to act.
    So, in conclusion, I have choosen to avoid the magnetometer and to reset the sensor position when the cannon is off. I've thought it can be a good compromise to have a more realistic movement of the cannon.
    However I'll continue to investigate to find a better solution, in the meantime let me know what do you think about it. Suggestions and, why not, insults are welcome ;)
    I hope you'll forgive my lessical errors
     
    Last edited: Aug 16, 2016
  2. LLlket

    LLlket Unblooded

    [Цитата="pelletta, должность: 315767, член: 6184"]это не сюрприз, что я работаю на этой плате, поэтому я решил открыть новую тему.
    Я начал 3 месяца назад, потому что я хотел добавить функцию, чтобы мой компьютер на запястье но это стало кошмаром. Я думал, что это было легко, но я ошибалась.
    Мои цели были:
    • активировать пушку от наручного компьютера - сделано;
    • ручная активация с кнопку - готово;
    • сделать универсальный совет, для нормальной пушкой или для "АВП" версия с перезагрузки системы (4 сервоприводов вместо 3) - сделано;
    • легкая настройка без подключения к компьютеру, сделал;
    • управление питанием для экономии заряда батареи - сделано;
    • слот для возможного звуковой модуль - сделано;
    • есть "кино точных" движений - ой!!!
    Я потратил много времени и денег, чтобы найти хороший датчик, который определяет движения головы.
    Я обнаружил, что каждый доступным датчик имеет свой предел. Наиболее распространенным является дрейф рыскания, нет никакого способа, чтобы компенсировать это, вот демонстрация:

    [СМИ=ютуб]OwI1pukneiU[/СМИ]

    Как вы можете видеть, он движется горизонтально, даже если голова находится в неподвижном состоянии. Это не из-за плохого программирования, но это общая проблема такого рода датчики. Некоторые люди используют один акселерометр, но результат плохой, потому что акселерометр может определить только ускорение движения (с помощью этих данных Вы не можете сделать угол для того, сколько вы двигаетесь). Получить эти углы мы ищем, нам нужно добавить гироскоп и т математика. Но теперь возникает проблема: гироскопа будет перемещаться в угол рыскания, если Вы не добавляете магнитометр :мад: и конечно магнитометр должен быть откалиброван. Это означает, что он чувствителен к магнитным полям и может возвращать неверные значения без калибровки на месте. Конечно, магнит обладает способностью дурак магнитометра и не думаю, что будет безопасным, если Вы не магнит... как думаете, что может произойти, если вы делаете калибровку в Нью-Йорке, а затем вы идете в Колорадо? Я думаю, что это причина, почему люди избегают использовать угол рыскания из-за этого дрейфа, и они предпочитают использовать угол крена... он не страдает для дрифта, но им приходится наклонять голову, вместо того, чтобы повернуть влево или вправо. Это не очень реально, я знаю... хищники не являются людьми, но это ненормальный способ действовать.
    Итак, в заключение, я выбрал, чтобы избежать магнитометр и сброса датчика положения, когда пушка не горит. Я думал, что это может быть хорошим компромиссом, чтобы иметь более реалистичные движения пушки.
    Однако я буду продолжать расследование, чтобы найти лучшее решение, в то же время, дайте мне знать, что вы думаете об этом. Предложения и, почему нет, оскорбления приветствуются ;)
    Надеюсь, вы простите мои ошибки lessical[/Цитата]

    what is the equipment used to do this?
     
  3. LLlket

    LLlket Unblooded

    what is the equipment used to do this?
     
  4. Vyrstolf

    Vyrstolf Blooded

    WHAT??? By the way your English is perfect I don't know why you feel the need to apologize for it all the time lol
     
    Shogun likes this.
  5. Isubomo

    Isubomo Hunter

    Holy Sh** Peletta, I know you want a movie accurate, real, perfect, working canon, but Yaw drift or not, this is more than perfect to me..the fact that you were able to do something like this..man..this.. This is so gooooood!!!

    Regarding the Yaw drift again, once it's activated, you're head will never be in a stationary position anyway. Unless you fall asleep in your suit, which is highly unlikely.. (y)(y)(y)
     
    bpatneaude likes this.
  6. predtrooper

    predtrooper Blooded

    How are you going to get around the fact that when you turn your whole body to a different direction it will assume that you have turned your head even if your head is still facing forward relative to your body
     
  7. pelletta

    pelletta Hunter

    predtrooper: good question. You are right, the sensor can't know if you are moving your head or your body, it simply detects that its position is changed. To avoid this I reset the sensor every time the cannon is activated so it will always start from the initial position on center, then it will point where the head is looking. It's a good help for this system to keep the cannon off when we're moving and activate it only when we have to hunt :)
    I've never seen a sniper aiming and walking at the same time, he will be an easy target.
    There is an alternative way, more realistic and without any error, but it would be expensive and not so easy to handle. It involves a camera or a webcam, a face recognition application and an embedded linux board. It's possible, I can make it and it would be very very cool, the cannon will point only faces taken by the camera and follow them even if they're moving. The main problems are: costs, batteries, time to write and test the software.

    This is the second prototype that I have created at home from scratch, there is a 8bit microcontroller and the sensor is a 6dof IMU.
    Tomorrow I will post some pictures of my work in progress
    .
    Thank you all for your replies
     
    Pred Haster likes this.
  8. predtrooper

    predtrooper Blooded

    Iv been thinking about this all day and been on lots of sites looking for solutions and all I can think of is having a separate sensor on the cannon base that when it detects motion it overides the helmet sensor
     
  9. pelletta

    pelletta Hunter

    I understand. At the moment I'm trying to solve the drift question and my mind is elsewhere.:)
    I think your solution could be possible. I don't know if you're using an IMU like mine (MPU6050), in my case I can add another one because it's connected on I2C bus and I can set an individual address for each one
     
  10. pelletta

    pelletta Hunter

    Wait a moment, it doesn't care if you add 2, or more sensors... they will have the same issue: they don't know if you're walking or not
     
    Shogun likes this.
  11. predtrooper

    predtrooper Blooded

    If the separate sensor is on your body and it detects motion then it tells the cannon not to move
     
  12. pelletta

    pelletta Hunter

    If the goal is to stop the cannon it's possible to use the roll angle without any other sensor. In my case I use pitch and yaw for the movements, so tilting the head to the left could stop the cannon and activate it again tilting it to the right. A simple button could do this job easier.
    It's a thought at 3 AM ;)
     
    predtrooper likes this.
  13. Gerardo

    Gerardo Unblooded

    I am amazed about this keep going!!!!
     
  14. pelletta

    pelletta Hunter

    Updates coming soon, very soon ;)
     
    Vyrstolf likes this.
  15. pelletta

    pelletta Hunter

    This is the third prototype I have built, I have to make more tests.
    I would like to show you how I make circuits board at home. Believe me, all steps require a lot of time and patience. A single error can waste everything.
    I don't know if this is the definitive circuit and sincerely I wish so ;)

     
    Shogun, Isubomo, Jmen and 2 others like this.
  16. Gerardo

    Gerardo Unblooded

    Wooow man you know tour stuff !!! Its a lot of work but i know it will payoff ...the satisfaction of making something out of a movie which this tech is alien tech...holly shit man you can maybe sell the the circuits to cosplayers and make some money :) ....after you've enjoyed it for while..
     
    Shogun likes this.
  17. pelletta

    pelletta Hunter

    Thank you Gerardo
     
  18. afedorniak

    afedorniak Blooded

    Will be interested how this turns out good luck man!
     
  19. Vyrstolf

    Vyrstolf Blooded

    Same deal as the bracer. When you start selling these I call dibs ☺
     
  20. Isubomo

    Isubomo Hunter

    wow..never thought you could do circuit boards on your own, shows how much of a noob I am >.<

    Awesome video man!
     
  21. harlock

    harlock Unblooded

    wow, It´s a great job, congratulations, I´m trying to make my own plasma cannon and this information is very helpful thanks for sharing.
     
  22. pelletta

    pelletta Hunter

    New circuit board, new sensor, new book of maths, new firmware...



    It was a nightmare to solve the yaw drift, I had to develop a custom procedure for the calibration of the sensor.
    Please tell me what do you think about it, I hope you like it
     
  23. LunaticNic

    LunaticNic Hunter

    Pelletta, YOU ARE AMAZING!!!!! PHENOMENAL WORK!!!
     
    pelletta likes this.
  24. OldPredVA

    OldPredVA Blooded

    I'm utterly speechless! Hard work pays off to those who persavier.
     
    pelletta likes this.
  25. pelletta

    pelletta Hunter

    Thank you all! This is still a work in progress, I'll post updates soon
     
    afedorniak and LunaticNic like this.

Share This Page