DIY controller project - electronics

I am definitely not winning that shiny WarBRD stick so I am left to build my own :smiley:

Pro Micro clones arrived ( it is some weeks already ).

Anyone pls has a good beginers guide how to start with the electronics ? I need to connect, as my first project, just one axis for the diy collective ( and maybe some grip ).
I know there was some pdf doc already created with some instructions. If anyone has link or is keen to provide some basic instructions here I will appreciate that oc :slight_smile:

If anyone wants to help me directly here pls let me know and I will post the details like what I want to connect to the Pro Micro etc.

thx

4 Likes

Tooting my own horn … check out this post: Mudspike Button Box v01

But! Skip down to the The Switches, Interfacing with the Teensy and MMJoy section.

Thx, that’s some great in-depth writeup.

In my case I aim for one axis plus connection of existing grip - 5 wires from the grip to base.
Will post later pic of the pinout for the grip.

For the axis it is easy I guess = 3.3V, axis, GND. I just hope it will have no prob with 5V board.

1 Like

So here is the orig board which I want to replace with the Pro Micro clone.

And here is the Pro Micro layout

So I guess for axis it is easy, simething like :
Orig PCB = PRO MICRO
3.3v = POWER
Zaxis = [F7]
Gnd = GROUND

Question is if there is some easy way to hook up this grip to Pro Micro. Connection desc of the grip on the right hand side of the orig board :
Orig PCB = PRO MICRO
Gnd = GROUND
3.3v = POWER
Latch = ???
Data = ???
Clock = ???
RZaxis = N/A ( twis grip axis )

I am not very advanced in my electrical knowledge. I have no idea about the power challenges re: 3.3v versus 5v.

we will soon find out :sunglasses:

If youare just trying to read an axis, you can pull the power form the 3.3V pin of the Pro Micro, the ground from (you guess it) ground pin and attach the axis line to one of the data thing-a-ma-jigs (I don’t know off hand what pin that is but I am sure @Troll will stroll by later as he can’t resist the smell of solder). Then, attaching the Pro Micro board via the USB cable should allow reporting on the axis position.

If this board is compatible with received an MMJoy firmware flash, then using the MMJoy firmware will allow this to be easily configured.

1 Like

I guess I will do just that with that Pro Micro clone. I will connect the axis and flash MMJoy firmware there and see what will happen :slight_smile:

Anybody else smell solder flux? I can swear I can smell some molten tin…

@Nevo, tell me more about what you want to accomplish? Sounds like you are replacing existing electronics with a ProMicro?
What kind of angular sensor is it and you mention a grip… Does this grip have shift registers?

1 Like

Yes, Cobra M5 pcb replacing with Pro Micro clone. Sensor is some kind of magnetic sensor :slight_smile:

All I can tell you about the grip is that it is connected via 5 wires to the orig pcb. As described on the orig pcb the pinout is :

Gnd
3.3v
Latch
Data
Clock
RZaxis

Thats all I know.

1 Like

So it looks like the original board has at least an “Xaxis,” “Yaxis,” and “Zaxis” on the top right of the PCB, which go into the main chip (IC1). From there, if my experience with electronics is correct, it seems that chip combines those and outputs the axis positions as a data stream to the “Latch,” “Data,” and “Clock” pins. From what I remember, you then have to have a program to read that data stream, witch “Clock” setting the timing for the stream, “Data” being the combined data from the three axis, and “Latch” I think has something to do with the beginning/end of a data packet.

That might mean more complications for actually getting those axis values out in a readable form. “RZaxis” seems to be separate, so you might be able to read that one directly. I’d have to do a deep dive to say anything more with any certainty.

Ok! The M5 uses 4021 shift registers and can be used with MMJoy2.
I’ll do some digging…

Sorry guys, I am assuming here that you know what I know :wink:
I mean that I assume that you are familiar with the Cobra M5 pcb and the mag res sensors. But the joystick is not that common so it could be not that clear I guess.

Later today I will post more pics describing the whole thing.

2 Likes

Here we go.

I will try to be much more clear now.

Here you can see Cobra M5 MAIN PCB with GRIP and X-AXIS ( MAG RES sensor PCB ) connected :

What I would like to do is to scrap the MAIN PCB and replace it with PRO MICRO PCB clone.
That means - I want to connect MAG RES PCB to PRO MICRO and connect GRIP to PRO MICRO.

Here is picture of Cobra M5 MAIN PCB from bottom side where you can see pinout descriptions :
[ upper left corner is USB pinout ]
[ top row from middle to right side are three axis - Z, Y, X pinout ]
[ right side is GRIP pinout ]

MAG RES connection :
As I mentioned earlier MAG RES PCB ( ANALOG AXIS ) has following pinout on MAIN PCB - 3.3v, Gnd, Axis ( as standard pot ). These three pins will be connected to PRO MICRO as follows - POWER, GROUND, AXIS INTERNAL ADC ( any ). Correct me if I am wrong pls.
( Pls see the PRO MICRO layout in my previous post )

GRIP connection :
As can be seen on the bottom part of MAIN PCB the GRIP has following pinout - Gnd, 3.3v, Latch, Data, Clock, RZaxis.

Now I think I can see the issue with the GRIP. It has three-position mode switch. This could complicate the connection to the PRO MICRO I guess. That’s why also ( probably ) the pinout says the strange words like LATCH, DATA, CLOCK.
So if anyone has any clue how to connect that GRIP to PRO MICRO, or if at all, that would be great, thx.

1 Like

The MAG RES PCB should be easy to hook up. I believe your wire connection list is correct, but I don’t have experience with the Pro Micro or MMJoy. Should be a simple potentiometer-like wiring though (Power, Ground, Signal).

The “Latch,” “Data,” and “Clock” seem to be related to a shift register. I would bet that there is another PCB up in the grip which collects all of the button states, and the three way switch you mention, and combines them into a single data flow. The benefit is that you can have a bucket load of switches and wires in the top of the grip, but you can transfer the information of which buttons are pressed with only three wires (instead of one wire for each button, plus on for ground). The downside is you need a way to read that data.

Unfortunately, I don’t know if the Pro Micro has that capability. Something like an Arduino board can decipher it, but you need a special library to do so.

1 Like

Consider this pic from the MMJoy2 Github:

VCC is Power
GND is Ground
Pin 15 [B1] SCK is Clock
Use for instance Pins 2 [D1] and 3 [D0] for Latch and Data. Latch is called CS in MMJoy2 and both these pins can be specified in the software.
You also need to specify that you’re using 4021 Shift Registers and how many. I think that handle has two, but you could open it and check.

1 Like

Thx guys for your inputs. Will post pic of the inside of the GRIP later today.

2 Likes

Hehehe involuntary pun!

2 Likes

GRIP pcb

3 Likes

And this is why you should listen to the guy who’s actually used these before! From this point on I think you’ll be able to help much better than I could.
:slight_smile:

My method at this point is usually to stare at it for a few minutes then start plugging things in and semi-randomly testing them until it works.

1 Like
© 2019 Mudspike.com | Articles Website | Forums Rules & FAQ