Jump to content

FreeJoy. OpenSource joystick controller on STM32


Recommended Posts

Posted
14 hours ago, Sokol1 said:

Thanks but unfortunately it's another piece of software to install. If I could add a macro within Freejoy I wouldn't need extra programmes. I ask because I do a lot of repetitive keystrokes in work and simply plugging in a board and having macros available immediately would be epic. I tried with Arduino but to change a button command involved a lot of connecting, changing and uploading plus having AHK installed.

  • 2 weeks later...
Posted (edited)

Hi Yury,

 

I’m currently building a controller thanks to your awesome work on FreeJoy. I’m in the process of adding an analog input, and read all the work you’ve been doing on smoothing out the signal and filtering out the noise, which seems to have been very effective. However I’d be using a multi-turn potentiometer and thus I’m still toying with the idea of added precision using the ADS1115. On the wiki, you wrote: “ADS1115 use slow I2C interface which means that adding each new sensor to the configuration increases the processing time of all signals therefore it is necessary to use ADS1115 carefully.” 

 

I was wondering what you meant by that. According to the datasheet, page 8 section 7.6 the ADS can communicate on the I2C bus at up to 3.4MHz. Furthermore, on page 28 section 9.6.3 table 8 it is shown that the ADS can sample the analog signal 860 times a second (up from the 128 SPS by default), with the continuous-conversion mode (off by default) ensuring that the data isn’t sent by batches but as it’s processed by the ADS (described on page 14 section 9.1). So is it slow compared to direct connection even with these settings enabled? Maybe they aren’t enabled due to limitations on the microcontroller? Would you then recommend a direct connection in spite of those settings, if cable length isn’t an issue, and foregoing the added precision for added speed? Even if there would only be one analog input and nothing else on the I2C bus?

 

Also, would you be willing to share the blue pill ADC clock and sampling rates in v1.7.0?

 

Thank you for your work, your time and hope you’re doing well.

 

Louis

Edited by fairytalq
Added precision, grammar
Posted
18.03.2021 в 09:32, fairytalq сказал:

So is it slow compared to direct connection even with these settings enabled?

Hi,

it is slow because we use 400kHz frequency for compatibility between different I2C devices. This may be changed in the future.
Also it was slow because until 1.7.0 we couldn't use DMA for I2C (SPI and I2C periphery conflict). Now we can and it gonna be a bit faster so wiki is a bit outdated
ADS1115 also takes some time to multiplex channels and program's logic now is to scan all the channels, no matter how many of them are used.

I could optimize all these moment but it would make my code like tons of if-else operators in different places and that would increase the chance of mistake.

 

18.03.2021 в 09:32, fairytalq сказал:

Also, would you be willing to share the blue pill ADC clock and sampling rates in v1.7.0?

In 1.7.0 bluepill's ADC output rate is 500Hz. Every 2ms it takes 8 samples and outputs its mean value

Posted

I understand the desire to reduce complexity to reduce the likelihood of mistakes. Thank you for the detailed answer!

  • 1 month later...
47R_Snagov
Posted
On 2/24/2021 at 4:33 PM, zeze1982 said:

hello guys, i need some tips, i have been able to flash the stm board succesfully, but when i disconnect the st link programmer and connect the board to the pc with the micro usb cable, the pc does not recognize the board, any advice will be very appreciated.

Same problem. I have changed the usb cable with the same result. does anyone know the reason?

Posted (edited)

I was/am using a STM32 as a controller for buttons and throttle levers etc. Eveything was fine until my Warthog stopped working.

I got a second STM32 and made a joystick setup but then both STM32 have the same VID/PID but different serials. The Freejoy instructions suggest using a different PID for each STM32 so I flashed the boards with different USB names and PID's ( from the Advanced Settings tab).

However, if I make changes to control configuration after flashing in FreeJoy Configurator v1.6.2b3 and write to device the board loses the previously flashed USB name and PID. ( I can check in windows device configurations and see the old VID/VID for the STM32). That is, the flashed configuration works fine until I make another "write to device" for any reason in Configurator 1.6.2b3.

