Mosfet with Ceech board



  • Hello,

    I would like to use the mosfet of the Ceech board: ATmega328p board w/ NRF24l01+ socket LTC4079

    In the doc is indicated that it is wired do digital 3.
    I have modified the "blink without delay" sketch

    const int MOSFET = 3;
    int loadState = LOW;
    unsigned long previousMillis = 0;
    const long interval = 2000;
    
    void setup() {
      // put your setup code here, to run once:
      pinMode(MOSFET, OUTPUT);
      digitalWrite(MOSFET, HIGH);
      Serial.begin(9600);
    }
    
    void loop() {
      unsigned long currentMillis = millis();
    
      if (currentMillis - previousMillis >= interval) {
        // save the last time you blinked the LED
        previousMillis = currentMillis;
    
        // if the LED is off turn it on and vice-versa:
        if (loadState == LOW) {
          loadState = HIGH;
        } else {
          loadState = 0;
        }
    
        // set the LED with the ledState of the variable:
        digitalWrite(MOSFET, loadState);
        Serial.print("state: ");Serial.println(loadState);
    
      }
    
    }
    

    I don't understand how it works, I have tried to measure continuity with a voltmeter, I have tried to wire a led between vcc, cuting the gnd with the mosfet without success.

    Does anyone would be explain how I can use it ?
    Ceech board with led

    I would like to make an electrical barrier to protect my beehive from vespa velutina using a mosquito racket :
    Racket

    alt text

    vespa velutina


  • Mod

    @Jodaille without looking at schematics I'd say you will kill/have killed the led if you don't put a current limiting resistor (few hundred ohms) in series with it.


  • Hero Member

    You need to connect the LED (+resistor) like this:

    • Positive: Vcc Pin
    • Negative: The pin with the orange/brown wire in your picture.
      the mosfet onboard is N-channel, so it will switch the negative (GND) line.


  • Hello @Yveaux, hello @rvendrame: thank you.

    the led is still alive 🙂

    With the sketch , I can see the led blinking if it is wired between gnd and d3.

    @rvendrame I should miss something because the led stay off with your instructions.

    Maybe @ceech will see this my SOS 🙂


  • Hero Member

    @Jodaille , it works for me, when wiring the led between Vcc and the non-named pin where you put that orange (or brown?) wire. There is where I found the MOSFET N-channel drain is connected.

    alt text



  • Thank you @rvendrame ,
    it works, I attach a Ceech's schema, using D4 instead of D3 🙂

    0_1495557725819_AstriArista_mosfet.png


Log in to reply
 

Suggested Topics

  • 87
  • 7
  • 2
  • 7
  • 5
  • 6

14
Online

11.4k
Users

11.1k
Topics

112.7k
Posts