View Single Post
Old 02-02-2019, 05:23 PM  
mlwinters
Newborn Pup
 
Join Date: Jul 2017
Location: Cornwall, UK
Posts: 39
Default Re: My Medium Sized DIY Cage

Hey everyone, firstly I must apologise for the lack of updates to this page for such a long time. I have been battling with personal issues and have not been up to posting much content to the internet recently. I hadn't realised until I loggged on here tonight just how long its been since I last posted an update. Again sorry about this.

Anyways, in this update I am going to show you the second of four custom made circuit boards fitted to Archimedes's cage. This is the switch board the controls the cage lighting, system cooling fan and two other things that will be detailed on later posts. This is the third version of this switch board I've made, the first version that was originally fitted to the cage used mechanical relays to switch the lighting, this worked fine but due to the way relays work (basic relays have four pins, two coil pins and two switch pins, when you energise the coil, it creates a magnetic field which attracts a metal plate towards the coil which shorts the two switch pins closing the circuit), there was an audible click whenever the relay was turned on or off, relays are also only able to be switch on or off and at very slow speed.
The second version of the switch board I designed used the transistors I showed in my last update ended up being a failure is I didn't take into account that when I remade the lighting bars, I used a common ground wire (all LED's were connected to the same neutral wire) instead of using a common positive wire. I therefore had to redesign the switch board again to have both NPN and PNP transistors on each switch channel. This added an extra layer of complexity to the switch board.

Cage Switch Board 1.jpg
This is a photo of the finished MkIII switch board after electrical tests and energised tests were complete taken just before installation.

Cage Switch Board 2.jpg
Here is the underside of the switch board. I tried to keep as much of the circuitry on the top side as possible to help you see how everything is connected together.


Cage Switch Board 1 Label.jpg
This image is the a labeled version of the first image showing the different parts of the circuit board.

Starting from the bottom left, we have a PCB terminal block labelled "5VDC Power Input" which provides power from Output 2 on the power supply board detailed in my previous post to the switch board itself, power for the relay on the right hand side of the switch board as well as the temperature sensor and one other device which will be shown in a later post.
The "I2C" header is for data wires from the temperature sensor and the "Serial" header is for the data wires to the other device. The I2C and serial pins on the system controller connects to "Header 2" via wires and then to the PCB terminal block. Connecting the temperature sensor and the other device to the switch board allows to everything to be connected to one circuit board instead of each device being connected to different places and makes it easier connect/disconnect devices when needed.

"Header 1" is where the controller plugs into to switch channels 1 through 7. Pin 2 of "Header 1" (counting from left to right) connects through a 10000 ohm (10kΩ) resistor which then connects to the base or switch pin of channel 1's NPN transistor. The output or emitter pin then connects to the base pin on the PNP transistor via a 1000 ohm (1kΩ) resistor. The output pin of the PNP transistor is then connected to the PCB terminal block at the top of the circuit board. When channel 1 is switch by the system controller, it causes the first transistor to switch on which causes the second transistor to switch on, this will then switch on the cage lighting. The happens moreless at the speed of light (188,000 miles per second) so there is no delay between the system controller turn switching the channel on and the LED's turning on.
Channels 1 through 6 are wired in the NPN-PNP way. Channel 1 and channel 3 also have a extra PNP transistor to allow for a later addon to the system.
Channel 7 is moreless the same as all channels where on the MkI switch board, the big white block is a 250VAC 3 Amp relay for a later addon. Channel 7 only have a single NPN transistor but it has a 1N4004 diode with a reverse voltage of 400V. This protects the rest of the circuitry incase the relay fails in such a way that causes 230VAC mains voltage to go through the coil of the relay that could lead to a major failure of the whole system and a possibly a fire.

Below is what is connected to each channel:
Channel 1: White cage lighting
Channel 2: Red cage lighting
Channel 3: Other colour cage lighting
Channel 4: System cooling fan
Channel 5: Reserved for a later addon
Channel 6: Spare channel
Channel 7: Mains voltage relay for a later addon

As I mentioned above, I decided to replace the old relay board with this transistor board to eliminate the audible click from switching the cage lighting on/off but it also allows me to fade the cage lighting up and down with a method called PWM instead of the lighting either being on or off. This helps to prevent Archimedes being blinded when I turn the white lights on at night time. PWM stands for Pulse Width Modulation, its a way of getting an analog signal from a digital controller. PWM pulses the output between 0% and 100% (in this case, 0 volt and 3.3 volt) so quickly that the eye it tricked into thinking the output, for example an LED, is being dimmed or faded. See this link for a more info on PWM.
The speed of the system cooling fan is also controlled via PWM and the maximum speed of the fan will depend on the room temperature, the warmer the room is, the faster the fan will spin. When the room temperature is below 20°C, the system cooling fan is turned off completely.


As a side note, since completing this swich board I have also reduced the voltage of Output 3 on the power supply board from 10 volt down to 6 voltage which is the same voltage as 4 AA batteries wired in series. Doing this has reduced power consumtion of the cage lighting and made the electrical wiring inside the cage (contained within plastic trunking) a little safer. Archimedes has never crewed the trunking but this reduction helps make it safer incase he does. Lowing the voltage of Output 3 to 6 volt also reduces the amount of light that the cage lighting LEDs emit but still allows the cage to be lit nicely and is enough for the system cooling fan to start and move enough air to keep the power supply cool.


Again sorry for lack of posts
recently and sorry for another big update.
Take Care
Morgan + Archimedes

Last edited by mlwinters; 02-02-2019 at 05:34 PM.
mlwinters is offline   Reply With Quote