Question
1. Doesn't the same PID in both STM32's cause a conflict or does the PC identify the boards by the different serials? ( I noticed when both boards had the same VID/PID the game couldn't/didn't identify the different control settings from the different STM boards in the IL2 settings tab even though they had different serials.)

2. How can I get distinct VID/PID's for each STM32? ( I read that it's probably not possible, too expensive and not worth the while)

3. Should I make all configurations ( buttons etc.) , save in a cfg file, then flash the new USB name and PID and finally load the configuration cfg file again? Would that solve the identical VID/PID for the two STM32's?  Meaning that everytime I alter a configuration, like a button etc, I'll have to reflash the STM32 from the Configurator Advanced Settings tab.
 
As a solution I got an Arduino Leonardo that I intendo to use for my buttons and throttles ( substituting one of the STM32's ) with MMjoy2 configuration and use the homemade joystick with the second STM32 ( which works fine ) whereby I avoid the duplicated VID/PID of the STM's though the FreeJoy Wiki says that it is possible to use more than one STM32 on the same PC Usnig the Advanced Settings tab in the Configurator.

Or am I missing something?

Edited by J2_raker
WG_Magners
Posted (edited)
08.05.2021 в 14:17, 47R_Snagov сказал:

Same problem. I have changed the usb cable with the same result. does anyone know the reason?

If you flashed the software without mistakes (flashing .bin file instead of .hex or flashing bootloader instead of fw) then it gonna be some kind of hardware issue. 

It can be wrong R10 value (should be 1.5k) or fake STM32 chip

08.05.2021 в 16:02, J2_raker сказал:

I was/am using a STM32 as a controller for buttons and throttle levers etc. Eveything was fine until my Warthog stopped working.

I got a second STM32 and made a joystick setup but then both STM32 have the same VID/PID but different serials. The Freejoy instructions suggest using a different PID for each STM32 so I flashed the boards with different USB names and PID's ( from the Advanced Settings tab).

However, if I make changes to control configuration after flashing in FreeJoy Configurator v1.6.2b3 and write to device the board loses the previously flashed USB name and PID. ( I can check in windows device configurations and see the old VID/VID for the STM32). That is, the flashed configuration works fine until I make another "write to device" for any reason in Configurator 1.6.2b3.

Question
1. Doesn't the same PID in both STM32's cause a conflict or does the PC identify the boards by the different serials? ( I noticed when both boards had the same VID/PID the game couldn't/didn't identify the different control settings from the different STM boards in the IL2 settings tab even though they had different serials.)

2. How can I get distinct VID/PID's for each STM32? ( I read that it's probably not possible, too expensive and not worth the while)

3. Should I make all configurations ( buttons etc.) , save in a cfg file, then flash the new USB name and PID and finally load the configuration cfg file again? Would that solve the identical VID/PID for the two STM32's?  Meaning that everytime I alter a configuration, like a button etc, I'll have to reflash the STM32 from the Configurator Advanced Settings tab.
 
