OLLYDOTDEV / Project-Birdseye-DTX-2020

The initial plan is to create a device that is made for the sole purpose of a Preemptive Security system for People who work with Confidential/Private Information and need to work on potentially more public places where one cant Guarantee fully secure/discrete room. My Approach to solving this is with a wireless computing node That Takes Sensor data from a variety of senses. Then the Data from the Senses is taken then and processed to determine whether there is a security breach if so then it will Relay that info over to the Raspberry Pi W that then Emulates an HID (Human interface device) Using the P4wnP1_aloa made by mame82 to Execute a custom user-defined action that will be set via Apache server hosted of the Raspberry Pi W Communicating From a web interface back to the purchase server utilizing Ajax
GNU General Public License v3.0
3 stars 1 forks source link

RGB Interface #5

Closed OLLYDOTDEV closed 4 years ago

OLLYDOTDEV commented 4 years ago

As an engineer this part of the IO Dedicated to sending signals to the LED on external PCB needed It is Impractical to LED's mounted directly on the main PCB and still has the LED display on the outside on the Protective case.

OLLYDOTDEV commented 4 years ago

The initial plan was for the display LEDs to be located directly on the main PCB it was later decided that due to design restrictions it would be unlikely that you would be able to see the LEDs if they were located on the main PCB server the decision was made to make a secondary PCB to how's the display LEDs that can be repositioned to the desired location when the case design is decided in #20

OLLYDOTDEV commented 4 years ago

so with having an addition atmega328p on the secondary PCB (now called LC_Board) To due lack of pins on the main atmega328p (for more info see #6 ) this atmega328p I have it dedicated to just controlling these lights and communicate via serial protocol back to R.O.M.S

OLLYDOTDEV commented 4 years ago

Due to LC_board operations on 3.3v and the ROMS runs on 5v so when communicating over serial communication (TX and RX) pins on the used for this communication happen to also operate at the corresponding Voltages for each board. so I am going to need a real-time conversion unit eg something like [this](A Bidirectional Logic Level Converter (for I2C)) how they work explained here Sparkfun does provide a datasheet on how there Bidirectioal logic level converter would work as seen in the image below 000018_Selection

OLLYDOTDEV commented 4 years ago

In short how this work is frankly awesome

If you have 5v on the high end the then with the MOSFETs VGS being 0v (as both G and S are sitting at 3.3v there for no difference ) then the low will be pulled high and the low signal will be received as high but if the High was sitting at 0V then the MOSFET would turn on and the current would flow from low to high, and due to the fact that 3.3 is still counted as a logic high

000019_Selection

Sure I Could I have you something like a dedicated chip with a 4-bit bus like a TXB0104

but the parts needed Logic Level Converter are also used in the rest of my project means that I happen to have his parts already on hand for when I do create it. So rather than being required to purchase another component, I could just use the surplus of my other components to achieve the same endpoint.

What is needed is a n channel MOSFET and a some 10K resters

OLLYDOTDEV commented 4 years ago

First I needed to fix my eagle library for my MOSFET. This MOSFET .lbr from the git repo that I sourced it form as there where some labels that were missing on the n channel MOSFET

000020_Selection [before]

Here the pins are not labeled. To make this easier on myself so that I don’t have to keep working what pins are what. So here is the edited version

000021_Selection [after]

I didn't need to do this for the p-channel MOSFETs as they were all readily labeled on the Schematic 000022_Selection

OLLYDOTDEV commented 4 years ago

As for how the atmega328p on Roms will talk to the atmega328p on LC_Board we can look at how Arduino's use with serial communication.

The RXD of the left PCB to the TXD of the right PCB
The TXD of the left PCB to the RXD of the right PCB

seen here 000023_Selection

to starting of making the IO for the LC_Board

000024_Selection

After Retrospect the IO needs a reset line for when hooking up my if FTDI chip (FTL232RL)for when I am to upload the program to the atmega328p chip. But that's why I added a 2BD(to be decided) pins Here is an image of the FTDI chip hooked up to an Arduino mini pro

000025_Selection

So for my project this FTL232RL will connect to this pinouts

Here is CTS ,DTR ,BLK ,GRN. So before I continue, I am working out that these are. So after talking with some people, it turns out that BLK & GRN if literally the color wire in the FTDI cable there are used for transmitting CTS and DTR data. CTS and RTS is used for a flow control, this is used for sending a high singal when the device is ready to receive more data but in my used case that is not needed.

CTS is ‘clear to send’ [this pin it not needed] RTS is ‘ready to send’ [this pin is not used]

DTR is used for sending the reset signal to reboot the atmega328 chip once code has been uploaded

So here is my updated IO for the LC_Board Git[updated io] 000026_Selection

OLLYDOTDEV commented 4 years ago

Added the reset in pin and also rearrange the layout so that it is a better match FTDI adapter. 000027_Selection

Here I have haded the two headers for switching the input of RDI from being progressed as a 5v signal (jumper 2-1) on the left side and jumper (3-2) on the right. Whereas for 3.3v RDI input signage you want to put the jumper on the left (2-3) and on the right (1-2)

This is needed as the FTDI adapter will output an RDI of 3.3v. Were as the ROMS board will send a RDI of 5v that need to be converted to a 3.3v RDI before going to the Atmega 328p I have talk about how this will be done here

OLLYDOTDEV commented 4 years ago

It should be noted that for LC_Board to run at 3.3v it will need to disable the brown out so what if doesn't to a chip force shutdown. http://www.engbedded.com/fusecalc/ lets you work out what to change.

OLLYDOTDEV commented 4 years ago

With my change in plan as seen https://github.com/OLLYDOTDEV/Project-Birdseye-DTX-2020/issues/6#issuecomment-644453770 The interface will be changed to account for a new io to control the shift register

OLLYDOTDEV commented 4 years ago

the changes that will be to be made for this interface are not to major as Shift Registers only need three pins for data (DS, ST_CP, SH_CP) and one 5v and GND. for the RGB I will still need 3.3v for it so I will keep it simply and use a level shifter make out of a 2K and 3k R resistor

OLLYDOTDEV commented 4 years ago

To start it is work reading this first. So with having the Shift Register in the LC_Board Schematic I am now about to see what Ports I need to use.

2020-06-17 11_01_51-1 Schematic - C__Users_obell_Documents_GitHub_2020_Project-Birdseye-DTX-2020_Sch

(IO)

For a start, I can remove the TXO, RXI, Reset_In and Vin pins this levels me with only GND and V5 pins

the three pins I need to hook up are DS = data serial input // Found on pin 2 SH_CP =shift clock pulse // Found on pin 3 ST_CP = storage register clock pulse // Found on pin 4

With those pins, I will be able to control everything I need to shift register with the STP16C596

A brief run down how the communication will be working "How this all works is through something called "synchronous serial communication," i.e. you can pulse one pin-up and down thereby communicating a data byte to the register bit by bit. It's by pulsing second pin, the clock pin, that you delineate between bits. This is in contrast to using the "asynchronous serial communication" of the Serial.begin() function which relies on the sender and the receiver to be set independently to an agreed-upon specified data rate. Once the whole byte is transmitted to the register the HIGH or LOW messages held in each bit get parceled out to each of the individual output pins. This is the "parallel output" part, having all the pins do what you want them to do all at once." arduino.cc

OLLYDOTDEV commented 4 years ago

000002-2020-06-21 02_24_49-Window (Updated IO)

Now with an IO changed to the new specifications.