Jump to content
Sign in to follow this  
Terry

Help !

Recommended Posts

Hi all

I want to add a failsafe to a 9ch receiver project an I dont want to add 9 failsafes !

I need to produce a 9 ch string to supply the decoder section with but my PIC programe skills are a bit basic (no joke intended). I would like to adjust the pulse widths with 9 trimmer pots as its seems the simplest way, but I dont have 9 a/d pins on the PIC's. I could hold values in ram but Im not sure how to programe this, has anyone done anything like this ?

Terry

UK

Share this post


Link to post
Share on other sites

You could use 1 pot and a switch. Enter set mode by pressing the switch, adjust the position using the pot, and go to the next channel by pressing the switch again until you've stored all of them. It's better to hold the values in the EEPROM so they are kept when power is removed.

You'll have to use less hardware by doing like this.

Share this post


Link to post
Share on other sites

Thanks for your reply, when I said RAM I ment EEprom. The main problem with doing it the way you say is that its hard to just tweek the values. The other problem is I dont know how to do it. It seemed a simple task until I put it on paper then problems just popped out every time I had an idea.

This way is on the shortlist but Im holding out for a better one !

Terry

UK

Share this post


Link to post
Share on other sites

Okay.

its hard to just tweek the values

Hm.. You mean that you have to take off after every setting to see if it's correct?

Share this post


Link to post
Share on other sites

Err yes. Well its just nice to be able to tweek the positions after the flight if something had a slight drift for exsample. If you know a better way then tell me ?

Thanks Terry

Share this post


Link to post
Share on other sites
If you know a better way then tell me ?

How I would implement it: During setup, just hold the stick/switch positions the way you want them to be at the time of "failsafe. Then press a Save button on the PIC. Store the positions in E²Prom. No pots, no fuss, no mess. ;)

Storing data into the E²Prom area of a FLASH PIC chip is not too difficult. The Microchip web site, as well as others, have working sample code to do this. In addition, higher level compilers have built-in functions that take care of the dirty work for you.

Share this post


Link to post
Share on other sites
just hold the stick/switch positions the way you want them to be at the time of "failsafe

I think I would be missing a few hands to hold the 2 sticks at very precise positions while pushing the switch.. :wacko:

But I'm not sure I caught where you want your device to stand.. is it between the demodulator and the demux or outside the receiver?

Share this post


Link to post
Share on other sites
I think I would be missing a few hands to hold the 2 sticks at very precise positions while pushing the switch..
It could be set up so that two pushes are needed. Once for channels that control the left stick and twice for everything else. That way one hand is always free to hold a stick.

There are dozens of ways to skin this cat -- I like the methods that keep the parts count low. But, use what you are comfortable with.

Share this post


Link to post
Share on other sites

Hi

It will stand between the receiver (not an r/c unit) and the 4017 I am using to share the pulses out. If the pulses are duff then I want to replace the whole string of pulses before they get to the 4017. I like the idea of storing the positions in eeprom but I was hoping to store them in the positions of trimmer pots for now as my programming is not as good as you guys ! If the system works well then I would invest more time in the other way and make it all smaller.

Do any of you know how I can multiplex the inputs to the PIC in maybe a 3x3 format ?

Thanks again Terry

UK

Share this post


Link to post
Share on other sites

A CD4051 is a 1 x 8 Mux. That, along with a MCU with three digital outputs and two analog inputs, will offer a 9-channel A/D system. The part is easy to use and low cost.

Share this post


Link to post
Share on other sites

Thanks for that, it sounds like just what I need, I will look into it now.

Terry

UK

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×