As a solution I got an Arduino Leonardo that I intendo to use for my buttons and throttles ( substituting one of the STM32's ) with MMjoy2 configuration and use the homemade joystick with the second STM32 ( which works fine ) whereby I avoid the duplicated VID/PID of the STM's though the FreeJoy Wiki says that it is possible to use more than one STM32 on the same PC Usnig the Advanced Settings tab in the Configurator.

Or am I missing something?

 

First of all I'd suggest you to use version 1.7.0 with Qt version of configurator. Qt and old configurator have different conf file format so you will need to create your configuration again for new utility or use qt conf version 1.6 for reading config back.

I use 2 freejoy devices at the same time (joystick and rudder pedals) every time I play IL2 so it is confirmed it can work in such way

 

1. If both stm32 have same config it is possible to have same VID/PID for them without problems. They still have different serials. But if you have different configs you must set different VID/PID because operational system can identify only 1 configuration per VID/PID pair.

 

2. Any reasons you need to get it?

 

3. VID/PID setting is stored in same structure with other settings (axis, buttons, etc). So when you flash config into the board it also flash PID from adv settings tab. Any chance you are writing "default" PID after editing config? Reading config back before editing could solve this problem.

 

Edited by WG_Magners
47R_Snagov
Posted
On 5/10/2021 at 1:59 PM, WG_Magners said:

If you flashed the software without mistakes (flashing .bin file instead of .hex or flashing bootloader instead of fw) then it gonna be some kind of hardware issue. 

It can be wrong R10 value (should be 1.5k) or fake STM32 chip

 

 

 

 Maybe a fake STM32, I will try with another board.

Posted (edited)

Hi Yury,

 

I've been trying to tinker with analog axes to no avail. On 1.7.0b3 I can't seem to be able to select all 5 modes of combined axes that are in the wiki. But I don't think that would suit my purpose anyway. I'm trying to have two physical analog input into one logical axes, with the logical axes showing only the highest value analog input. This is a feature that was in OpenSimHardware's Pedal & Button Controller project. He described it like that:

Quote

each on his own — каждый их входов работает независимо, но на одну и ту же ось. Входы при этом можно откалибровать по-разному и использовать в различных ситуациях.

Is there something I'm missing or is it not possible? If so, could it be implemented or should I work out some hardware solution?

 

Thank you for your time.

 

Louis

 

edit 1: I went to GitHub and as far as I understand master/application/Src/analog.c is the applicable file? It seems like there are indeed only 3 modes, that the wiki isn't accurate.

 

edit 2: Could it be as simple as that?

 

FreeJoy/blob/master/application/Src/analog.c

case FUNCTION_INDEPENDANT:
	if (tmp[i] < tmp[p_dev_config->axis_config[i].source_secondary])
	{
	tmp[i] = tmp[p_dev_config->axis_config[i].source_secondary];
	}
	break;

 

Or, to make it work with a centered axis:

case FUNCTION_INDEPENDANT:
	if (p_dev_config->axis_config[i].is_centered)
	{
		if (tmp[i] > AXIS_CENTER_VALUE && tmp[i] < tmp[p_dev_config->axis_config[i].source_secondary])
		{
			tmp[i] = tmp[p_dev_config->axis_config[i].source_secondary];
		}
		else if (tmp[i] < AXIS_CENTER_VALUE && tmp[i] > tmp[p_dev_config->axis_config[i].source_secondary])
		{
			tmp[i] = tmp[p_dev_config->axis_config[i].source_secondary];
		}							
	}
	else
		if (tmp[i] < tmp[p_dev_config->axis_config[i].source_secondary])
		{
		tmp[i] = tmp[p_dev_config->axis_config[i].source_secondary];
		}
	break;

 

FreeJoyConfiguratorQt/blob/master/src/common_types.h

enum
{
	NO_FUNCTION = 0,
	FUNCTION_PLUS,
	FUNCTION_MINUS,
	FUNCTION_EQUAL,
	FUNCTION_INDEPENDANT,
};

 

FreeJoyConfiguratorQt/blob/master/src/widgets/axesextended.h

const QVector <deviceEnum_guiName_t> m_functionList =      // static?
{{
	{NO_FUNCTION,            tr("None")},
	{FUNCTION_PLUS,          tr("Plus")},
	{FUNCTION_MINUS,         tr("Minus")},
	{FUNCTION_EQUAL,         tr("Equal")},
	{FUNCTION_INDEPENDANT,   tr("Independant")},
}};

 

I would compile it and try but have never done so on Windows and wouldn't know where to start.

Edited by fairytalq
WG_Magners
Posted
17 часов назад, fairytalq сказал:

edit 2: Could it be as simple as that?

Unfortunately it is not so simple as you want. You can add the feature into the code but it gonna break backwards compatibility because we have only 2 bits to store axis function data in configuration structure. Look at common_types.h file, .fuction field of axis_config_t should be extended to 3 bits width to add one more fuction

Posted (edited)

Oh well… Thanks for the answer. If it’s going to stay for my personal use only I might as well simply remove Minus and plug Independent in instead, that way I won’t have to mess with the configurator. Any tip for compiling the STM code? I guess the official STM32Cube products should be enough. I used the CubeProgrammer to flash FreeJoy in the first place, instead of the method described in the wiki, and it went flawlessly.

Edited by fairytalq
WG_Magners
Posted
5 часов назад, fairytalq сказал:

Oh well… Thanks for the answer. If it’s going to stay for my personal use only I might as well simply remove Minus and plug Independent in instead, that way I won’t have to mess with the configurator. Any tip for compiling the STM code? I guess the official STM32Cube products should be enough. I used the CubeProgrammer to flash FreeJoy in the first place, instead of the method described in the wiki, and it went flawlessly.

You can build with arm-gcc toolchain:

https://www.github.com/FreeJoy-Team/FreeJoy/tree/master/armgcc%2Freadme.txt

Posted
2 hours ago, WG_Magners said:

 

Thanks for the tip, didn't see that file.

 

For anyone curious: I installed gcc-arm-embedded with homebrew, then simply navigated to .../FreeJoy-master/armgcc, sent make all, and everything worked flawlessly. My "patch" works well too, simply replacing one of the built-in function without altering its name nor anything else.

  • Like 1
  • 4 months later...
Posted
On 3/21/2021 at 8:50 PM, WG_Magners said:

...it is slow because we use 400kHz frequency for compatibility between different I2C devices. This may be changed in the future.
Also it was slow because until 1.7.0 we couldn't use DMA for I2C (SPI and I2C periphery conflict). Now we can and it gonna be a bit faster so wiki is a bit outdated

 

 

@WG_Magners

do we have an (even theoretical) estimation what is the latency when all 8 axes are on SPI?  When 4 axes?  One axis?  

 

 

Posted
01.10.2021 в 16:49, wju сказал:

 

@WG_Magners

do we have an (even theoretical) estimation what is the latency when all 8 axes are on SPI?  When 4 axes?  One axis?  

 

 

Latency is the same for each case and equal 2ms

  • Like 1
Posted
4 hours ago, WG_Magners said:

Latency is the same for each case and equal 2ms

that is a very good news!

  • 4 weeks later...
  • 3 months later...
Posted

I've only recently discovered this software and I'm very impressed.  Thank you @WG_Magners.

 

I do have one question regarding wiring CD4021s.  On the wiki, the illustration with 74HC165s doesn't show serial input on the first register.  Will the CD4021s work without serial input?  Or do I wire it to shiftreg data?

Posted
17.02.2022 в 05:22, Biggus сказал:

I've only recently discovered this software and I'm very impressed.  Thank you @WG_Magners.

 

I do have one question regarding wiring CD4021s.  On the wiki, the illustration with 74HC165s doesn't show serial input on the first register.  Will the CD4021s work without serial input?  Or do I wire it to shiftreg data?

Both 74HC165 and CD4021 first (actually the last in the chain from the controller) register's serial input may be left open or tied to gnd or vcc.

It is not used and dont care if you specified correct number of used registers

  • Like 1
  • 3 months later...
Posted

Anyome having issues connecting Shiftregisters with Freejoy version 1.7.1 3b ?

I like freejoy because its easy to implement up till v. 1.7.0 now i cant get my shiftregisters connected . The buttons are not working. 

 

  • 2 months later...
Posted (edited)

Thanks for making and sharing this! Haven't done much yet but after reading thru the FreeJoyWiki it sounds like a awesome project and to read you also have Linux support with a nice looking GUI is just icing on the cake. Really like you opted for an AppImage instead of  snap/flatpack since AppImage is best IMHO - well done!

 

Will try to flash it later today and play around, thanks again to everyone involved...

 

 

 

 

Edited by KeyCat
Posted
On 6/15/2022 at 12:31 AM, Clyber said:

Anyome having issues connecting Shiftregisters with Freejoy version 1.7.1 3b ?

I like freejoy because its easy to implement up till v. 1.7.0 now i cant get my shiftregisters connected . The buttons are not working. 

 

 

After all reading late last night I do remember there was some recent changes mentioned for clock source for the shift registers.

 

IIRC now instead of using the a common SPI SCK for all you have to add one separate clock pin for each shift register chain. I can see the name is ShiftReg CLK in the pin config tab. Maybe something to double check and see if you missed it....

 

  • 6 months later...
Posted

Hi all.
I'm trying to connect the AS5600 sensor in "analog" mode, but there is an incomprehensible problem.
The sensor output is always 0 volts ... legs 1 and 2 are "short-circuited", leg 8 is on the "ground".
what could be the problem?
photo sensor.

 

Всем привет.
Пытаюсь подключить датчик AS5600 в "аналоговом" режиме, но есть непонятная проблема.
На выходе датчика всегда 0 вольт... ножки 1 и 2 "закоротил", ножка 8 на "земле".
в чем может быть проблема?
Датчик на фото.

IMG_4690.jpg

In the "digit" the sensor works ...

В "цифре" датчик работает...

Posted
18.03.2023 в 23:47, GVL224 сказал:

Hi all.
I'm trying to connect the AS5600 sensor in "analog" mode, but there is an incomprehensible problem.
The sensor output is always 0 volts ... legs 1 and 2 are "short-circuited", leg 8 is on the "ground".
what could be the problem?
photo sensor.

 

Всем привет.
Пытаюсь подключить датчик AS5600 в "аналоговом" режиме, но есть непонятная проблема.
На выходе датчика всегда 0 вольт... ножки 1 и 2 "закоротил", ножка 8 на "земле".
в чем может быть проблема?
Датчик на фото.

IMG_4690.jpg

In the "digit" the sensor works ...

В "цифре" датчик работает...

 

Is it supplied by 3.3V or 5V?

Although the module pin is called 5V it needs to be connected to 3.3V supply from microcontroller board. Also shorting 1 and 2 pins is the datasheet circuit for 3.3V supply:

Screenshot_20230321-200143.thumb.png.b48e43d3fee48b88ce22921816a8ff08.png

Posted
1 час назад, WG_Magners сказал:

Is it supplied by 3.3V or 5V?

Although the module pin is called 5V it needs to be connected to 3.3V supply from microcontroller board. Also shorting 1 and 2 pins is the datasheet circuit for 3.3V supply:

Yes, it is powered by 3.3V from the controller.

Legs 1 and 2 are connected.
As advised on another forum, soldered out resistors, didn't help.
Sometimes when I move the magnet near the sensor board the signal at the sensor output appears for a short time...

Posted
1 час назад, GVL224 сказал:

Yes, it is powered by 3.3V from the controller.

Legs 1 and 2 are connected.
As advised on another forum, soldered out resistors, didn't help.
Sometimes when I move the magnet near the sensor board the signal at the sensor output appears for a short time...

That's weird because digital mode is ok. I've surfed a bit over datasheet and I've could not find any reasons of such malfunction.

I was able to find such sensor board as at the picture above in my collection and I could try it in analog mode this week

Posted
21.03.2023 в 21:49, WG_Magners сказал:

That's weird because digital mode is ok. I've surfed a bit over datasheet and I've could not find any reasons of such malfunction.

I was able to find such sensor board as at the picture above in my collection and I could try it in analog mode this week

I also could not understand the reason why the sensor does not work in analog mode.
I ordered new ones on a square board.
I'll see how it goes with them.

Posted (edited)
23.03.2023 в 16:08, GVL224 сказал:

I also could not understand the reason why the sensor does not work in analog mode.
I ordered new ones on a square board.
I'll see how it goes with them.

I have tested this board and found out that it is working in PWM mode by default. I think it is preprogrammed on the factory

image.thumb.png.03059b406aca721e71b0a417fba741a0.png

 

Now you have 2 options to use this sensor in analog mode:
1) to program it back to analog mode and burn settings (i hope there are some attempts left)
2) to add RC filter circuit to PWM output to convert PWM to DC signal by hardware

