### Módulo Relé USB SainSmart 16-Canais 9-36V
O Módulo Relé USB SainSmart 16-Canais 9-36V é uma solução inovadora e versátil para quem busca controle preciso e eficiente de dispositivos elétricos. Este módulo é uma placa de relé controlada por USB, equipada com 16 relés SPDT (Single Pole Double Throw) que oferecem uma ampla gama de aplicações em automação residencial e projetos de robótica. Com a capacidade de operar em tensões de 9 a 36V, este módulo é ideal para acionar luzes, motores DC, solenóides e outros dispositivos elétricos de forma simples e eficaz.
A principal vantagem do Módulo Relé SainSmart é sua capacidade de realizar comutação ON/OFF de maneira confiável, permitindo que você construa projetos complexos com facilidade. A isolação óptica dos relés garante segurança e proteção contra picos de tensão, tornando-o uma escolha segura para aplicações sensíveis. Além disso, a interface USB facilita a conexão com computadores e microcontroladores, tornando a integração em sistemas de automação ainda mais simples.
#### Instruções de Uso:
Para utilizar o Módulo Relé USB SainSmart, siga os passos abaixo:
1. Conecte o módulo a uma fonte de alimentação compatível (9-36V).
2. Utilize um cabo USB para conectar o módulo ao seu computador ou microcontrolador.
3. Instale os drivers necessários, se aplicável, para garantir que o dispositivo seja reconhecido pelo sistema.
4. Utilize um software de controle de relé ou desenvolva seu próprio código para enviar comandos de ativação e desativação aos relés.
5. Conecte os dispositivos que deseja controlar aos terminais de saída dos relés, respeitando as especificações de tensão e corrente.
#### Características do Produto:
– Número de Canais: 16 relés SPDT.
– Tensão de Operação: 9-36V DC.
– Isolação Óptica: Protege os circuitos de controle contra interferências e picos de tensão.
– Interface USB: Conexão fácil e rápida com computadores e microcontroladores.
– Compatibilidade: Funciona com diversos sistemas operacionais e plataformas de desenvolvimento.
– Dimensões: Compacto, ideal para integração em projetos de automação.
– Capacidade de Carga: Cada relé pode suportar até 10A a 250V AC ou 30V DC.
### Perguntas Frequentes (FAQ):
Pergunta: O que é um relé SPDT?
Resposta: Um relé SPDT (Single Pole Double Throw) é um tipo de relé que possui um terminal comum e dois terminais de saída, permitindo que você escolha entre duas conexões diferentes.
Pergunta: Posso usar o módulo para controlar dispositivos de alta potência?
Resposta: Sim, desde que você respeite as especificações de carga de cada relé, que suporta até 10A a 250V AC ou 30V DC.
Pergunta: O módulo é compatível com Arduino?
Resposta: Sim, o Módulo Relé SainSmart é amplamente utilizado com Arduino e outras plataformas de microcontroladores, facilitando a automação de projetos.
Pergunta: Preciso de drivers especiais para usar o módulo?
Resposta: Dependendo do sistema operacional, pode ser necessário instalar drivers específicos para garantir a comunicação adequada entre o módulo e o computador.
Pergunta: Como posso proteger o módulo contra sobrecargas?
Resposta: É recomendável utilizar fusíveis ou disjuntores adequados no circuito para proteger o módulo contra sobrecargas e curtos-circuitos.
Art Bowman –
Baud rate is 9600, no driver required for linux. The hex commands that worked for me are found at
https://s3.us-east-1.amazonaws.com/s3.image.smart/download/101-70-208/101-70-208.zip
inside that zip file from the manufacturer is a pdf, 16CH_USB_Relay_Instruction-EN.pdf that has all the commands. Formatted terribly so I can’t just simply paste it here.
Water Dog –
good
Carl Rash –
To control this in python, convert their spreadsheet values from hex to decimal. Excel and office libre has a built in function hex2dec. Put the corresponding row of decimal values separated by commas into a bytearray, then send to serial. Upgraded to 5 star. Been using this thing for a few years to control a semi automatic homebrew system. Once I figured out how to code for it, it was super simple to use. I like that I can control it over usb, was the big selling point. Got it connected to a raspberry pi on a touch screen.
James W. Luff –
I’ve only run some test on it because the project it goes in is still a work in progress. But it works fine. I downloaded the software and seems pretty straight forward. Looks like it’s going to be just what I needed.
TC –
Funcional y robusta
James Richters –
No documentation came with this, but I managed to find enough information to get it to work on the SainSmart website. I wanted to use it to control some penumatic valves. I noticed that occasionally one of my commands would be ignored, and after some testing I found that there seems to be a flaw in its firmware that will cause it to miss commands if you give the commands too fast. This device is very slow anyway, it only seems to work at a baudrate of 9600 which is much slower than other USB relays. This would have been fine for my application as I only need to switch the valves every few minutes, but the problem is I need to issue a command to close one and open another back to back, and the only way I could get it to perform reliably was to put a rather long delay after every command, which made this useless for my application. I ended up using two separate 8 channel USB relays by a completely different manufacturer.
Leonard D Nelson –
I purchased two of these cards. Overall this relay is marginal at best and probably not worth the trouble for most people.
Overall good:
– Low price
– 16 channels 1 board
– No ‘daughter board’ for the USB host module
Overall bad:
– No HID compatible software support, no provided drivers for linux, very little documentation
– The status command doesn’t return anything, which I think would be a key software feature is to check what we think the relay is doing with what the board says the relay is doing.
– One of the board makes a whining noise when contact is closed
– Tough one for me: there is no hardware level serial number, which means we can’t really guarantee we can keep multiple boards addressed properly. There are potentially ways around them, but none of them come without cost and complexity.
– No ‘plug style’ 12v power in like the Knacro 8-channel relay I found on amazon that worked nicely. You have to put in a spliced power chord into screw terminals.
The board itself seems sturdy but there seems to be a persistent whine while in the ‘on’ state once I got them working (after multiple hours of nonsense trying to figure out how to get moving).
It isn’t supported by most of the major type of relay drivers (such as usbrelay on linux or ondrej1024’s excellent relay driver application on github), or even compatible with the other HID type 16 channel relays that Sainsmart also sells. It isn’t obvious on the website, but I was finally able to get this to work using a python script I found on github using the serial commands from the Sainsmart Wiki page. Amazon doesn’t allow us to post external links in their policy, which is quite frustrating since they profit from this type of poor product with poor documentation. Anyway if you search for RJ QinHeng Electronics HL-340 on gitgist, you can see some code that might help if you use python and pyusb, or mine that I posted (username ldnelso2 on github).
My first clue was the device type not being the same as the other sainsmart boards:
Device Type:
QinHeng Electronics HL-340 USB-Serial adapter
Then I found the serial commands to send by copying and pasting from the serial communication document I found here (which isn’t obvious from the sainsmart website). Again, Amazon’s policy won’t allow me to post the link so you will have to search for it by the SKU and find it.
You have to add ‘0x’ for hex command sending in the script since you are sending hex over USB , thus in the python script you can define them:
# Sainsmart 16-channel commands to modify RJ’s python script from the above gitgist link:
op_all = [0x3A, 0x46, 0x45, 0x30, 0x46, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x30, 0x32, 0x30, 0x30, 0x30, 0x30, 0x45, 0x31, 0x0D, 0x0A]
cl_all = [0x3A, 0x46, 0x45, 0x30, 0x46, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x30, 0x32, 0x46, 0x46, 0x46, 0x46, 0x45, 0x33, 0x0D, 0x0A]
c6_on=[0x3A, 0x46, 0x45, 0x30, 0x35, 0x30, 0x30, 0x30, 0x35, 0x46, 0x46, 0x30, 0x30, 0x46, 0x39, 0x0D, 0x0A]
# and so on. . .
Like the other reviewer mentioned, it might be easier to convert the serial commands to decimal from hex and send those, depending on what you are trying to do.
So, basically, this card is not worth all the hassle! Go ahead and spend the extra $20 or so and buy a Denkovi USB board. Much better, and way better software, support, and documentation.
Carl Rash –
The input capacitor should have been a 220uF 50V capacitor. It needed to withstand voltages greater than the 36V the board is rated for. It was a 470uf 16V capacitor. When the board was stuffed, they swapped the two electrolytic capacitors. C9 was installed in place of C10 and vice versa. C9 blew up in less than one minute with 24VDC applied to the input. The switch mode buck regulator failed because of the wrong output filter capacitor. I purchased one board for work and one for personal use, I will repair the one that has not yet been powered on and return the damaged one for an exchange. I will fix it when I receive it. When I first powered it up, I noticed too much input current, so I backed the voltage down to 10VDC. I like how it works, and the Python example provided on the website works perfectly. Also, do not try to power the board from a PC USB port. Remove the jumper P19 and use an external supply to avoid possible damage to your PC USB port. It works well if built properly, this is the reason for the 3 stars.
Benjamin D. Man –
Used a lot of Sainsmart relay products, this one works and will work for most people, but one warning if your using it for a high speed switching environment it is very slow compared to the old HID controller board version. The protocol could be much better for latency, but it is what it is. If you just need to turn a bunch of stuff on and off then this is great. if your switching stuff and expect 100ms or less latency then this is not your product.
Amazon Customer –
Seems to work. Haven’t connected anything to the relays or used the external power supply yet. Only got as far as writing a LabVIEW vi to control it.