I have a project where I need to control multiple L289N bridges. L289N bridge requires HIGH input to be at least 2.25V+ Which according to documentation Photon should be able to drive. However my D0 to D7 pins output constant 1.35V on HIGH. Which is enough to trigger the L289N a bit (i hear a buzzing noise from the motor but no power yet).
@Mjones ok but how come only 1.35V is provided on the HIGH on D0-D7 pins ? Regardless if anything is connected. Should it not provide more ? When I measure it with nothing connected on the pin it provides 1.35V always which is odd.
Are you sure they're working as outputs? Got some code?
Measuring 1.35V with a DMM or scope? DMM could show an average of a floating value.
D0-7 set to outputs using pinMode()?
With a 1k resistor attached between output and ground, instead of the part, do you still measure 1.35V or do you see 3.3V or near 0V?
Drive power will be determined by 'enough amps' rather than 'enough voltage'. There's enough for the enable and input lines. The L298H and motors will have to have a sufficient supply independently.
HIGH (enable) requires at least 2.3V or Vss (5V)
The enable HIGH needs at least 2.3V (you have enough if the photon supply is 3.3V per @Mjones) but shouldn't be higher than Vss (that's the max. Are you powering the L298H off 5V?)
Would verify the pin mode first, myself.
The output voltage would be 3.3V when you have no load or a load that wouldn't draw more than ~20mA. Once you overload the GPIO the voltage will drop and you are running the risk of damaging the output stage.
If this is true, then I'd go with @ian.c's suspision that you are not actually driving the pin as output.
BTW, on D7 you always have the LED with its current limiting resistor connected - so that needs to be considered too.
This is my code. I flashed the device with this code I set my multimeter clamps to the D0 & D7 pins. I see 1.35V for 10s than 0V for 10s and repeat. Never above am I missing something in code/configuration ?
Have you got your Photon in a breadboard?
Do you measure the same thing with the Photon bare of anything else (including no breadboard)?
What do you measure on the 3v3 pin?
Can you try some other pins? (you may already have fried D0 & D7)
int d0 = D0;
int d1 = D1;
int d2 = D2;
int d3 = D3;
int d4 = D4;
int d5 = D5;
int d6 = D6;
int d7 = D7;
void setup() {
pinMode(d0, OUTPUT);
pinMode(d1, OUTPUT);
pinMode(d2, OUTPUT);
pinMode(d3, OUTPUT);
pinMode(d4, OUTPUT);
pinMode(d5, OUTPUT);
pinMode(d6, OUTPUT);
pinMode(d7, OUTPUT);
}
void loop() {
digitalWrite(d0, HIGH);
digitalWrite(d1, HIGH);
digitalWrite(d2, HIGH);
digitalWrite(d3, HIGH);
digitalWrite(d4, HIGH);
digitalWrite(d5, HIGH);
digitalWrite(d6, HIGH);
digitalWrite(d7, HIGH);
}
I have never used this Photon before it’s brand new out of the box. Never connected anything to any PINs except on output for PIN D0 was expecting around 3V.
All D0-D7 PINs output 1.35V exact and same goes for the 3V3 PIN none of the PINs safe for the D0 were ever touched.
it was the USB power cable that or the fact I was using GND of the L289N when testing voltage on the pin. When I put my clamp on D0 pin and on GND of the Photon it shows 3.3V but when I put GND on the L289N GND it see only 1.35V not enough to enable the driver/motor. I do hear a buzzing sound from the motor tho.