Edited by WG_Magners
Posted
2 часа назад, WG_Magners сказал:

I have tested this board and found out that it is working in PWM mode by default. I think it is preprogrammed on the factory

image.thumb.png.03059b406aca721e71b0a417fba741a0.png

 

Now you have 2 options to use this sensor in analog mode:
1) to program it back to analog mode and burn settings (i hope there are some attempts left)
2) to add RC filter circuit to PWM output to convert PWM to DC signal by hardware

I have already ordered new sensors on a square board like in your instructions. I hope everything works out with them :)

  • Like 1
Posted (edited)

Thanks for a great Application! 

 

I just started to fiddle with FreeJoy with a bread board to check things out before I make a pcb specifically for FreeJoy. I haven't figured out how I use the LED option. For test I've just connected a tactile button and a LED on a bread board (eventually a matrix) but how do I combine them? I read about logic buttons on the Wiki and see them in FJ, but I'm totally lost and would like to have more info on this.

 

Also wondering about RGB LED. Are these for Axis/Sliders only or can I hook up a RGB LED to a SPDT on-off-on and get the LED to light Green or Red depending the position of the switch? If so, how do I do that?

Edited by Stout
Posted
30.03.2023 в 21:07, Stout сказал:

Thanks for a great Application! 

 

I just started to fiddle with FreeJoy with a bread board to check things out before I make a pcb specifically for FreeJoy. I haven't figured out how I use the LED option. For test I've just connected a tactile button and a LED on a bread board (eventually a matrix) but how do I combine them? I read about logic buttons on the Wiki and see them in FJ, but I'm totally lost and would like to have more info on this.

 

