What kind of pins are these?

Hey, I’m using a FEZ Panda - I was told earlier on on here that to get a PWM signal up from 3v3 to 5v, I just need to put a resistor from that pin to 5v. I therefore assume the PWM signal is generated through an open drain or similar type of output.

Are digital pins 10 through to 13 generated in the same way? Could I just use a resistor to pull them up?

Why add a resistor?! Only I2C pins are open drain and these are not PWM!

Ahh Okay, well how would I pull up a 3v3 pwm signal to 5v? I’ve got a motor controller which requires a 5V signal.

You need to add a logic gate that is powered off 5V but will accept 3.3V input (TTL)
The other option is to use a transistor and now you have open-collector or open-drain to add your resistor.

Thanks, thats what I was thinking - I got rather confused when the resistor idea was suggested, it challanged my knowledge of electronics as I tried to bend rules of physics to make it work :slight_smile:

Xarren! The resistors will work. I take it that the PWM signal isn’t large enough for the application. It surprises me because then CMOS input on the device should see the PWM directly from the fez. If the resistor network isn’t affecting the voltage at all, yo may need a slightly smaller value. did you use around 470 ohm?

I’m sorry for the confusion. The other way I shift logic levels is like so.

Cheers Ian

Thanks, I used 4k7, I’ll retry tomorrow with 470, otherwise I recon I’ll just use an or gate for it - Got some unused inputs on one I’m using elsewhere in my circuit :slight_smile:

Xarren! I think I confused the issue. My idea was to place a voltage divider from the 3.3v to the 5v rail but on hind sight as there is a cmos gate it may not be pulled low enough. I would put the transistor in as a level shifter. Once again sorry for the confusion.

Cheers Ian

P.S. You wouldn’t think I’ve been doing this for nigh on 28 years would you…

Thanks - Transistor rather than a FET? Would a transistor switch fast enough to accuratelly amplify the PWM fignal?

Oh and if the answer if FET - Do they do packages of FETs? As in 7 in line or something like that - In a SMD or DIP package? Tried to look for some but I can’t find them on any of my favourite websites.

Like the ULN2003 transitor packages :slight_smile:

I would use a 74HCT244 if you need several converters, (this is an Octal buffer/line driver), powered with 5v, it triggers at about 2v. http://www.nxp.com/documents/data_sheet/74HC_HCT244.pdf

It is very fast and yet cheap.

However if you need bi-directional conversion (I2C) I would advise using a specialized chip.

Thanks for the suggestion - I’ll review that in detail on monday, just got back having spent 9 hours in the workshop, had enough for a day :P.

Sorry Xarrren! The picture is a mosfet transistor thats what I use, not a bipolar transistor.

They are both transistors.

Cheers Ian

Ahh cool, first thing that comes to my mind when someone says transistor is indeed a bipolar one rather than a fet.

Anyways, can’t wait for monday to carry on working on my project, final deadline is easter, so I’m basically skipping half my lessons to sit in the dt lab and finish it. Not that I’m complaining :slight_smile: