High Voltage Forum

General electronics => Printed Circuit Board => Topic started by: RocketScienceSmurf on April 25, 2017, 07:41:52 PM

Title: Arduino IO-shield
Post by: RocketScienceSmurf on April 25, 2017, 07:41:52 PM
This will probably we a very long thread. I had originally planned to make an Instructables presentation for this board but realized I will never do that so instead I thought I'd just share it with you.

I have been tinkering with the arduino for a few years but every time I get an idea I would like to try I felt that I always had to start all over again from square one so I decided I would make some kind of labb shield that contained most of the stuff I needed to get started right away. I will try to divide the board into different sections and explain what each section does and why I chose to make it the way I did.

The board itself is made from the cheapest expresspcb-board available, the so called https://www.expresspcb.com/miniboard-standard/ (http://MiniBoard Standard) and I tried to squeeze in as much as I could, taking advantage of the double sided manufacturing capabilities. The bottom side of the board is basically just a huge ground plane.

Apart from the pin headers for the arduino there is also room for screw terminals in case you would like to make better connection to something else externally.

The silk screen is not intended to be used and I used the top copper layer instead to print text to the board, but one should desire a more professional look, using the silk screen layer it is easy to move the text to that layer instead.
Title: Mosfet
Post by: RocketScienceSmurf on April 25, 2017, 07:53:44 PM
At the top of the board there is (apart from input terminals for supply voltage) a TO-220 mosfet with a mosfet driver. I used a http://www.microchip.com/wwwproducts/en/MCP1407 (http://MCP1407) but there are several other suitable and pin compatible mosfet drivers available. I chose to use a proper mosfet driver because I think that 5V logic is not suitable for driving a mosfet transistor. The microcontroller can not handle the large capacitive load so you have to use a resistor between the MC and the mosfet, leading the mosfet to not switch as fast as it can do when properly driven and also not fully turn on causing unnecessary heat. The mosfet driver also let me choose almost any mosfet I wanted so I used a http://www.infineon.com/cms/en/product/power/mosfet/20v-300v-n-channel-power-mosfet/40v-75v-n-channel-power-mosfet/IRFB7446/productType.html?productType=5546d462533600a401533d35d9f22322 (http://IRFB7446)

As input I used a 2x2 pin header that is pulled down by a resistor to ground before entering the mosfet driver. There is also room for a beefy MUR420 diode to protect the mosfet transistor. The output also has a LED, connected through a Supertex CL2 20mA led driver making sure that even if I use 12V or 24V for the mosfet, the LED never receives more than 20mA.
Title: i2c
Post by: RocketScienceSmurf on April 25, 2017, 08:09:05 PM
Moving down there is a buffered i2c-bus connected to a RJ45 connector. I have not started using this yet, but I wanted a properly buffered i2c bus capable of using long network cables up to ~10m. The i2c buffer intended to be used is the http://www.ti.com/product/P82B96 (http://www.ti.com/product/P82B96) available in a 8PDIP package. Since I have not yet begun using this buffer I can't say much about it really. There is also a 8PDIP space for the pull up resistors required for both the un-buffered side of the bus as well as the buffered. Resistor values especially on the buffered side will have bo be carefully selected depending on the bus capacitance and the frequency used. Normally the bus frequency is 100kHz or 400kHz but when using longer cables one might need to lower it even further than 100kHz.
Title: LED array
Post by: RocketScienceSmurf on April 25, 2017, 08:15:04 PM
The large section in the middle is just an array of LEDs connected either through Supertex CL2 or a suitable resistor (usually around 330 Ohm for 5V supply voltage). There is a large 2x10 pin header for connecting each led and also be able to connect the signal to something more on the board.
Title: Potentiometer
Post by: RocketScienceSmurf on April 25, 2017, 08:23:51 PM
Just under the pin header for the LEDs, there is a small potentiometer http://se.farnell.com/bourns/3310y-001-503l/potentiometer-50-kohm/dp/9354000 that can be used for whatever you may want. It is connected via a jumper to A0 and 5V. I used a 50k linear but anything similar will work just fine.
Title: Pull down
Post by: RocketScienceSmurf on April 26, 2017, 07:34:15 PM
In the bottom left side of the board there is a 14 pin DIL socket for pull-down resistors. The reason I wanted them easily exchangeable in this kind of module is that sometimes I want to measure a DC level of up to 5V and sometimes I use 4-20mA current loops instead, requiring a low resistor value (I typically use 0.1% 249 Ohm film resistor)
Title: Optocoupler
Post by: RocketScienceSmurf on April 26, 2017, 07:44:38 PM
Next to the pull down resistors there is an optocoupler with a CL2 to limit the current to 20mA regardless of the input voltage. In my case, using a https://www.broadcom.com/products/optocouplers/industrial-plastic/digital-optocouplers/100kbd/hcnw139 20mA is the absolute maximum rating meaning that it will not last very long, but it is fairly easy to replace and I will probably only use it for pulses anyway. The recommended maximum forward current for this optocoupler is 12mA. There is a screw terminal input and 2x2 header output. The optocoupler circuit is inverting, meaning that when a signal is present at the input is pulled down to ground.
Title: Reset
Post by: RocketScienceSmurf on April 26, 2017, 07:47:24 PM
Moving upwards again there is a reset button just above the optocoupler. Nothing fancy, just an easily accessible push button to reset the arduino.
Title: External voltage reference
Post by: RocketScienceSmurf on April 26, 2017, 07:55:09 PM
Slightly above the reset button and to the right there is a socket for en external voltage reference, like the http://www.ti.com/product/LM4140 . I sometimes use 1.023V voltage reference when using the http://www.ti.com/product/lm35 temperature sensor. It makes the math so much easier since 10mV equals 1 degree Celsius. Of course you can use other types of voltage references as well as long as they are pin compatible.