Also wondering about RGB LED. Are these for Axis/Sliders only or can I hook up a RGB LED to a SPDT on-off-on and get the LED to light Green or Red depending the position of the switch? If so, how do I do that?

Hi,

Logical button is an object which can be reflected in your system as button. It has a source (physical button, axis via axis2button feature, encoder, etc) and some available modificators applied to source signal (invertion, toggling, latching, etc).

Logical button can be set to be visible over USB or not, so some logical buttons can be used for internal needs like LEDs sourcing.

Also each physical button can be a source for several logical buttons and those logical buttons can have different modificators. So you can set for example one LED to be enabled by logical button which is directly sourced from ON/OFF switch and the other LED to be enabled by other logical button which is sourced by same physical button but with inversion modificator.

RGB now is only supported as PWM controlled 3in1 LEDs, you can control each of R, G and B channel intensity by axis which changes PWM duty cycle.

  • Like 1
Posted

Thank you so much for a well explained answer. I think I have to read it a couple of times to let it sink in. :) 

Posted

Hello.

I'm having some poltergeist with the AS5600 sensor connected as an analogue sensor and from another manufacturer (square shaped as in your instructions).

I have shorted pins 1 and 2, ground on pin 8. The output from the sensor without the magnet was about 2.8 volts, it did not respond to the magnet.

