Automated roller blind schematic(correct or faulty?)

Hello Arduino folks!
I am doing an Automated roller blind project and my next step in the project is to use an Arduino Nano instead of an UNO and the second thing is to get it “online” via an ethernet breakout module (ENC28J60).
I have ordered my parts and I’m just waiting for them, However. I need some help to see if my schematic is working or if it’s full of misstakes and errors 'cause I lack some basic electronic knowledge.
Thank you guys!

rollerblind.png

Anybody out there who can confirm my schematic is correct? (:

Servo looks good, the signal wire will have to be one of the output pins that supports PWM. The Nano also looks fine.

Which ethernet module are you using specifically. I couldn't specifically tell you if your wiring is correct without the exact module. But it will receive 3.3V with your current setup and with SPI you have 4 wires: MOSI, MISO, SCK, and CS.

You will have to do logic level translations on the SPI data lines if you are not using a 3V3 Nano.

You will have to do logic level translations on the SPI data lines if you are not using a 3V3 Nano

Excellent point. I have seen ENC28J60 breakout boards that have 5V tolerant pins, but don't assume yours does, definitely checkout the datasheet.

wes000000: Servo looks good, the signal wire will have to be one of the output pins that supports PWM. The Nano also looks fine.

Which ethernet module are you using specifically. I couldn't specifically tell you if your wiring is correct without the exact module. But it will receive 3.3V with your current setup and with SPI you have 4 wires: MOSI, MISO, SCK, and CS.

Alright thank you, the Ethernet module is ENC28J60 and now I'm quite sure of the fact that it's SPI I'm going to use.

Grumpy_Mike: You will have to do logic level translations on the SPI data lines if you are not using a 3V3 Nano.

Ooh, that's right but I could solve it pretty easy right if I just hook up the nano to the 3.3V like the END28J60? Or should I use a logic level convertter 'cause I have on of those at home and I believe they're pretty simple. Connect 5V, 3.3V and GND. To it and then the data wires. Can you find in the datasheet if it's 5V tolerant?

but I could solve it pretty easy right if I just hook up the nano to the 3.3V like the END28J60?

Only if your Nano runs at 8MHz. You need four logic lines for SPI three out and one in.

Grumpy_Mike:

but I could solve it pretty easy right if I just hook up the nano to the 3.3V like the END28J60?

Only if your Nano runs at 8MHz. You need four logic lines for SPI three out and one in.

Alright is that because the nano and the Ethernet module has to run on the same frequency? But I can set it to 8MHz pretty easy right, in the arduino environment when you select boardtype? Soo if that doesn't work I have to get another logic level converter. But hey, if I Use a logic level converter why doesn't the nano need to be at 8MHz then? I forgot that I just read in the datasheet that the data in pins on the Ethernet module is 5V tolerant. That solves the conversion problem but I don't really understand all about the frequencies? Thanks!

No you can’t set the speed to 8MHz by using software it is defined by the crystal on the board. The settings in the software only compensate for the crystal frequency they don’t control it.
The two systems can run at what ever speed they like. While the Ethernet board might be tollerent of a 5V input it will only give you a 3V3 output, while it might work it is outside the specification for an input logic one for the inputting arduino chip.

Grumpy_Mike: No you can't set the speed to 8MHz by using software it is defined by the crystal on the board. The settings in the software only compensate for the crystal frequency they don't control it. The two systems can run at what ever speed they like.

So I don't have to care about the speed you say?

Grumpy_Mike: While the Ethernet board might be tollerent of a 5V input it will only give you a 3V3 output, while it might work it is outside the specification for an input logic one for the inputting arduino chip.

Yes I understand that the ethernet module can handle a 5V signal in and that it sends a 3.3V signal(when high). But doesn't the Arduino Nano have a threshold of like 1,5 V for detecting a logic one/High?

But doesn't the Arduino Nano have a threshold of like 1,5 V for detecting a logic one/High?

No. The data sheet shows for a 5V powered device it is 3.5V

Grumpy_Mike:

But doesn't the Arduino Nano have a threshold of like 1,5 V for detecting a logic one/High?

No. The data sheet shows for a 5V powered device it is 3.5V

Hmm.. that sounds like trouble to me. How am I gonna solve this problem? I thought that it would work 'cause I read a (Russian) tutorial from a guy that had connected an Arduino Nano and an ENC28J60 module and it seemed to work. So the only solution is to get a logic level converter? I mean this sounds really weird to me, that an Arduino Nano can't do SPI communication with a 3.3V device :/ I've also read that the logic one for the ATmega328 chip is 0.6 * VCC so if I supply it with 5 or 7.5 Volts it's too much but 3.3 V would work, isn't this correct? Thanks for your help!

That is the minimum value for a logic one not the maximum. The maximum input voltage can be anything up to 0.6V above the supply voltage. Yes it could still work at these voltages, I never said it would not, I said it was out of spec so it is not garenteed to work.

Grumpy_Mike:
That is the minimum value for a logic one not the maximum. The maximum input voltage can be anything up to 0.6V above the supply voltage.
Yes it could still work at these voltages, I never said it would not, I said it was out of spec so it is not garenteed to work.

I see what you mean, it might work but it’s not guaranteed at all.

I just remembered that I got a Logic level converter laying around so I’ll probably use that one to convert the signals 'cause it’s able to convert four wires.
I’m just wondering how i should wire the Arduino Nano to the logic level converter to the ENC28J60? :confused: I’m not so familiar with SPI.

We got four wires right?
SCLK - Serial clock (One way communication, only sends information to the slave?)
MOSI - Master(arduino nano) Output, Slave(ENC28J60) Input
MISO - Master(arduino nano) input, Slave(ENC28J60) output
SS - Slave Select(If pulled low the arduino is the master right?)
Soo according to this picture of the logic level converter the wiring should look something like this if i consider the fact that only 2 of 4 input/ouput of the converter can send information in both directions.
Arduino SCLK → Logic level converter RXI Pin → ENC28J60 SCK
Arduino MOSI → Logic level converter TXO pin → ENC28J60 ENC SI
Arduino MISO → Logic level converter TXO pin #2 → ENC28J60 ENC SO
Arduino SS(is this a special pin?) → Logic level converter RXI Pin #2 → ENC CS
Is this correct?

According to this picture of the logic level converter I choose the right pins of the LLC. Do you think that would work?
thank you guys!

That board has two passive converters and two active ones. The passive ones are simply resistors to cut down the voltage so they should be used for the 5V system's output going into the 3v3 system's input. The other two are active and can be used either way round. These were designed for I2C where there is bi-directional communication between two systems on the same pin. With SPI the communication only goes in one direction but what you have will work fine. Hope that helps.

Grumpy_Mike: That board has two passive converters and two active ones. The passive ones are simply resistors to cut down the voltage so they should be used for the 5V system's output going into the 3v3 system's input. The other two are active and can be used either way round. These were designed for I2C where there is bi-directional communication between two systems on the same pin. With SPI the communication only goes in one direction but what you have will work fine. Hope that helps.

Terrific! Thanks for the help, it will take a couple of weeks for me get the stuff from China but as soon as I got them and I'm up and running I'll update you on the progress! Thanks again!