3.3V and 5V How to use on the Spark Core

It was my understanding that on the VIN it went through the Sparks voltage regulator to step it down to 3.3 v. Is that not the case?

Yes but are you powering the sensors with 5V or 3.3V?

I’m about to use the Spark core in a project where the RX/TX will connect directly to the TX/RX of a 5V Atmega. I could not, from the Spark documentaton, get a sense of whether the Spark RX pin is 5V tolerant. In one part of the docs it says pretty much all the pins except the analog ins and D2 can handle 5V, in another part it lists out only D0,1,3,4,5,6,7.

I actually had to go to the Spark schematic (https://github.com/spark/core/blob/master/PDFs/core-schematic-v1.pdf) to see which STM32 pin is used for RX (PA3) and then to the ST datasheet (http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00161566.pdf) to look up the pin and see that it is indeed NOT a 5V tolerant pin.

Well, at least Spark is open and I can easily work this out!

1 Like

So does the shield shield convert everything so that the spark core is protected from over-volting?

Or is it only the power into through the power supply, and not the power into the pins?

Thanks!

It’s is protected by the Logic Level Converter IC used on the shield shield but always good not to have overvoltage conditions :slight_smile:

Ok, I know I’m going to smack myself after this, but where is the RAW Pin? Am I just blind or is it labeled something else?

The schematic calls it RAW, but it’s labeled VIN on the PCB.

Hi zach, I similarly want to power my spark with a 5v/2amp power supply through the VIN. Did your connection work out? I am having trouble finding 5v with lower amps and don’t want to fry my spark…

Hi @adellelin - yes a 5V/2A power supply would be fine, the amperage on a power supply is the maximum that can be drawn through it. Current is pulled, not pushed, and the Core won’t pull more than it needs unless you create a short circuit.

1 Like

Sorry zach, I just realized you already answered the question. Thank you.

I see that this may have been addressed early but not sure if it was explicitly stated. Is it possible for any of the pins to output 5v? There are so many components that are made for an Arduino that seem like they should run on the Photon/Core but they require 5v not 3.3v.

For example, I would like to use an 16X2 LCD screen but it requires 5v. Will this work with the Photon? If so, which pin on the Photon must I use to power the LCD with 5v? I really don’t want to use a power converter if possible.

If you just need 5V supply you can use the Vin pin while connected to USB.
If you need 5V signals you will have to use level shifting e.g. by use of the Particle Shield shield.

1 Like

That’s just what I need to know. Thanks ScruffR

I’ve got one more question about this on the Particle P1. I’m looking to eventually migrate over to the P1 and wondering if there is a way to get 5v output on any of those pins. Is that possible or do I need to bring up the voltage from 3.3 another way?

The P1 is a 3.3V device just as the others, so you’d need to boost the voltage another way.
But usually you are supplying the device from somewhere, so there you should find the required voltage easier :wink:

Hi,

I am in the process of designing an interface and will appreciate some additional clarification. As I understand,

  1. Photon Particle can be powered by an external 5V regulated supply through VIN pin.
    For 5V tolerant pins:
  2. Output pins can be used to drive 5V devices (HC-SR04 sensor, and L293D)
  3. Input pins can accept logic signals (0 to 5V) from 5V devices (HC-SR04 ++)

If the above is true then no logic translators are needed.
Thanks, Sudhir Gupta

@sgupta,

  1. Photon Particle can be powered by an external 5V regulated supply through VIN pin. TRUE

For 5V tolerant pins:
Output pins can be used to drive 5V devices (HC-SR04 sensor, and L293D) FALSE(ish)

  • To drive a 5V logic pin, you will need a logic level translator
  • However, many 5V devices will treat a 3.3V input as a logic “1” so not using a translator may work. Any input with a pull-up to 5V cannot be driven without a translator.

Input pins can accept logic signals (0 to 5V) from 5V devices (HC-SR04 ++) TRUE

  • This ONLY applies to Photon pins set for digital INPUT. Pins set for analog INPUT will be damaged by voltages exceeding 3.3V.
    :smiley:
1 Like

Thank you for clarifying, @peekay123! :smiley:
I have one related question:

Couldn’t I just have my pin either as a LOW output (that should work with a 5V pullup being present?) or as a (5V-tolerant) input (with the pull-up bringing the voltage up)? Am I misunderstanding things here?

The keyword here is driven.
When you drive a pin HIGH you’d actually pull it down from 5V pull-up voltage to 3.3V HIGH level, which may not play well.
But if you let go of the pin by changing the pinMode() to INPUT then the ext. pull-up could do its job.
That’s how I2C works.

2 Likes

2 posts were merged into an existing topic: Running Photon using Mains power through a relay