PWM voltage step-up from 3.3v to 9v

Hi guys. I need to simulate a PWM signal at 140ms frequency (50% duty cycle), so 70ms ON, 70ms OFF. Made a small bit of code which does just that, tested it with the LED, works just fine.

My problem is, the board (Wemos Mini v3) works at 3.3v, but the device I am simulating the PWM into works at 9v. So my question is ... what do I need in order to shift the voltage of the signal from 3.3v to 9v?

I have some experience with the usual bidirectional sparkfun logic shifters from 3.3v to 5v and viceversa .. but somehow I don't think that's the case here as I can't see anything that's over 5v.

I did find something called "voltage step-up" (eg. DC-DC XL6009 5V-40V 4A) but not sure if it's what I need? Any advice?

PS: What I'm trying to accomplish is to simulate signal coming from an NV9 biller (pin 1, set to pulse mode), which basically sends a pulse for every dollar I put in, therefore, I want to make an alternative (online payment solution) when you have no actual bills with you to insert, so you can scan a QR code, pay via Stripe, which in turn pings my backend to validate the payment and simulate that pulse to the NV9 biller's wire, that goes to the washing machine's controller. Everything is working just fine now, but I have to figure out how to properly send that pulse signal.

That depends on the signal receiver. Possibly a NPN transistor or logic level MOSFET is sufficient.

Measure the idle voltage on the input and the short circuit current to GND.

A simple logic level N channel MOSFET switch will work.

Here's the sender I'm trying to replicate, in case it helps. There are some technical documentation files linked.

I'll do some reading into what "NPN transistor" and "logic level MOSFET" are, as I have no hardware / electricity background.

Thanks for the tip though.

A lot of unknowns...

If it's always a 50% square wave that's not PWM, but the solution is probably the same.

That's for boosting DC power but you will need a 9V power supply so you might need this thing if you don't already have 9V available.

If you don't need more than a few milliamps the easiest thing I can think of is an op-amp comparator powered by 9V and with a threshold voltage of about half of the 3.3V. In this configuration you have something like an "amplifying switch". (If you can power it with about 10V that will make-up for any voltage-loss in the op-amp.)

A single transistor or MOSFET might work (and they can handle more power) but it might not.

If it's always a 50% square wave that's not PWM, but the solution is probably the same.

I mean, it's always static because the NV9 bill validator can have various duty cycles (like 25%). In this case, it seems the washing controller (which receives the bill validator pulses) has configured the NV9 biller to send 70ms HIGH, 70ms LOW for each dollar.

So if you insert a $10 bill, the biller sends 10 pulses, at 140ms each, with a 50% duty cycle, based on the NV9 biller config that anyone can read by pressing the config button twice, and an LED will blink a few times, in this case, 2 - 7 - 7 - 1.

2 = pulse mode
7 = 7 x 10ms high
7 = 7 x 10ms low
1 = 1 pulse per dollar

I checked the voltage between the PULSE pin and GND, and it's 9V idle, even when Idle. I'm not sure what current is sent througout that PIN, as I don't have a tool to measure it, though I figured I could buy a INA219 module, and measure exactly what's being sent.

Regardless, what came to mind, is that if the wire (idle) is on 9V all the time, I could simply put the arduino in the middle, convert the 9v signal to 3.3v so the wemos board can read it, connect it to an input pin, configure an output pin, convert the 3.3v to 9v, and detect whenever the biller sends $$, then simply proxy it.

It's probably flawed logic, but for my tiny unexperienced brain, it should work, in theory :lol:

Thanks for your time!

Most probably it's an open collector interface. Then it's sufficient to pulse the signal pin low by use of a transistor.

Would you mind elaborating what transistor would be needed if that's the case? I assume it depends on the current it needs to send? Here's what the manufacturer says:

CleanShot 2022-08-25 at 23.38.14

EDIT: For some reason I kept recalling 9V, when it's actually 12V, my bad, idea is the same though.

Again, sorry for sounding dumb, I have no experience in the field, I come from a software development background. I do not look to be proficient in micro-controllers, as much as just looking to figure out basic automations / workarounds.

I understand I need to get into some crash course into electricity / circuitry if I am ever to even dabble into this kind of work.

This is the information that is pertinent:

See the "Interface Logic Levels". You already measured the (idle) voltage, here "Pull-up voltage of the host interface". You also can measure the short-circuit current from the input to GND, or assume the interface spec of 50mA.

Almost any NPN transistor or logic level MOSFET will sustain 12V and the few mA of the input.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.