Let's Make Robots!

Shaving off a couple volts...

Chris the Carpenter's picture

I am in the process of wiring Walter. I have my RC receiver outputs going into a 28x but I have run out of input pins! I need to use 2 of the ADC inputs instead but the ADC's won't accept a pulsin command. Problem solved, I am using a spare 14m to do a little translating for me. The 14m will accept the last two pulsin commands and send them off to the ADC's on the 28x. Here's the deal, the two remaining channels (from the RC unit) are "bang-bang" channels --they are still servo commands but not variable, they are only centered (150), full left (225) or full right (75).

Question: I need the output of the 14m to spit out a total of 6 voltages, 3 each going into 2 of the ADC's of the 28x. This way, the adc can simply read hi, med, low. Any thoughts on how to get the 14m to spit out 3 different voltages?I am soldering my own board for this one so I have tons of room for extra componants.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
OddBot's picture
I haven't had a gold star in over 30years.
Chris the Carpenter's picture

It's the 4 channel 4k7 resistor bridge!! Stay with me here:

 

The 28x accepts (4) of the pulsin signals from my RC unit and sticks them into 4 variables.

The 14m accepts (2) 3-posistion pulsin signals from my RC unit

The 14m, through it's 4-output resistor bridge, sends one of 3 signals to (2) ADC channels on the 28x

The 28x ADC channels read: 0,146 and 255! --Perfect!

And to add to this, I am even sending these 6 variables onto my 40x using the serout/ serin commands! And it works!

 

Thanks everybody!! --Especially Oddbot --you're schematic was the prettiest. Gold star for you!

Chris the Carpenter's picture
...the geeks shall inherit the earth... Shoulda seen that one coming...
OddBot's picture
We stick all the rest in stadiums and sports facilities where they fight (compete) for our amusement!
Chris the Carpenter's picture
The geeks should be running this planet, you know?
GroG's picture

Didn't somebody say the geek shall inherit the earth?

rik's picture

As mentioned in Zanthess' blog on led arrays, a picaxe multipurpose pin can be programmed to assume any one three distinct states. I never did this before, but I came up with a one pin design for Chris' communication challenge.

tristate_comms1.png

The left pin is the Picaxe talking to the input pin on the Picaxe on the right. All we want the talking axe to do is:

  1. pretend to be an input
  2. go high
  3. go low

Here are the three equivalent circuits:

tristate_comms3.png

I chose pulling resistors of 22 kOhm. At 5 V supply, a sinking/sourcing MCU will draw/push 0.23 mA. The voltage divider will use up half as much. I do not know the rated "impedance" of a picaxe input pin, but I imagine it is much higher than 22 kOhm. High enough not to influence the balance in the divider.

I'd like my "esteamed peers" to review this idea and, if possible, verify this pin reduction BY FIFTY PERCENT!!!

8ik

robologist's picture
Looks like a good mod, should do just fine, but always check with a meter first.
OddBot's picture
Having that laser pointed at your head obviously didn't do any permanent damage. Yes you have just halved the number of pins required without increasing the component count or making the coding difficult while using a point I made earlier. Ummm... where's the warpdrive?