Page 3 of 4

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 11:12 am
by jhsa
I still think the attiny can do all that, with only one push button for arming/disarming , and with a smaller part count. :)

João

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 12:09 pm
by gohsthb
Yep one push button does arming and disarming. Led for status, and it can detect a low throttle pulse before allowing it to arm. Also detects pulse loss, and disables itself. Now I just need to test it. Should have something in a couple of days.
-Gohst

Sent from my LG-D801 using Tapatalk

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 12:30 pm
by Bill
That would spoil the fun of doing this. :)
Yes just like the fun I had at Heathrow airport when my car decided not to recognise my ignition key about two minutes after I last used it, yea that's the kind of fun I like!!! :lol: :roll: :cry:
Sadly the toggle switch if it is a single pole one will not give you any indication (in the form of a LED) as to if the system is armed. This can be sorted of course. :)
If the user can't see where the lever on the toggle is maybe just maybe they shouldn't actually be flying just a thought....
I still think the attiny can do all that, with only one push button for arming/disarming , and with a smaller part count. :)
A 4027 - Dual JK-Flipflop could do it with no programming!
Come to think of it a set of 4011 nand gates could probably do the whole thing.
Oops I meant 4001 Nor gates....
Bah humbug!

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 12:59 pm
by jhsa
Not with the other features gohst just mentioned above ;) :)

João

Sent from my GT-I9195 using Tapatalk

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 1:02 pm
by gohsthb
Well, it could be possible given enough gates. ;)

Sent from my LG-D801 using Tapatalk

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 1:15 pm
by Bill
Two gates for the flip flop and the other two on the package to pass the signal, give me a minute and I'll work it out.
Nor Solution.JPG
Sorry not a very good picture but you see the solution.
And yes it was on the back of an envelope..and there's meant to be a resistor to ground on the lower arm too :oops:
I don't know why I'm contributing to this nonsense a toggle switch I say....!!!! :)

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 1:16 pm
by MikeB
Back when I built my own (brushed) ESCs I had an arming procedure where I needed to go to full throttle and back to idle TWICE before the ESC would drive the motor. It also calibrated itself to the throttle at that time.
I had all sorts of things on them like you set the required motor voltage for full throttle, and it adjusted the output through the flight as the battery voltage dropped, so full power was always the same. It had low voltage cutoff, but if you pulled the throttle back to idle, it would then give you 15 seconds of power on time to land safely. You could use that 15 seconds in separate bursts if necessary. If the battery voltage dropped very fast, it cut the output, assuming the motor was stalled so a very high current was pulling the voltage down, a bit like an electronic fuse really.
It also had built in exponential response so at low throttle you got a faster voltage increase than at high throttle. This gave a more linear power response.
All this in a PIC16F84 with only 1K flash and not much RAM!

Mike.

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 2:21 pm
by Kilrah
Aah, the good times of PIC assembly :)
I really liked this instruction set. Super reduced but very efficient, had all you could need.

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 2:52 pm
by MikeB
Quite! For PICs I've now written my own C compiler! It produces an assembly file so I can check it produces 'good' code.

Mike.

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 4:35 pm
by Bill
Aah, the good times of PIC assembly :)
musik25.gif
musik25.gif (1.29 KiB) Viewed 13874 times

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 7:48 pm
by gohsthb
Mike, you may have a sickness. Maybe you should get that checked out. :)

Sent from my LG-D801 using Tapatalk

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 7:58 pm
by SkyNorth
If you Pic it , it will never heal :-)

Re: Esc power safety switch?

Posted: Tue Apr 29, 2014 8:26 pm
by jhsa
gohsthb wrote:Mike, you may have a sickness. Maybe you should get that checked out. :)

Sent from my LG-D801 using Tapatalk
Microcontrollitis :mrgreen:

Re: Esc power safety switch?

Posted: Fri May 02, 2014 12:31 am
by gohsthb
Ok João,
Here is the first version of my code. I wrote it for an attiny25. But a 45 or 85 should be able to load the same file.
Features:
- 1 button enables and disables the ESC
- LED lights when ESC is enabled
- Checks that throttle is low before arming the ESC
- automatically disables the ESC if Rx signal is lost

-Gohst

Re: Esc power safety switch?

Posted: Fri May 02, 2014 1:10 am
by jhsa
Thanks Gohst. will test it tomorrow. Quite late here now. Thanks for taking your time for something only I showed interest ;) Actually there is an attiny already on the bread board ;) 8-)
- automatically disables the ESC if Rx signal is lost
I find this point here a bit tricky as some receivers keep sending the last channel position and some others just send 1500us when signal is lost. Normally the ESCs also do the same. they turn the motor off if signal is lost.. But I guess there is no harm in having the feature there. Maybe some people will use it with some old FM receivers.
Thanks again.

João

P.S. - Gohst, what fuses values should I set? Thanks

Re: Esc power safety switch?

Posted: Sat May 03, 2014 9:28 am
by jhsa
Gohst, I trhink in JP2 and JP3 GND and +V are swapped? Positive should be on the center pin?

