Author Topic: Questions about the 'Remote Control Robots Tutorial'  (Read 3632 times)

0 Members and 1 Guest are viewing this topic.

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Questions about the 'Remote Control Robots Tutorial'
« on: May 17, 2009, 02:43:45 AM »
Hello, i am planing on making a RC Robot that includes 'Teleoperation' capabilities as mentioned in this tutorial

http://www.societyofrobots.com/remote_control_robot.shtml

I am a bit stuck when it comes to connecting the RC receiver to a separate microcontroller. In the tutorial it just says to connect a 10k resistor and a 10uf capacitor to the signal from the Receiver in order to convert into and analog value readable by the microcontroller.

My questions are, has anyone actually done this and has it worked for you?

When asking one of my electronics teachers at school he reckons that it wouldn't work because of how the capacitor charges and discharges and that it would be too spikey.

I tested the schematic with the resistor and capacitor shown in the tutorial and my multimeter was giving me voltage values of between 0.14V and 0.24V but i think this just might be an average of lots of voltage spikes.


So does it actually work and has anyone else been able to do it?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #1 on: May 17, 2009, 03:13:46 AM »
the capacitor is to smooth the spikes that may occur...
heres an image originally posted by axisrobotics in another thread.

after that you probably could just read the port pin for a value and act accordingly...
Howdy

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #2 on: May 17, 2009, 03:27:42 AM »
I know what the picture looks like, i wanted to know if anyone else had done it or if it actually works.

the capacitor will still be going up and down in terms of charging and discharging. It won't just stay at one level.

Has anyone done it or could someone help me to get a workable output (voltage)?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #3 on: May 17, 2009, 03:57:35 AM »
I know what the picture looks like, i wanted to know if anyone else had done it or if it actually works.

the capacitor will still be going up and down in terms of charging and discharging. It won't just stay at one level.

Has anyone done it or could someone help me to get a workable output (voltage)?
Quote from: axisrobotics
I've used the 'convert PWM to analogue' technique before for one of my projects. Its less accurate, but for my application (RC switch), it good enough (and easy). I've attached a circuit diagram that will convert the PWM to analogue signal, if you are interested. Hope it helps.

PS: I found the circuit diagram sometime ago on the internet and saved it to my disk. I don't remember where I got it, but its definitely not mine.
the capacitor smooths the current by absorbing spikes and letting it out when needed.
it doesn't spike anything... i think there should be a tutorial somewhere for current smoothing caps to help give you an idea...
Howdy

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #4 on: May 17, 2009, 04:14:04 AM »
Where did you get the stuff about axisrobotics from?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #5 on: May 17, 2009, 04:19:13 AM »
http://www.societyofrobots.com/robotforum/index.php?topic=7879.0
two topics down ;D
it was a question from dellagd about something similar...
Howdy

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #6 on: May 17, 2009, 05:08:55 AM »
http://www.societyofrobots.com/robotforum/index.php?topic=7879.0
two topics down ;D
it was a question from dellagd about something similar...

The stuff about measuring the pwm sounds pretty good but i don't think i have the programming skills to do it unless someone helped me (*hint* *hint*).

Otherwise i'll have to convert into analog voltage signal. but i still want to know if anyone has done it! so please respond if you have.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #7 on: May 17, 2009, 05:13:47 AM »
i think it could be done relatively easily if you read the port and use an if command to say
"if high wait 15 milliseconds then measure again" and "if low set port 5b high"
but im not really into programming so i know little about it...
if you really want to investigate further you can probably post a new topic in software and get more answers there.
Howdy

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #8 on: May 17, 2009, 05:20:33 AM »
i think it could be done relatively easily if you read the port and use an if command to say
"if high wait 15 milliseconds then measure again" and "if low set port 5b high"
but im not really into programming so i know little about it...
if you really want to investigate further you can probably post a new topic in software and get more answers there.