I soldered out the resistor (R4), there was a reaction to the magnet (I kept everything in the cookie jar). After installing to the mechanics, the output is 0 volts, no reaction to the magnet...

Now I will try the second sensor with different wires.

Translated with www.DeepL.com/Translator (free version)

 

Здравствуйте.

У меня какойто полтергейст с подключением датчика AS5600 как аналогового датчика и от другого производителя (квадратная форма как в вашей инструкции).

ножки 1 и 2 закорочены, на 8 ногу землю кинул.  на выходе с датчика без магнита было около 2,8 вольт, на магнит не реагировало.

Выпаял резистор (R4), появилась реакция на магнит (все держал в куках). После установки на механику на выходе 0 вольт, реакции на магнит нету...

Сейчас попробую второй датчик с другими проводами.

 

 

 

IMG_4765.jpg

Posted

So, I was able to get this sensor to work in 'analogue'.

I tried to make it work with the magnet placed behind the board, it was more convenient for me...

The sensor did not respond until I touched the board with the magnet, but if I touched the board with the magnet, I could see changes in the signal at the sensor output.

The "cyrus" worked through the board...

Anyway, if the magnet is on the chip side, everything works!

Translated with www.DeepL.com/Translator (free version)

 

Так, получилось заставить работать этот датчик в "аналоге".

