Xwhatsit solenoid driver alternative

kmnov2017

16 Nov 2019, 01:31

I thought this needs mentioning, you can use a 50 cent relay to drive the solenoid. Yes that’s all one needs!

Earlier this year, I tried to assemble a few solenoid drivers but abandoned the project as SMD soldering needs ninja soldering skills. So with a bit of research and reading around, the idea of a relay came along. A few weeks ago user ZedTheMan wrote to me that he already used a relay to get his solenoid running on his beamspring.

So what exactly is a relay? A relay is basically a device that triggers power on and off to a connected device. The input to trigger on/off will still come from the keyboard controller (Xwhatsit, Cypress, Arduino....). The device in this case is the actual solenoid. However, beamspring solenoids are rated at 8.5V - which means you can’t power it natively with USB. To get 8.5/9V you will need either an external power source (like a wall adapter or an external battery) OR boost the 5V output from USB to 9V using a DC DC boost converter (costs around 1 EUR).

That’s all one needs to get the solenoid working - 1.5 euros worth of parts. And now that one thinks of it, I wonder why xwhatsit didn’t just recommend using off the shelf products for the solenoid driver.

User avatar
ZedTheMan

16 Nov 2019, 05:38

I'm going to purchase a DC DC boost converter, and test out to see if that can be used to replace my 9v battery.

kmnov2017

17 Nov 2019, 00:28

So here's how the schematics look
solenoid_ed.jpg
solenoid_ed.jpg (298.07 KiB) Viewed 7602 times
Updated: Added a Diode for safety.

Notice the Labels on the Relay. It is IMPORTANT that you connect the cables correctly. The sequence of pins will differ by manufacturer. For the output you will need to connect to "COM" and "NO". This is assuming you are using a Low Level Relay. Some relays will have a jumper to set High Level or Low level. Set jumper to Low Level Relay.
Input labels should read GND, VCC and IN or DC-, DC+ and IN.

Special thanks to user: ListofOptions for reviewing the circuit and ZedtheMan for the initial proof of concept
Last edited by kmnov2017 on 18 Nov 2019, 01:08, edited 5 times in total.

User avatar
ZedTheMan

17 Nov 2019, 02:15

Ive been working with kmnov on this. I should be able to start testing on Monday when DC DC boost converters come in.
I am willing to be the guinea pig to see if we can get this working without the USB external power as well. If it breaks a cypress, It'll suck but I will get another.

hypkx
Chasing the Dream

17 Nov 2019, 13:20

I hope this thread becomes more popular, I thought about this solution since some time, but only have limited programmibilty skills and the power source was also the problem.

User avatar
DMA

17 Nov 2019, 19:44

Erhm.. please don't drive inductive loads from GPIO. You'll fry the GPIO. They'e specced for 4mA source current and you're trying to pull SEVENTY, if datasheet doesn't lie: http://www.circuitbasics.com/wp-content ... asheet.pdf

The important parts of xwhatsit's solenoid driver is that it's a 9V boost converter with an input current limiter, huge-ass capacitor behind it, and 9V solid-state relay.

If you absolutely detest SMD components (they aren't that hard to solder, btw - just get a good iron and a lot of flux) - there are thru-hole versions for most of the stuff. Not current limiter though.

There are 2 reasons not to use "off-the-shelf products":
1) space.
2) cost - those modules were much more expensive back in the day. Although I've heard there are small prototype PCBA services nowadays which don't mind assembling small runs and have standard component library so you don't even need to source components. I forgot the name but will ask around.

kmnov2017

17 Nov 2019, 22:50

Personally I prefer to use a solid state relay as well. The diagram only represented the wiring against relay pins, I'll change it to a solid state relay. Also, I'll use a parallel usb for the source of power for the relay.

User avatar
DMA

18 Nov 2019, 00:10

kmnov2017 wrote:
17 Nov 2019, 22:50
Personally I prefer to use a solid state relay as well. The diagram only represented the wiring against relay pins, I'll change it to a solid state relay. Also, I'll use a parallel usb for the source of power for the relay.
I was a bit incorrect - relay is high-side, so it will work with a power supply capable of delivering solenoid's "on" current (the "don't drive relay from GPIO" part still stands)

Boost converter, especially powered from the same USB socket, and especially not having a big buffer capacitor, will not be amused by suddenly increased load and will suck enough current out of USB socket to trip the (hopefully resettable) fuse - powering down the controller. Best case there is converter's own controller shuts down from self-inflicted undervoltage before fuse trips. PSoC is likely to ride out that voltage dip, because of 1uF buffer capacitors on it's core's power rails and because core actually runs at 1.71V.

kmnov2017

18 Nov 2019, 01:28

DMA wrote:
18 Nov 2019, 00:10
kmnov2017 wrote:
17 Nov 2019, 22:50
Personally I prefer to use a solid state relay as well. The diagram only represented the wiring against relay pins, I'll change it to a solid state relay. Also, I'll use a parallel usb for the source of power for the relay.
I was a bit incorrect - relay is high-side, so it will work with a power supply capable of delivering solenoid's "on" current (the "don't drive relay from GPIO" part still stands)