João

Re: Esc power safety switch?

Posted: Sat May 03, 2014 12:40 pm
by gohsthb
I was leaving those as places to connect the wires, so really doesn't matter. I can switch then though. The default fuse settings will be fine for the tiny.

Sent from my LG-D801 using Tapatalk

Re: Esc power safety switch?

Posted: Sat May 03, 2014 1:51 pm
by jhsa
Thanks a lot.. Testing later when all this dangerous people around me go to bed ;) :D

João

Re: Esc power safety switch?

Posted: Sat May 03, 2014 5:56 pm
by ShowMaster
I'm almost over this infection that sidelined me so I can play again. I've got just the guys to beta test your design ha ha. Great news is hot clear weather. Bad news is the antibiotics want me out of bright sun for the next 2 weeks. Even worse, my shop is in my garage even hotter daytime.
I see some late night building coming up.
If it's successful I'll be needing some programming help guys. I think I have the parts and some programmer that should work. I could never find a local that's good at this to buddy up with.
Thanks for giving it a try. I think it's worthwhile. Maybe a real product like Mikes 8xr A2 circuit.



Sent from my iPod touch using Tapatalk, small keys and a big finger.

Re: Esc power safety switch?

Posted: Mon May 05, 2014 12:22 pm
by jhsa
gohsthb wrote:Ok João,
Here is the first version of my code. I wrote it for an attiny25. But a 45 or 85 should be able to load the same file.
Features:
- 1 button enables and disables the ESC
- LED lights when ESC is enabled
- Checks that throttle is low before arming the ESC
- automatically disables the ESC if Rx signal is lost

-Gohst
Gohst, sorry I only now had time to build your circuit and test it..
At the moment I'm testing it with a servo. It is working. It arms ok, and if the stick is not down, it will flash telling you to bring the thr to idle.
When disarming I've noticed that if I don't have the stick at the bottom and press the button to disarm, the led goes off but the servo doesn't go to -100. It keeps the position.. I think it should go to -100?
I will put the scope on it, but when it is disarmed are you forcing it to -100 or do you just stop the pulses? Hmm I think I will find out in a minute :D

Also, are the 100K resistors really needed? sorry if it is a stupid question but maybe I don't understand why they are there :o

Thanks for your time.. maybe this saves some fingers ;)

João

Re: Esc power safety switch?

Posted: Mon May 05, 2014 1:17 pm
by jhsa
Just scoped it. Yep, no pulses before arming and no pulses after disarming. ;)
I guess most modern ESCs will stop the motor when no pulses, right?
Next will do a test with esc and motor.
Will also post some pictures later.

João

Sent from my GT-I9195 using Tapatalk

Re: Esc power safety switch?

Posted: Mon May 05, 2014 1:18 pm
by gohsthb
The circuit doesn't send pulses if disabled. Most escs should shut down if they get a signal loss. The 100k resistor on the rx side keeps the input from floating in case a receiver is not connected. The one on the esc side keeps the esc input from floating.
I could add the code that outputs a pulse=-100 if needed, but I didn't want the esc to arm before necessary.
-Gohst

Sent from my LG-D801 using Tapatalk

Re: Esc power safety switch?

Posted: Mon May 05, 2014 1:24 pm
by jhsa
Hmmm, how would it arm before necessary if you're sending -100?
Am I missing something?
Thanks for the explanation on the resistors..

Sent from my GT-I9195 using Tapatalk

Re: Esc power safety switch?

Posted: Mon May 05, 2014 1:29 pm
by Kilrah
Why not use the internal pullups?

Re: Esc power safety switch?

Posted: Mon May 05, 2014 2:27 pm
by MikeB
Because they are pull downs?

Mike.

Re: Esc power safety switch?

Posted: Mon May 05, 2014 2:48 pm
by Kilrah
But a pullup would work just as well :)

Re: Esc power safety switch?

Posted: Mon May 05, 2014 2:55 pm
by jhsa
What about a divider? middle?? :mrgreen: :mrgreen:

Re: Esc power safety switch?

Posted: Mon May 05, 2014 3:09 pm
by jhsa
OK, did some testing with a motor and a HK Super Simple 25A ESC. Here are a couple pics and a video of the test. I quite like the fact that the esc beeps when is not receiving pulses. I don't know if all other ESCs will do that..
João

[BBvideo 425,350]https://www.youtube.com/watch?v=7SndIeP ... e=youtu.be[/BBvideo]

Re: Esc power safety switch?

Posted: Mon May 05, 2014 7:31 pm
by gohsthb
The rx I tested idles at a low level, the pulses are at a high level. Also the external ones always work, regardless of the uC is working or not. Looks nice Joao

Sent from my LG-D801 using Tapatalk

Re: Esc power safety switch?

Posted: Mon May 05, 2014 7:37 pm
by ShowMaster
Look really good. I need make one.



Sent from my iPod touch using Tapatalk, small keys and a big finger.