that would probably be a good idea reposting if i were to go the programming way. but in the meantime i want to see if i can be done properly electronically as that is what i am hoping to specialise in.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #9 on: May 17, 2009, 05:25:07 AM »
for the electronics side of things you will most likely just need a basic mcu board.
its generally all programming that makes or breaks this kind of thing...
methinks this kind of thing would be easier to create in software than hardware.
Howdy

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #10 on: May 17, 2009, 05:37:26 AM »
what i meant was be able to have the mcu read easy analog values by doing something electronically first

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #11 on: May 17, 2009, 05:48:28 AM »
if you have something in your code that looks like "analogueread" the mcu will read a value and
submit a value back, say if i read a pin on my mcu and it was at 5v the mcu would return a value
based on that.

the electronics side is simple, set up a board with all the necessary parts to run code...
something similar to the arduino or $50 robot board would do fine for this...
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #12 on: May 17, 2009, 08:29:13 AM »
He wants to convert the signal to an analog voltage before it reaches the MCU.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #13 on: May 17, 2009, 02:46:04 PM »
could this not be done using the mcu's built in adc?
just hook the output up to an analogue input?
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #14 on: May 17, 2009, 02:56:51 PM »
There are no analog ports, but ports with ADC capability. All ports are digital  ;)

The little circuit in the tutorial that converts it to analog is really crappy and will not do a good job of converting the signal to analog, so he wants a circuit that can do it better.

For AVR microcontrollers, see "Input capture interrupt"
http://www.atmel.com/dyn/resources/prod_documents/doc2505.pdf
« Last Edit: May 17, 2009, 03:04:48 PM by Razor Concepts »

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #15 on: May 17, 2009, 08:27:30 PM »
if you have something in your code that looks like "analogueread" the mcu will read a value and
submit a value back, say if i read a pin on my mcu and it was at 5v the mcu would return a value
based on that.

the electronics side is simple, set up a board with all the necessary parts to run code...
something similar to the arduino or $50 robot board would do fine for this...


I know what i am doing. i wasn't asking about making a robot board. I was asking about the schematic shown in the tutorial.


He wants to convert the signal to an analog voltage before it reaches the MCU.

Correct


There are no analog ports, but ports with ADC capability. All ports are digital  ;)

The little circuit in the tutorial that converts it to analog is really crappy and will not do a good job of converting the signal to analog, so he wants a circuit that can do it better.

For AVR microcontrollers, see "Input capture interrupt"
http://www.atmel.com/dyn/resources/prod_documents/doc2505.pdf

Looks good thanks for that. I will give it a good read over when i have time.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #16 on: May 30, 2009, 07:48:18 AM »
Quote
I tested the schematic with the resistor and capacitor shown in the tutorial and my multimeter was giving me voltage values of between 0.14V and 0.24V but i think this just might be an average of lots of voltage spikes.
Yea that sounds about right. And it *does* work, I've done it myself.

When you hook it up to an ADC you'll see the value change, although the resolution is fairly poor. Use 10 bit ADC if you can.

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #17 on: June 01, 2009, 12:34:23 AM »
so is that a constant voltage or an average of lots of spikes? I will be hooking it up to my ATMAGA8 so it will be reading values between 0 ~ 255. the min value will be 7 (.14V) and max value will be 12 (.24V). will using an Op-amp boost both values to something a bit more workable? it would expand the difference between the min and max.

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #18 on: June 01, 2009, 03:58:05 AM »
atmega8's normal ADC is 10-bit, so you can get more precision. If you are using Admin's source files, to get 10 bit conversions use a2dConvert10bit()

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #19 on: June 01, 2009, 05:12:11 AM »
so is that a constant voltage or an average of lots of spikes?
Constant voltage. The capacitor smooths it out.

Offline MilesTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #20 on: June 01, 2009, 05:35:03 AM »
will using an op-amp work? To get a more workable voltage with a bigger gap/range between min and max

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Questions about the 'Remote Control Robots Tutorial'
« Reply #21 on: June 01, 2009, 05:49:38 AM »
yes, you can use an op-amp to boost the readings to a higher voltage.
Howdy

 


Get Your Ad Here

data_list