Boost converter, especially powered from the same USB socket, and especially not having a big buffer capacitor, will not be amused by suddenly increased load and will suck enough current out of USB socket to trip the (hopefully resettable) fuse - powering down the controller. Best case there is converter's own controller shuts down from self-inflicted undervoltage before fuse trips. PSoC is likely to ride out that voltage dip, because of 1uF buffer capacitors on it's core's power rails and because core actually runs at 1.71V.
How much is the total power draw by the Cypress board?

At 9V, the solenoid should draw around 200 to 250, lets say 250mA. The relay around 75mA. If the Cypress board draws a max 200mA, then a standard USB port with 500mA power output should be fine.

User avatar
DMA

18 Nov 2019, 06:32

9V 250mA is 450mA from 5V, assuming 100% conversion efficiency. Just the solenoid blows you out of power budget.

CS by itself consumes ~25mA, up to 36mA in some modes.

User avatar
DMA

24 Nov 2019, 02:04

btw, https://www.seeedstudio.com/fusion.html has free PCBA for 5 PCB copies. Shouldn't be dramatically more expensive than rigging from ebay-sourced modules.

User avatar
ZedTheMan

30 Nov 2019, 19:30

Good news all! I've been doing some testing, and managed to get this alternative working via only one USB port, using vdd and gnd from the cypress. (Admittedly, it required some tuning with the potentiometer. 8.5v output managed to work though without causing the cypress to turn off.) Edit: solenoid works fine with less voltage. I recommend this to give yourself more headroom.

That is, this is still a solution to use at your own risk, but initially it seems to work. If you do not feel comfortable using only 1 USB for powering all of it, you can use a second USB port/cable. Both have worked for me.
Attachments
1130191218-min (1).jpg
1130191218-min (1).jpg (1.21 MiB) Viewed 7311 times
1130191152b-min (1).jpg
1130191152b-min (1).jpg (1.47 MiB) Viewed 7311 times
1130191152a-min.jpg
1130191152a-min.jpg (1.06 MiB) Viewed 7311 times

zzxx53

19 Dec 2019, 18:19

If I used a 5V solenoid instead of the stock 8.5V one, can I omit the boost converter part?
Was thinking about something like https://www.ebay.com/itm/DC-5V-6V-Mini- ... 2737720692

kmnov2017

19 Dec 2019, 18:56

zzxx53 wrote:
19 Dec 2019, 18:19
If I used a 5V solenoid instead of the stock 8.5V one, can I omit the boost converter part?
Was thinking about something like https://www.ebay.com/itm/DC-5V-6V-Mini- ... 2737720692
Should work. Native usb will give you just slightly lower than 5V.

gravesdesk

12 Feb 2020, 21:07

Hey, can we apply this setup to model f xt running by pro micro soarer's converter?
If yes would you please provide information about wiring?
Thanks.

kmnov2017

12 Feb 2020, 23:36

gravesdesk wrote:
12 Feb 2020, 21:07
Hey, can we apply this setup to model f xt running by pro micro soarer's converter?
If yes would you please provide information about wiring?
Thanks.
No, because Soarer's converter does not have a PIN set to trigger a signal for the Solenoid. And because Soarer's converter is not open source, we wont be modifying it for anyone (Its legally not allowed in the EU without the authors consent). So unless you can reverse engineer Soarers on your own, you'll have to use either QMK/TMK firmware.

kmnov2017

13 Apr 2020, 00:53

I finally converted my 3178 with this method, works flawlessly. The solenoid needs just about 6.5 to 6.7v to work.

Here's a video https://youtu.be/zLtnrwhEk8E

Ellipse

19 Aug 2020, 04:24

kmnov2017 wrote:
12 Feb 2020, 23:36
gravesdesk wrote:
12 Feb 2020, 21:07
Hey, can we apply this setup to model f xt running by pro micro soarer's converter?
If yes would you please provide information about wiring?
Thanks.
No, because Soarer's converter does not have a PIN set to trigger a signal for the Solenoid. And because Soarer's converter is not open source, we wont be modifying it for anyone (Its legally not allowed in the EU without the authors consent). So unless you can reverse engineer Soarers on your own, you'll have to use either QMK/TMK firmware.
Does anyone know if there is a way to use a Pro Micro/Teensy (without Soarer's converter firmware) to interface with the original Model F controllers (XT, F122, etc.) and allow for a solenoid or buzzer? The goal being to avoid soldering anything to original IBM hardware. Not sure if QMK/TMK could/would be repurposed for this.

zzxx53

19 Aug 2020, 05:57

Ellipse wrote:
19 Aug 2020, 04:24

Does anyone know if there is a way to use a Pro Micro/Teensy (without Soarer's converter firmware) to interface with the original Model F controllers (XT, F122, etc.) and allow for a solenoid or buzzer? The goal being to avoid soldering anything to original IBM hardware. Not sure if QMK/TMK could/would be repurposed for this.
See this reply from kmnov2017:
viewtopic.php?p=469311#p469311

Ellipse

19 Aug 2020, 06:16

Thanks zzxx that is a good first step towards what I was asking about. Ideally I could use a Pro Micro + an xwhatsit solenoid driver to work with the original IBM Model F controller.

I understand that there are cheaper alternatives described by kmnov and others to power the solenoid but I'm curious specifically about a Pro Micro + QMK + an xwhatsit solenoid driver + original IBM Model F XT/F122/etc. controller.

Seems like there is some initial support of IBM XT Scan Code set 1 in QMK: https://github.com/tmk/tmk_keyboard/issues/635

Post Reply

Return to “Workshop”