Я пытался заставить его работать при магните размещенном за платой, мне так было удобней...

датчик ни как не реагировал пока я магнитом не касался платы, если косаться магнитом платы то было видно изменения сигнала на выходе датчика.

в "циыре" работал через плату...

Вообщем, если магнит со стороны чипа то все работает!

  • Like 1
Posted

Hello. WG_Magners
There was a question about the reality of connecting the VPC MongoosT-50CM2 Grip handle.
Do I need additional adapters (adapters) or can I directly connect the handle connector to the controller?

Posted
1 час назад, GVL224 сказал:

Hello. WG_Magners
There was a question about the reality of connecting the VPC MongoosT-50CM2 Grip handle.
Do I need additional adapters (adapters) or can I directly connect the handle connector to the controller?

Hey,

I advice you to ask community on ru forum or hotas discord to share their experience. Personally I've never tried this and I don't even know the architecture of VPC grips, so I don't have enough experience to give you useful information..

Posted
1 час назад, WG_Magners сказал:

Hey,

I advice you to ask community on ru forum or hotas discord to share their experience. Personally I've never tried this and I don't even know the architecture of VPC grips, so I don't have enough experience to give you useful information..

Understood thanks.

  • 4 weeks later...
Posted (edited)

I made a shield for two bluepills and added a bunch of sockets and pins.

 

image.thumb.jpeg.04361017aaf5b1feecf627934f073bb8.jpeg

 

image.thumb.jpeg.1fdb91e43df217eb47b96b8bda8e327a.jpeg

 

image.thumb.jpeg.535345a558ce7d86fe882bdfc621e3fa.jpeg

 

One "Bluepill"  is working and the LED matrix is working great, but the other have problems. The shift register 74HC165 and MCP3208.

I'm wondering if anyone could give me a clue what's wrong beause I'm at a loss at the moment?

 

Here's the schematic:

 

image.thumb.jpeg.50039832704885914d51e28730ab5aef.jpeg

 

 

Problem 1 - Shift register. 

If I connect a toggle switch to any SWITCH_? PH2.0 socket , doesn't matter what type, momentary, DSPD or whatever. the chosen inputs are flickering intermittent and no sign of action when pulling the toggle switch. If I chain another 8 buttons from the 74HC165 out port, all (9-16) works but 1-8 which are connected directly to the shift register still doesn't. Could it be that the middle pin of the switches are connected to VCC and not GND? All signal pins have a 10K resistor

 

Problem 2 - MCP3208

First what happens in freejoy is that if I connect lets say 4 axis (analouge 10K pots) to the sockets of MCP3208 and moving X-axis, all other axis are moving simultaneously. I am not able to separate them. Do you see any fault with the MCP3208 schematic because I don't?  

EDIT: I was short of 1.0uF and mounted a 10uF, could that be the problem? I doubt it but one never knows.

 

Question:

How do I connect a KY-023 style "joystick" to Freejoy? it has 5 pins. VCC, GND, VRX, VRY and SWITCH. When I connect it to two analogue axis and a Button pin, only the switch is working and also indicates on both X and Y axis as key presses along with the "normal button". Sometimes only slight movement on X-axis.

 

image.jpeg.837bdb00f6b725025993b452081c0d2f.jpeg

 

 

I appreciate any tip and hint.

 

Edited by Stout
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...