A DIY Radar Controller


#21

Is that the same as a resistor network? I’ve seen others use them… Will google.

I tried that on the bread board, but culdn’t get the Shift Reg to work properly.
Once I added resistors to all input pins, it worked. Maybe a thing with the MMJoy2 firmware, perhaps.


#22

A resistor array like this should work, right?

But, if I get a 1KOhm resistor array with 5 pins, does that mean 4x1K or 1K/4 resistance…?


#23

Should mean the first, you usually don’t need to do math on component selection, although I haven’t used them yet, it’s one of those lessons I’ve learned. Also don’t use those low value’s for pull resistors.

The bounce signals are usually sub milliamp in current and pretty much finds their origins in induction. So a 10k(standard suggested value) or 20k resistor will only have a small leak current going into your input data line. That’s mostly a current limiting thing though.


#24

Ah, yes, 10K…


#25

How do those work? 4x inputs, each through a 10k resister, to a single output?


#26

@TheAlmightySnark can probably explain the electronic magic going on…
I just follow the recipe and know that if I connect the shift register to 5 pins on the microcontroller, where two are power and ground, I get to link 8 button inputs to it.
That may not sound too impressive, but I can mount a bunch of shift registers in series, and still only need 5 pins on the controller. Say 4 shift registers. That is 4x8=32 buttons and just 5 leads, going to 5 pins. A lot easier than making a good oldfashioned button matrix, that would require 6+6 pins on the controller.

This gets really important when sending button inputs from a stick grip, or a throttle handle, to the controller, because of the limited space available.

I made my ConTrollR throttle box using a button matrix, and that PCB was 80x87mm and all I could fit inside the throttle handle was 3 buttons (6 leads).

This controller will have a 85x40 PCB inside the stick base that will take 16 button inputs and another two PCB of 23x30mm, inside the handle, that will take another 16.

The ConTrollR PCB


Note that the relative scale is off here.


#27

So those resistors are connected to the inputs on one side(leading to the chip, middle pins on either side are the input lines), and to the power line on the other side.

If you don’t know how it works, current likes to take the path of shortest resistance, in this case that’s straight from the buttons(that are connected to a positive power line with perhaps a resistor) to the chip’s input. BUT, the chip doesn’t always ‘read’ what’s on the pin. It has a gate on the other side that gets triggered(opens) by one of the 3 data lines coming from the Teensy. What this means is that there is a floating or uncontrolled voltage between the chip and the button. That’s bad, because of induction this voltage floats up and down and will likely cause false data when reading the chip. So what we do in electronics is apply a pull-up or a pull-down resistor.

A pull up resistor usually provides a small current to the line that runs between the chip and the button, so this line will always be HIGH(boolean logical TRUE). With a pull up layout you connect the other side of the button to the ground line, that means when you push down the button all current will drain from the line that the chip is reading and it will read LOW(FALSE), the current coming in through the pull up resistor is not high enough to change the reading, but it will always cause it to stabilize in a single state when you are not operating the button.

there’s a bunch of mechanical and inductive effects going on too, but that is not extremely relevant, just keep in mind that a mechanical action like a switch will have a small range where it creates a series of electrical HIGH and LOW states in a very short time when you either press it down or release it. This is called a bounce, and a pull up/pull down resistor is used to counteract this effect. In this case by potential(Voltage at point A exceeds point B, thus it flows from A to B with the difference between them).

A pull down resistor layout works the same, only then we don’t connect our resistors to a positive voltage line(source, V+, Vdd etc), but to a negative voltage line(GND, V-, Vcc/Vss, ground plane also). thus reversing the effect.

I hope this explains it a little, I always meander a little when it comes to topics like this!


#28

What @TheAlmightySnark said… And it works too! :wink:


#29

Size seems about right…


#30

So, for a 5 pin resistor array, it would be V+, Input A, Input B, Input C, Output to Chip?


#31

and Input D. And 4 inputs on the other side of the shift register. The resistors are just linked between the VCC and the input pins on the Shift register.

The Shift register is linked to VCC, GND, Clock, Chip Select and Data pins on the controller.


#32

You have one HUGE thumb…


#33

You don’t need to have a pull up or down resistor on every line, really depends on signal speed and noise expectations. But yes, that might be one way.

Funny thing, a pull up or down resistor acts much like a RL filter!

I suppose that’s mostly funny if you enjoy signals technology… :wink:


#34


#35


#36

The handle is ready for the printers!


#37

Wow! Looking cool! Interested to see how this goes on the 3D printer. Which are you using?


#38

I don’t have one. I use Shapeways.com.


#39

A trigger in the making…


#40

Nice! Make sure to buff it a little :wink: Or scotchbrite to hell, either works fine!