View previous topic :: View next topic |
Author |
Message |
Jan_Huygh
Joined: 24 Nov 2005 Posts: 26 Location: VILVOORDE
|
Posted: Thu Dec 08, 2011 8:40 am Post subject: RC transmitter |
|
|
Hi,
I've posted a project "RC Transmitter" on AVR freaks ( www.avrfreaks.net ) and would welcome comments.
RC Transmitter is a BASCOM AVR program that reads the controls on the transmitter (steering stick, trims, buttons) on a transmitter and generates the Pulse Position Modulation (PPM) signal that you need to supply to a High Frequency (HF) Module.
Using such a HF module (that you can buy from Graupner/Jr or Jetti and many others) you can build an RC transmitter for 35, 40 MHz or 2.4 GHz without having to worry about the HF portion.
The documentation at the top of the code includes the description of the PPM signal and how to connect to a Graupner or Jetti HF module.
The code starts with a version planning documentation.
The ultimate goal is to come to a RC Transmitter code that outperforms the functionality of high-end commercial transmitters (for my specific use = RC speed boat racing).
At this point in time the code supports :
Read the speed and steering stick position.
Read the trim potentiometers and the sub-trim (for now fixed programmed into the code) value.
Read the values for the end points (extremes) for the steering and speed stick (for now fixed programmed into the code). This enables you to set the maximum left, right, full speed, full backward pulses that correspond to the extreme positions of the sticks.
Generate the PPM signal.
Soon I will add support for exponential curves on steer and speed.
Later on I will add :
Support to change the settings for: sub trim, end point, exponential "in the field" via a menu system on the transmitter.
Support for multiple models (the aim is 9 models) including a model name for up to 10 characters.
Support for a timer/lab counter with a 1/10 seconds precision.
At that point in time the transmitter will match the capabilities of high-end commercial transmitters.
Ultimately I will add support for executing a sequence of events by pushing a trigger button. Something like: reduce the speed gradually over the next 250 ms to 80% of maximum, after 200 ms change the steer to extreme left for 300 ms then go for maximum speed and straight forward steer. I hope that playing around with these settings would enable me to round the corners faster.
Jan Huygh |
|
Back to top |
|
|
PaulC
Joined: 09 Jan 2008 Posts: 122 Location: Ireland
|
Posted: Fri Dec 09, 2011 12:10 am Post subject: Look like an excellent project, i will follow this with grea |
|
|
Look like an excellent project, i will follow this with great interest..
i was thinking of a project with a camera in a motorised globe, transmitting wireless pictures to a monitor on the bank..
this would be used for fishing, so i could send this off in search for good locations, and to see feeding habits of the fish.. _________________ Bascom Avr 2.0.7.3
Works for me
|
|
Back to top |
|
|
Jan_Huygh
Joined: 24 Nov 2005 Posts: 26 Location: VILVOORDE
|
Posted: Sun Dec 11, 2011 8:29 am Post subject: |
|
|
I've posted V8.0.
We now have:
Read steer and speed stick
Read steer and speed trim
Read steer and speed subtrim
Read steer and speed end point adjustment
Generate PPM signal.
Next thing to implement is exponential curvers on steer and speed.
Jan Huygh |
|
Back to top |
|
|
Jan_Huygh
Joined: 24 Nov 2005 Posts: 26 Location: VILVOORDE
|
Posted: Sun Dec 18, 2011 2:30 pm Post subject: |
|
|
I've posted version 10_0
This adds support for exponential curves on Steer and Speed
So now we have
Reads a selector switch that selects what model is used (9 models supported) and prints the name on the LCD
Reads the battery voltage and displays it on the LCD.
Reads the potentiometer for the speed and the steering stick on the transmitter.
Reads the potentiometer for the speed-trim and the steering-trim on the transmitter.
Reads the EEPROM value for Sub-trim setting for steer and speed.
Reads the EEPROM value for values for steer maximum, steer minimum, speed maximum, speed minimuml. (Neutral = subtrim)
Reads the EEPROM value for Steer_reverse (yes or no) and Speed_reverse (yes or no) setting.
Reads the EEPROM value for values for steer and speed exponential.
Calculates the pulse lengths.
Generates the Pulse Position Modulation signal.
Next to implement is :
Menu system that enables the user to program into the EEPROM (for each of the 9 models supported) the values for
- Steer_normal_reverse, Steer_subtrim, Steer_high_max, Steer_low_max, Steer_exponential
- Speed_normal_reverse, Speed_subtrim, Speed_high_max, Speed_low_max, Speed_exponential
- Model_name (10 characters)
Jan Huygh |
|
Back to top |
|
|
PaulC
Joined: 09 Jan 2008 Posts: 122 Location: Ireland
|
Posted: Mon Dec 19, 2011 10:48 pm Post subject: This just gets better |
|
|
This just gets better
great project.
nice to see updates.
thank you for posting this.. _________________ Bascom Avr 2.0.7.3
Works for me
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Dec 21, 2011 9:43 pm Post subject: |
|
|
RC evolved a lot since i started with it (long time ago with 27 MHz). There is good progress. Hope you will later add some pictures too _________________ Mark |
|
Back to top |
|
|
Jan_Huygh
Joined: 24 Nov 2005 Posts: 26 Location: VILVOORDE
|
Posted: Fri Dec 23, 2011 5:39 pm Post subject: |
|
|
I can tell you dear Mark that it is highly motivating to see that you had a look at my project.
Thank you for your attention !
Writing the menu system is a bit more time consuming then I anticipated :
- Lost some time working out a decent debouncing approach and
- Got lost in my own code already... so I've now taken the time to add a lot of comments and
- It's just a lot of code to write
But I have now a working menu navigation system and all the settings for the Steer-channel BASICALLY work.
BASICALLY because I will still want to do some fine tuning on the End_Point adjustment.
It should not be so difficult to transfer the code to the Speed channel... and when that is working I'll post a new release. (so even before the model name can be changed) The next release could be in time to be a Christmas present !
OK, I will include a few pictures... but... since the transmitter is mounted in the case of a broken transmitter I had (I fell with it in the water, no joke!) the transmitter itself is not so interesting... but maybe people are interested to see my AVR-board and probably some like to see the HF modules.
Jan Huygh |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Fri Dec 23, 2011 11:38 pm Post subject: |
|
|
Jan_Huygh wrote: |
- Got lost in my own code already... so I've now taken the time to add a lot of comments and
- It's just a lot of code to write
Jan Huygh |
Know just how you feel the web-server code has got to 4500 lines without lots of comments not getting lost is almost impossible.
I think, at least to for me this blog section makes reading working (getting there) code much more educational as you get to see where you can go wrong as we have found, now others know why lots of comments is good!
Another great project thanks Jan! |
|
Back to top |
|
|
Jan_Huygh
Joined: 24 Nov 2005 Posts: 26 Location: VILVOORDE
|
Posted: Sat Dec 24, 2011 3:41 pm Post subject: |
|
|
Thanks for your attention and encouraging words too Paul !
I've just posted version 12_0
It now includes an (in my opinion) user friendly menu system the enables a user to program for Steer and Speed the settings for :
- Sub Trim
- End Point
- Exponential
- Normal/Reverse
Right on the transmitter
There is much more documentation in the code and I've also started to write a manual (first draft included).
I've not YET added pictures (one of my boys has "stolen" the flash card in my camera...I'll have to wait till they get back from Christmas shopping.
Next is expanding the menu system to enable the user to change the names for the 9 models.
Jan Huygh |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Sun Dec 25, 2011 1:34 am Post subject: |
|
|
"I've also started to write a manual"
Good idea!
So another item to add to my list for the web-server!
Regards Paul[/quote] |
|
Back to top |
|
|
Jan_Huygh
Joined: 24 Nov 2005 Posts: 26 Location: VILVOORDE
|
Posted: Mon Dec 26, 2011 4:59 pm Post subject: |
|
|
I've just posted V14_0
RC Transmitter now has support for changing the model name using the menu system.
The full list of functionalities is :
Reads the battery voltage and displays it on an LCD.
Reads a selector switch that selects what model is used (9 models supported)
Menu system that enables the user to program into the EEPROM (for each of the 9 models supported) the values for :
- Steer_normal_reverse, Steer_subtrim, Steer_high_max, Steer_low_max, Steer_exponential
- Speed_normal_reverse, Speed_subtrim, Speed_high_max, Speed_low_max, Speed_exponential
- Model_Name
Reads the potentiometer for the speed and the steering stick on the transmitter.
Reads the potentiometer for the speed-trim and the steering-trim on the transmitter.
Reads the EEPROM value for Sub-trim setting for steer and speed.
Reads the EEPROM value for values for steer maximum, steer minimum, speed maximum, speed minimuml. (Neutral = subtrim)
Reads the EEPROM value for Steer_reverse (yes or no) and Speed_reverse (yes or no) setting.
Reads the EEPROM value for values for steer and speed exponential.
Calculates the pulse lengths.
Generates the Pulse Position Modulation signal.
I will now start using this transmitter.
That probably means that I will do some bug fixes and minor functionality changes/enhancemenst. (So version 14_1 will probably come over the next weeks)
On the other hand since I will spend time working on the boats and testing the functionalities in real life on the water... it might take a long time before we see the Version 20_0 with a timer/lap-counter. About 2 months from now I would expect.
Jan Huygh |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Dec 29, 2011 12:28 am Post subject: |
|
|
your project progresses quick. Setting up a good menu system takes some effort. In the shared code section you will find a user written tool to create menu's.
I am looking forward to see some pictures. If possible, post a copy of your code in this forum as well.
Good luck with the boat tests. It seems we still have liquid water for some time in our region. _________________ Mark |
|
Back to top |
|
|
Genaro
Joined: 16 Sep 2011 Posts: 7 Location: Mexico,D.F.
|
Posted: Mon Jun 11, 2012 5:41 pm Post subject: |
|
|
Hola!! sigo esperando tu proyecto....saludos! |
|
Back to top |
|
|
Jan_Huygh
Joined: 24 Nov 2005 Posts: 26 Location: VILVOORDE
|
Posted: Thu Aug 02, 2012 9:13 am Post subject: |
|
|
I post here version 15 of my RC transmitter.
Bug fixes :
- While in previous versions "sometimes" it was difficult to get into the menu system... as far as I know it now works always
- The high end point was neglected (the low end point was used for both the low side and the high side) now when you leave the stick in the neutral position and you change the end point both sides will change, if the stick is on the low side only the low side will change and if the stick is on the high side only the high side will change.
New features/enhancements:
1) It now has support for 3 channels. (It was limited to two channels Steer and Speed before). You can still set for each channel: the sub trim, the low side and the high side end point, the exponential behavior and the Normal/Reverse setting. Also for channel 3
2) The model names can be 16 characters long. (used to be 10). It has support for 9 models (the code supports 20 models but the selection switch I use supports only 9 models).
3) The characters you can use for a model name are limited to 42 characters (it used to be the full ASCII set and in practice that turned out to be "not so practical"... scrolling trough the possible characters was annoying after a few characters.)
I have now been using (previous versions of) this code in my transmitter for about 6 months. It was using this code that I made it to Belgian champion in ECO START and ECO EXPERT... meaning you can trust this code works.
As usual any comments are very welcome !
Jan Huygh |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Aug 02, 2012 9:27 am Post subject: |
|
|
hi Champ, congratulations!
Good to see this project progressed to a full working and usable one.
Thanks for sharing the update. (and the pictures) _________________ Mark |
|
Back to top |
|
|
|