Help with some hardware

51 views
Skip to first unread message

mark

unread,
Jul 13, 2025, 7:33:07 PMJul 13
to Robots & Dinosaurs
Greetings from Hobart.
I am hoping someone there can help me with some items I built for the Parkinson's research unit at Macquarie Uni. I made 3 sets of foot pedals with interface boxes which worked when I tested them but the team are having problems getting them to work.

One of the researchers lives in Meadowbank and can bring the units in. I hope it will not be too difficult to work out what is wrong if someone there is willing to take a look for me.

Each set consists of
  • 2 3d printed pedals containing a microswitch connected to an RJ45
  • an interface box with a rp2040 board acting as a keyboard emulator
  • the units connect to each other with a standard ethernet cable using pins 1,2 and 7,8 for the pairs
  • connection to the computer is via a USB C cable
I tested with both Windows 10 and linux. The keys sent are "x" and "y"

Thanks,
Mark


schematic.pdf

Mitchell Pomery

unread,
Jul 13, 2025, 8:15:00 PMJul 13
to Robots & Dinosaurs
Hey Mark,

I'm happy to help take a look at them on Tuesday night this week or next week (I won't be at the space on Saturday this week unfortunately).

Mitch

James Ridey

unread,
Jul 13, 2025, 11:12:21 PMJul 13
to Robots & Dinosaurs
My first thought after having a looking at the schematic, is that I don't see any pullups or pulldowns.
And I don't think the internal pullups for the RP2040 are strong enough for the length of cable that you have.

Are you able to try putting a 2 10k resistors, one between 3.3v and GPIO2 and the other between 3.3v and GPIO3?

Sophie Parker

unread,
Jul 13, 2025, 11:37:54 PMJul 13
to sydney-h...@googlegroups.com
The length of cable without pull-up resistors is certainly likely to be the problem; could be other things caused by the length as well.

Can you provide more detail about the setup when installed? What length of USB cable, what length of CAT cable to the pedals, what kind of host device, any other nearby electrical devices, etc.

in general if you are interested in further prototyping, it would be a lot simpler to build the Microcontroller into the foot pedal unit and use a USB connection to the PC. USB uses differential pair for data and happily works over a 5m cable for this kind of low speed application. Then you don’t have to worry about differential signalling, TVS and such for the cable run.

USB cables are also shielded, unlike a regular CAT cable.

Sophie Parker
Luminesce
luminesce.lighting
--
You received this message because you are subscribed to the Google Groups "Robots & Dinosaurs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sydney-hackspa...@googlegroups.com.

Attachments:
  • schematic.pdf

Sophie Parker

unread,
Jul 13, 2025, 11:43:04 PMJul 13
to sydney-h...@googlegroups.com
Oh and please provide your source code for the MCU. There are some software tricks that may be able to work around hardware limitations, like agressive denouncing or switching inout/output modes around reads

Sophie Parker
Luminesce
luminesce.lighting

Andrew Larkin

unread,
Jul 14, 2025, 1:23:39 AMJul 14
to sydney-h...@googlegroups.com
If there are long cables involved, there is no reason why you can't take the pullups down a lot lower - even to hundreds of ohms. It is the footswitch handling the current and lower the bus impedance the less issue with noise pickip.

Message has been deleted

Madox

unread,
Jul 14, 2025, 5:32:43 AMJul 14
to Robots & Dinosaurs
I second what Sophie has said and recommend moving the micro to where the foot pedal is, assuming the set is in proximity to each other.  Then you can use nice looking commercial USB cables to connect to them nicely... 

If the problem still exists / needs fixing next week, I am happy to go to the university to troubleshoot and fix it for them in situ free of charge!  I return to Sydney 23 Jul so let me know if you're interested.

Cheers,
John

mark

unread,
Jul 15, 2025, 6:55:33 PMJul 15
to Robots & Dinosaurs
Thanks for the suggestions. Yanqiu from the team will come by tomorrow night.
When used in the lab the ethernet cable should only need to be 1 - 2m and I tested with a 3m cable. There might be length issues when used in an MRI as it will need a 10m cable.

My original design had 2 versions, one with the microcontroller integrated with the pedals and this one that is MRI compatible which means having as little electronics as possible near the scanner.

I am using switch debouncing so that should not be an issue. I will send the code to you directly Sophie as I don't want to make it public just at the moment.

I think the main issue might be that the microcontroller might not be being recognised as a keyboard. I would usually use a teensy for applications like this but they only have micro USB and I wanted to use USB C.
The rp2040 board was the only one I had on hand that worked as a keyboard emulator and had USB C.

Madox

unread,
Jul 15, 2025, 9:59:35 PMJul 15
to Robots & Dinosaurs
That's cool and interesting.  If it's a problem with the USB then taking it to R&D wouldn't help... But a simple USB HID shouldn't have troubles, wonder if the computer has any USB port restrictions in place. 

Am I the only one thinking of an fibre optic setup with no metal parts as soon as the letters MRI was parsed? 

Lewys Martin

unread,
Jul 16, 2025, 6:50:30 AMJul 16
to Robots & Dinosaurs
Hi Mark, 

Just wanted to chime in here. 
The rp2040 is a great choice for this application. However there's a few things I would personally do different. 

The main thing; is not reinventing the wheel. 
There's already an extremely robust, easy to use firmware compatible with RP2040 that can most likely do exactly what you need (QMK)
From a single key press, to typing whole strings, it's very robust, and would make future changes simple eg with vial support. 

Secondly, with regards to the MRI, 
I would tackle this using optics only, you can use off the shelf fiber patch cables; going to couplers at either end, 
You don't need fancy transceivers, only a bright LED at one end of one fiber, and a light sensor on the paired return fibre. 

Then at the foot switch box, you need only to have the fibers point at each other, and pressing the foot switch breaks the beam! 
This way there's no electronics involved near the MRI. 

But definately check out QMK.  You can probably even just use an existing two key layout and just adjust the keymaps for your purpose. 
Even in your existing hardware you may notice a significant improvement given how much work has gone into it!

Lewys

Andrew Larkin

unread,
Jul 16, 2025, 6:55:08 AMJul 16
to sydney-h...@googlegroups.com
Surely an MRI machine would be the ultimate source of electromagnetic interference? The signals being picked up by the wires could be epic...

Message has been deleted

mark

unread,
Jul 20, 2025, 4:49:04 PMJul 20
to Robots & Dinosaurs
I have used a variation of this basic design for MRI compatible foot switches in the past and it has been very reliable. The previous version used an optical encoder in the foot pedal to measure precise movement and allow for hysteresis when lifting the foot so this version is much simpler.The main difference with this version is that I wanted to have USB C on the microcontroller which meant I could not use a Teensy which I have used in the past.

The main issue ended up being bent pins in the RJ45 caused by initially plugging in a RJ11 cable so the fix was easy once the cause was identified.

The issue of interference is reduced because the pedals are operated by the feet and we only measuring brain activity so there is good separation to the receiving coils.

Mark
Reply all
Reply to author
Forward
0 new messages