When using an external voltage reference with the arduino it is important set the analog reference to EXTERNAL BEFORE calling analogRead()

https://www.arduino.cc/en/Reference/analogReference
Title: Logic analyzer
Post by: RocketScienceSmurf on April 26, 2017, 08:05:05 PM
To the right of the aref-circuit there is a connector intended for a logic analyzer. It is not connected to anything else on the board and the idea is to be able to connect pretty much anything on the board itself via jumper wires to the logic analyzer.
Title: Expansion
Post by: RocketScienceSmurf on April 26, 2017, 08:10:37 PM
Finally on the left side there is a multi purpose expansion port for all imaginable types of trinkets available on ebay etc. There are two jumpers, one on each side for connecting the outer pin directly to ground. I have noticed that some cards use the pin on the far right as ground, and some the far left so I wanted to be able to choose which one I needed for the moment without having a jumper wire going to ground somewhere.

Examples of board to use here are:
SD-card-reader
GPS-receiver
IR-motion sensor
Rotary encoder
etc. etc. etc.

There are tons of different boards that use a maximum of 6 pins and that have ground located on one of the sides.
Title: Pictures
Post by: RocketScienceSmurf on April 26, 2017, 08:23:39 PM
Here are some pictures of the board, both un-populated and finished
Title: Re: Arduino IO-shield
Post by: Mads Barnkob on April 28, 2017, 07:45:51 PM
A lot of great thoughts have been put to the design of this, you really got around to include many house keeping circuits to ensure correct voltages, enough drive current and protections.

The standard board from expresspcb is double sided, what do you have on the other side? Just a ground plane?

Back in 2010, I made myself a "devkit" for a ATMEGA32 where it had 8 LEDs for simulated outputs, a 2x16 LCD, 4 buttons and a potentiometer. That has long since been over taken by the arduino scene :)

It was a project for making a LCD and voltage/current controller for a tube amplifier I have built, that I could take with me when I was on business travels, only required external power and programmer to the PC. Long story short, I stopped travelling so much and the amplifier is just lacking that final touch before its done, but the controller is not yet ready.
Title: Re: Arduino IO-shield
Post by: RocketScienceSmurf on April 30, 2017, 10:30:09 AM
Yes the back is basically just a ground plane, however the back of the portion that makes up the entire mosfet and power supply section is a positive plane and NOT ground. I haven't done it yet but I plan to solder a ceramic capacitor between those planes to help the mosfet driver perform to it's full potential.
SimplePortal 2.3.6 © 2008-2014, SimplePortal