Do i have a SN74AHCT245N level shifter connected correctly?

I am working with a esp8266 and the FastLED library. I am having an issue where the lights are not acting as expected (they only show up white, and the data high-level side is always at +5v, but the 3v side is not at 3.3v)

Here is a picture of my schematic:

And a datasheet for the chip i am using:
http://www.mouser.com/ds/2/405/sn74ahct245-405658.pdf

I also have my code available for those interested:

//#define FASTLED_ESP8266_RAW_PIN_ORDER
#include <FastLED.h>
//#include <SPI.h>
#define NUM_LEDS 3
#define DATA_PIN 4
#define CLOCK_PIN 5
CRGB leds[NUM_LEDS];

void setup() {
 Serial.begin(9600);
 //delay(3000);
  FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_KHZ(200)>(leds, NUM_LEDS);
 ////yield();
}

void loop() {
  for(int i = 0; i < NUM_LEDS; i++){
    leds[i] = 0;
  }
  FastLED.show();
  delay(100);
  Serial.println("A");
}

Is there some reason you didn't just post the picture as an attachment ?


Do you not know how to do that ?

they only show up white, and the data high-level side is always at +5v, but the 3v side is not at 3.3v)

This is too vague. You have to speak in terms of logic HIGH or logic LOW.
Logic levels for 3.3V are different than 5V logic levels.
Saying the 3.3V side is not at 3.3V is not the same as saying the 3.3V side is LOW.

First of all, you can't measure rapidly changing logic levels (like a clock or data) with a multimeter any way because they average so that isn't going to tell us any thing. You need to start this post by convincing us you know how to test the chip in the first place , given that you don't have a scope, which means you need to DISCONNECT at least ONE of the GROUNDED unused inputs and connect it to GND on with a jumper and then measure the 5V side output. Move the jumper to 3.3V and measure the 5V side output. Post your results. If the 5V side is 0.1 to 0.4V when the 3.3V side is shorted to GND, then the chip is fine and your problem is not the chip. If you have a scope and can look at the 3.3V side signal on ch-1 and the 5V side on ch-2 and post a photo of the scope screen that would work. (for clock and data)

S/W is not my area of expertise so someone else will have to look at that.

Your code uses pins 3&4 but your schematic shows GPIO 16 & 14.
If this is accurate then it is not going to work is it?

raschemmel:
Is there some reason you didn't just post the picture as an attachment ?

Three excellent reasons!

  • He doesn't know how to.
  • The image is hosted - absolutely no reason to attach it.
  • The forum mangles the presentation of attachments.

looks same as my attachment post

the reason I used hosting for the picture is that I posted this somewhere else that don't let you do the whole upload thing, so I outsmart the man by using outside the box hosting dudes...

I know you cannot test logic voltage with a multimeter, which is why I thought it was strange that the b2 on the chip was giving me constant 5v (instead on zero) while a2 was giving me close to zero volts.. I don't know if it means something or not I just thought it was interesting, as I would not expect the meter to show that for a rapidly fluctuating voltage.

the arduino shell for the esp8266 had interesting pin mappings, I can't say for certain I have the pins correct, but when I used 14 and 16 the esp8266 would hang.(enter an endless string of watchdog resets). I'm kind of shocked that with how powerful and cheap the chip is, it isn't more popular here. p

Are you using an arduino with the esp8266 ?

By "shell" , do you mean "shield" ?

No, I mean the core that lets the esp work with the ide

I'm kind of shocked that with how powerful and cheap the chip is, it isn't more popular here.

I think there are several reasons, not the least of which is not user friendly. (I heard)

Yea, no docs.

I found the solution:

http://bbs.espressif.com/viewtopic.php?t=632

Gpio16 is tied to a reset pin on my esp12. Gotta break out the soldering iron and some snips.

The other benefit of snaggy is that you an paste a print screen without having to save it first.

Gpio16 is tied to a reset pin on my esp12. Gotta break out the soldering iron and some snips.

Standard method for cutting PCB traces is Exacto knife.

raschemmel:
looks same as my attachment post

It is - except that it is clickable and can be viewed in full in all browsers.

Qdeathstar:
the reason I used hosting for the picture is that I posted this somewhere else that don't let you do the whole upload thing, so I outsmart the man by using outside the box hosting dudes...

And entirely correct too.

This forum software also deliberately obfuscates the attachment link, making it partially or completely unusable with some browsers.