Using voltage to trigger an input pin

nickwoodrow

New Member
Hi all, hope you are are staying safe and being alert! I am hoping to make a robot, using a recently purchase remote control and receiver unit. The receiver has 3 channels and on testing reverses polarity giving I suppose 6 channels. (I guess they are usually driving simple DC motors) I note with the meter that the voltage out on each channel is equal to the voltage of the batteries used (4.5/6v)
My initial idea was to use the voltage to trigger relays that would trigger the input pins. (I want to drive Steppers and possibly some servos as well). Whilst thinking about it, I realised it might be OK to use the voltage output of the receiver unit to directly drive an input pin, thus negating the use of relays. This is my first time using remote control as a mean of control. My questions therefore are:

1.Can I use voltage to trigger an input (4.5/6v) or do I need to reduce the voltage into the input pins?
2.Am I to use the pins that have DAC or am I misunderstanding their role?
I have Picaxe 14 or 28 to use (m2)

Many thanks in advance.
 

hippy

Technical Support
Staff member
The receiver has 3 channels and on testing reverses polarity giving I suppose 6 channels. (I guess they are usually driving simple DC motors) I note with the meter that the voltage out on each channel is equal to the voltage of the batteries used (4.5/6v)
It would help if you could detail how many outputs there are and exactly what you mean by "reverses polarity".

If there are two outputs per motor which show 0V/6V one way, 6V/0V the other way, and 0V/0V or 6V/6V when stopped, you should be able to read those as digital inputs to a PICAXE purely by using current limiting resistors.
 

nickwoodrow

New Member
Thank for your reply. I tried to give all the information. It has 3 channels (outputs) than can reverse the positive and negative flow I (+/- -/+ 0/0 when off) I assume, that I thought was called reverse polarity? what should I have said (described it as) for further reference please? What is the maximum voltage that can be sent to digital pins? Thanks in advance.
 
Last edited:

lbenson

Senior Member
What is the maximum voltage that can be sent to digital pins?
The recommended download circuit (22K in series, 10K to 0V) is designed to safely allow connection with up to "RS232" levels--plus or minus around 15 volts, so this arrangement will allow safe connection to PICAXE pins except for pinC.3 on 08M2, 14M2, and maybe 20M2 (these pins do not have an internal diode--a diode must be fitted externally).

So you want to determine whether 3 signals are + (up to 6V) or - (0V)? On a 14M2 you should be able to use a series resistor of 22K (or less) to, say, pins C.0, C.1, and C.2, and then say, for example, IF pinC.0 = 1 THEN: HIGH B.1: else: LOW B.1: endif

If you have multiple power supplies (e.g., 5V and 6V), make sure the 0Vs are connected.
 
Last edited:

Eng460

Well-known member
Hi Nickwoodrow,

May I suggest that you are making a fundamental, but understandable, beginners error in measuring the output of your radio receiver with a voltmeter. Modern radio control equipment meaning equipment produced as recently as 1970, but also well before then, uses a string of pulses of variable length to control a proportional servo. Your multimeter is only averaging the result of these pulses, so not telling you very much about what is going on.

May I suggest that you read the very excellent descriptions in sections one, two and three of the Picaxe manuals, as these tell you in the detail you need to control servos, and you use the same idea to read the receiver, which after all is only controlling a directly connected servo by outputting the same signals as you will need from your Picaxe. Hint, use Pulsin to read the receiver output. You do need to scan all three manuals for any points of interest, as you will not find everything you need to know in any one place, remember they try to cover all possible applications, not just your specific project. Controlling stepper motors is more complex, but again not a simple matter of applying a dc voltage. Some information in the manuals will give you a start to understanding them, but I will leave it to others with more experience with them to help you more there.

Then you will be able to do everything you have mentioned so far with the basic commands, pulsin to read the receiver, servo and servopos to control the servo, and only when you reach the limits of these, will you possibly need to use pulseout to control the servo. It may not ever be necessary.

Some cautions, look at the receiver battery supply, if not compatible with Picaxe, use a separate supply for the Picaxe, and only connect the zero v and data line, and put the above recommended higher value resistor in the data line to protect your Picaxe and the receiver. Note carefully the advice in the manuals regarding a separate supply for the servo.

And one overall caution, I am talking about conventional radio control as sold for models of all kinds, and the servo you will be buying of whatever brand. If you are hacking one of those cheap minimal toys, which only use foreward and reverse on their outputs, then I don’t know whether they stick with the normal standards or not, but the real thing is so inexpensive these days, I suggest don’t waste your time, unless you are only trying to amuse yourself during lockdown with what you have at hand. Even then I would try a breadboard test and pulsin with the serial Terminal to explore what you are getting.

I don’t intend to sound harsh, so I apologise if I sound that way, but if you can tell us which radio system you are using, there are many here willing to help with all the assistance you need. Skimming those manuals for any points relevant to your project will short cut the process in the end.

Hoping this gets you up that first big step and well on the way to a fun project,

Eng460
 
Top