Matronics Email Lists Forum Index Matronics Email Lists
Web Forum Interface to the Matronics Email Lists
 
 Get Email Distribution Too!Get Email Distribution Too!    FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Constructing an automatic RCA video camera feed splitter
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Matronics Email Lists Forum Index -> AeroElectric-List
View previous topic :: View next topic  
Author Message
alec(at)alecmyers.com
Guest





PostPosted: Sun Oct 15, 2017 7:44 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

I think the video sync problem could be a big deal. I would absolutely order a couple of cameras and the screen I intended to use and try switching between the sources with a mechanical toggle switch to get some confidence the result is going to be acceptable.

A CD4066 advertises itself as a quad gate analog switch, and it’s only $0.60. Alternatively since nobody here (I presume) is an experienced analog video design engineer, maybe the $8 part is worth it for ease of implementation.

I’ve never seen a rotary encoder with a push-button functionality as well. Could we compromise on a single (on)-off-(on) toggle switch mounted left-right. Click left or right to go to next or previous camera; Hold left or right for a second or two to resume scan; Hold left or right for ten seconds to enter/exit speed change ‘mode’.

The PIC programmer in me wants to run and hide from resistor ladder networks for setting parameters: A 16 pin PIC should have lots of spare pins for jumpers. If you don’t want a speed programming mode there would even be enough pins left for a speed selector.

Quote:
On Oct 15, 2017, at 11:01 PM, Eric Page <edpav8r(at)yahoo.com> wrote:



Well, I drafted a detailed response to all the discussion over the last day or so, when Windows 10 decided -- without any warning -- to reboot for a security update. No opportunity to save work, just a sudden blank screen. Absolutely INFURIATING, and not the first time it's happened.

Anyway, I'll probably miss something, but here's what I covered, as best I can remember...


1. Alec mentioned the possibility of video glitches or rolling when the feed is switched from camera to camera, due to the lack of video sync or frame buffering. If this happens, I will have zero idea how to fix it. I'm what you might call an ambitious hobbyist, not an engineer. Is this a high-risk thing? I have no experience here; I just found the mux IC and drew a schematic around it.


2. Alec also mentioned a Hackaday project to make an A/V switch box...

https://hackaday.com/2007/03/14/diy-av-switch/

That's a neat idea, but I struggle to understand how a digital bus switch IC can handle an AC video signal when a proper video mux needs pos/neg rails to do it. It apparently worked, but I don't understand it and comments below the project suggest that it shouldn't have worked. Again, I'm not an engineer...


3. Some good discussion between Alec and Charlie WRT user interface: buttons, knobs, switches, etc. My $0.02 is this: if we stay with discrete ICs, the interface remains a single toggle switch, and either a trimmer or knob/pot for scan rate. If we use a PIC, I would advocate for a rotary encoder with a dead simple interface: pushing the encoder switch toggles between scan and hold; when in scan mode, each click of rotation increments/decrements the pause time on each camera by 1 sec; when in hold mode, each click of rotation selects the next/previous camera feed. No user programming, just immediate response to user input. It would be nice if the PIC could write the selected scan rate to non-volatile memory each time it's changed, and recall it on power-up.

Quote:


4. The AD8184 datasheet...

http://www.analog.com/media/en/technical-documentation/data-sheets/AD8184.pdf

...has a section on board layout (pg 7) that suggests a bunch of RF voodoo (striplines, microstrips, guard rings, termination resistors, etc.) related to preserving the part's 700MHz bandwidth. According to this Maxim application note...

https://www.maximintegrated.com/en/app-notes/index.mvp/id/750

...a standard definition NTSC video signal occupies 4.2MHz of bandwidth and requires 18MHz of bandwidth for 0.5dB flatness (whatever that means...). So, is any of the RF voodoo necessary, or will standard PCB traces and copper ground pours suffice? Short traces will be difficult with RCA jacks, but would be easier using a D-Sub (see below).


5. Bob made some suggestions:

A. Use a 10-turn potentiometer. I have a 1-turn cermet trimmer in the BoM right now ($0.79), but it's easily changed to a 10 or 20-turn ($1.43), or to pads for a remote pot ($0.76) if desired.

B. Design for a D-25 backshell. Good idea, but will the video signals suffer on a shielded wire -vs- an RCA cable? If not, let's do it. These NorComp parts are the only ones I can find whose datasheet includes inside dimensions...

https://www.norcomp.net/rohspdfs/BackShells/InternalDimensions/ID-983Series.pdf

...and it doesn't look like I can fit everything into the space in a D-25 shell. The D-37 shell should have room to spare. Bob, if you have a deep D-25, could you give me the part number?

C. Use excess pins in the D-Sub as selection jumpers for number of cameras, scan rate, etc. I presume this would require a PIC pin to read each jumper. Or perhaps you could use a resistor ladder across multiple D-Sub pins and read the ladder voltage with a single PIC pin to determine which jumper is installed. Very good idea for setting number of camera inputs, but I don't see the point for scan rate; a trimmer (or rotary encoder) seems fine.

D. Use ExpressPCB. I haven't used them for at least 20 years. I don't like their "walled garden" model or their prices. Their closed software is the antithesis of "open source," and I'm never in a big enough hurry to justify the expense. My work will produce standard Gerber files that any board fab can use. Anyone can order 3 copies of the board from OSH Park...

http://www.oshpark.com/

...for $5/sq inch with free shipping, or upload to any of a half dozen Chinese fabs...

http://www.pcbshopper.com/

...to get 10 copies of the board in 2-3 weeks for




Read this topic online here:

http://forums.matronics.com/viewtopic.php?p=473595#473595











- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
Airdog77



Joined: 24 Nov 2013
Posts: 80
Location: Northern Virginia

PostPosted: Mon Oct 16, 2017 12:44 am    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

Eric,

Quote:

- Do you have a preference WRT discrete ICs -vs- a PIC microcontroller?

240/241, whatever it takes! (Michael Keaton "Mr. Mom" ref there... In other words: no preference Shocked )

Quote:
- Do you have any desires for additional features or functions that would push us in one direction or the other?

No, I like the one toggle or one push-button control on the panel. Simple is good. Scalability to control more cameras, if able, would be a nice feature but not a requirement.

Quote:
- Of the user interface options you've seen discussed, what would be your preference?

I prefer the ON-ON-(ON) toggle you mentioned, but a single push button would be fine as well.

Quote:
- For camera scan rate, would you prefer to set it once and forget it, or have an accessible control for routine use?

Being able to set scan rate internal to/or on the box is good, however, don't need a panel mounted control.

Quote:
- Would you prefer to install a device with five RCA jacks for signal and a 2-position header for power, or one D-Sub connector for everything?

5 RCA jacks would be better, much simpler hook up for my configuration.

Thanks again Eric!

Cheers,
Wade


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List

_________________
Airdog
Wade Parton
Building Long-EZ N916WP
www.longezpush.com
Back to top
View user's profile Send private message Visit poster's website
Eric Page



Joined: 15 Feb 2017
Posts: 241

PostPosted: Mon Oct 16, 2017 2:05 pm    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

alec(at)alecmyers.com wrote:
I think the video sync problem could be a big deal. I would absolutely order a couple of cameras and the screen I intended to use and try switching between the sources with a mechanical toggle switch to get some confidence the result is going to be acceptable.


Hmmm... I don't have the cameras or a monitor to test it with, and I don't have any need for them. I'm not sure what to do here other than cross my fingers but since the cost of failure is pretty low, I'm OK with that!

Quote:
A CD4066 advertises itself as a quad gate analog switch, and it’s only $0.60. Alternatively since nobody here (I presume) is an experienced analog video design engineer, maybe the $8 part is worth it for ease of implementation.


Wow, good find. It sure looks to me like it would work, but I think we'd be short of PIC outputs to drive it. Vcc, Gnd, rate pot, scan/hold, step, and 4 outputs to the CD4066 comes to 9 pins. We could put a 2-to-4 line decoder (CD4555) between them, but that's another 16-DIP package.

Can the scan/hold and step functions be handled on one pin? I'm thinking LOW = hold (switch at center "ON" position, tied to Gnd), HIGH for >300mS = scan (switch at upper "ON" position, tied to 5V), HIGH for <300mS = step (switch toggled to momentary "(ON)" position, also at 5V). This would free a pin and eliminate the need for a decoder.

Quote:
I’ve never seen a rotary encoder with a push-button functionality as well.


See: http://preview.tinyurl.com/ycllutuw

Turning the knob provides encoder output, pushing the knob closes a pair of switch contacts.

Quote:
Could we compromise on a single (on)-off-(on) toggle switch mounted left-right. Click left or right to go to next or previous camera; Hold left or right for a second or two to resume scan; Hold left or right for ten seconds to enter/exit speed change ‘mode’.


This could work too, but I'd like to avoid a "programming mode" and just use a pot to pre-set scan rate. It looks like we should have enough pins on an 8-pin PIC. I do like the idea of having the switch momentary in both directions. It would allow you to step in either direction, or start scanning in either direction. Good idea!

Quote:
The PIC programmer in me wants to run and hide from resistor ladder networks for setting parameters: A 16 pin PIC should have lots of spare pins for jumpers. If you don’t want a speed programming mode there would even be enough pins left for a speed selector.


I've never used a ladder and never written PIC code, but I can imagine it's a pain without a very stable ADC reference voltage and low tempco resistors.

Eric


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
View user's profile Send private message
Eric Page



Joined: 15 Feb 2017
Posts: 241

PostPosted: Mon Oct 16, 2017 3:11 pm    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

Wade,

Airdog77 wrote:

No, I like the one toggle or one push-button control on the panel. Simple is good. Scalability to control more cameras, if able, would be a nice feature but not a requirement.


Got it: keep it simple. How do you like Alec's idea to have the switch work left-right and be momentary in both directions? Short press steps forward (right) or back (left), long press (2 sec?) starts scanning forward or back. Same functionality, but with the ability to move in either direction.

Quote:
Being able to set scan rate internal to/or on the box is good, however, don't need a panel mounted control.

OK, we'll stick with a set-it-at-installation design.

Quote:
5 RCA jacks would be better, much simpler hook up for my configuration.

OK, how about a compromise: we design it around a D-Sub and provide a mating connector with RCA pigtails you can use with the equipment you already have on hand? This gives us a ready-made enclosure in the form of the D-Sub shell, and provides a universally available connector for installations in the future.

Eric


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
View user's profile Send private message
alec(at)alecmyers.com
Guest





PostPosted: Mon Oct 16, 2017 4:38 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

Actually we can combine both a set-at-install with a programmable cycle period. Fans of jumpers/resistors and buttonologists can both be happy.
And a two-way toggle is the same as two push buttons, and if you only want one push button simply don’t install the second, and be happy with only scanning forward.

Don’t worry about the number of pins on a micro controller - buy the micro controller with enough pins to do what you want. In the face of an $8 part, extra pins are free.

Quote:
>Hmmm... I don't have the cameras or a monitor to test it with, and I don't have any need for them. I'm not sure what to do here other than cross my fingers but since the cost of failure is pretty low, I'm OK with that!

Someone who’s going to build and install this system - and who is going to buy some cameras and a screen either now or later - should buy them, now, and check the idea of frequency and asynchronously switching a bunch of free-running composite video source into the choice of video monitor yields acceptable results. Before a lot of time is spent on this. The cost of failure is - a lot of wasted engineering time and resource writing code and designing circuit boards that will function perfectly and achieve nothing.
Quote:
On Oct 16, 2017, at 7:11 PM, Eric Page <edpav8r(at)yahoo.com> wrote:



Wade,


Airdog77 wrote:
>
> No, I like the one toggle or one push-button control on the panel. Simple is good. Scalability to control more cameras, if able, would be a nice feature but not a requirement.


Got it: keep it simple. How do you like Alec's idea to have the switch work left-right and be momentary in both directions? Short press steps forward (right) or back (left), long press (2 sec?) starts scanning forward or back. Same functionality, but with the ability to move in either direction.


> Being able to set scan rate internal to/or on the box is good, however, don't need a panel mounted control.

OK, we'll stick with a set-it-at-installation design.


Quote:

> 5 RCA jacks would be better, much simpler hook up for my configuration.

OK, how about a compromise: we design it around a D-Sub and provide a mating connector with RCA pigtails you can use with the equipment you already have on hand? This gives us a ready-made enclosure in the form of the D-Sub shell, and provides a universally available connector for installations in the future.

Eric




Read this topic online here:

http://forums.matronics.com/viewtopic.php?p=473626#473626











- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
ceengland7(at)gmail.com
Guest





PostPosted: Mon Oct 16, 2017 5:10 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

It's been a really long time since I did any TV work (long before
digital TV standards). But from what I remember about composite video,
I'd be very surprised if sync is a problem. Both horizontal and vertical
sync are embedded in the video. Here's the 1st tutorial I clicked on in
'the google':

http://www.ni.com/white-paper/4750/en/

Charlie

On 10/16/2017 7:36 PM, Alec Myers wrote:
Quote:


Actually we can combine both a set-at-install with a programmable cycle period. Fans of jumpers/resistors and buttonologists can both be happy.
And a two-way toggle is the same as two push buttons, and if you only want one push button simply don’t install the second, and be happy with only scanning forward.

Don’t worry about the number of pins on a micro controller - buy the micro controller with enough pins to do what you want. In the face of an $8 part, extra pins are free.

>> Hmmm... I don't have the cameras or a monitor to test it with, and I don't have any need for them. I'm not sure what to do here other than cross my fingers but since the cost of failure is pretty low, I'm OK with that!
Someone who’s going to build and install this system - and who is going to buy some cameras and a screen either now or later - should buy them, now, and check the idea of frequency and asynchronously switching a bunch of free-running composite video source into the choice of video monitor yields acceptable results. Before a lot of time is spent on this. The cost of failure is - a lot of wasted engineering time and resource writing code and designing circuit boards that will function perfectly and achieve nothing.
> On Oct 16, 2017, at 7:11 PM, Eric Page <edpav8r(at)yahoo.com> wrote:
>
>
>
> Wade,
> Airdog77 wrote:
>> No, I like the one toggle or one push-button control on the panel. Simple is good. Scalability to control more cameras, if able, would be a nice feature but not a requirement.
>
> Got it: keep it simple. How do you like Alec's idea to have the switch work left-right and be momentary in both directions? Short press steps forward (right) or back (left), long press (2 sec?) starts scanning forward or back. Same functionality, but with the ability to move in either direction.
>> Being able to set scan rate internal to/or on the box is good, however, don't need a panel mounted control.
> OK, we'll stick with a set-it-at-installation design.
>
>> 5 RCA jacks would be better, much simpler hook up for my configuration.
> OK, how about a compromise: we design it around a D-Sub and provide a mating connector with RCA pigtails you can use with the equipment you already have on hand? This gives us a ready-made enclosure in the form of the D-Sub shell, and provides a universally available connector for installations in the future.
>
> Eric
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
Airdog77



Joined: 24 Nov 2013
Posts: 80
Location: Northern Virginia

PostPosted: Mon Oct 16, 2017 5:15 pm    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

Eric,

Quote:
How do you like Alec's idea to have the switch work left-right and be momentary in both directions? Short press steps forward (right) or back (left), long press (2 sec?) starts scanning forward or back. Same functionality, but with the ability to move in either direction.


That sounds great.

Quote:
we design it around a D-Sub and provide a mating connector with RCA pigtails you can use with the equipment you already have on hand?


That sounds great too! Anything that's a small form factor that allows me to connect RCA works for me.

Cheers,
Wade


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List

_________________
Airdog
Wade Parton
Building Long-EZ N916WP
www.longezpush.com
Back to top
View user's profile Send private message Visit poster's website
Eric Page



Joined: 15 Feb 2017
Posts: 241

PostPosted: Mon Oct 16, 2017 8:42 pm    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

alec(at)alecmyers.com wrote:
Actually we can combine both a set-at-install with a programmable cycle period. Fans of jumpers/resistors and buttonologists can both be happy.
And a two-way toggle is the same as two push buttons, and if you only want one push button simply don’t install the second, and be happy with only scanning forward.

Well, I'm trying to keep the interface as simple as possible. I don't want a situation where the user installs one switch/button and has to learn and remember multiple button-presses, or X number of presses in Y seconds to access a programming mode. I would prefer to just have a pot that the installer can twiddle to set the desired scan rate once and leave it at that.

Quote:
Don’t worry about the number of pins on a micro controller - buy the micro controller with enough pins to do what you want. In the face of an $8 part, extra pins are free.

I wouldn't, except that to fit this device into a D-25 or D-37 backshell, I need to keep pin count low. In any case, I think an 8-pin device will be fine. See my next post.

Quote:
Someone who’s going to build and install this system - and who is going to buy some cameras and a screen either now or later - should buy them, now, and check the idea of frequency and asynchronously switching a bunch of free-running composite video source into the choice of video monitor yields acceptable results. Before a lot of time is spent on this. The cost of failure is - a lot of wasted engineering time and resource writing code and designing circuit boards that will function perfectly and achieve nothing.

Indeed -- good point.

Wade, if you're reading this, could you rig up this test with your EFIS and cameras and let us know how it works? We need to know if switching from one camera to another causes any artifacts in the displayed video (missing or frozen frames, pixelation, rolling video, etc.). If you need a switch to run this test, here's one on eBay from a US seller, for $3, delivered in about a week:

http://preview.tinyurl.com/yabgbf88

Eric


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
View user's profile Send private message
Eric Page



Joined: 15 Feb 2017
Posts: 241

PostPosted: Mon Oct 16, 2017 8:45 pm    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

I'm convinced that using a PIC is the way to go. I'd also like to give the CD4066 a try as the switch.

Once we hear from Wade that his EFIS and video adapter handle the camera feed switching OK, I'll edit the schematic and work on a board layout. Then Alec/Paul can write some code. Here's what I'd like to accomplish with the software:
    1. At power-up, wait a bit for the regulator to settle, then read voltage on AN3/Pin3 and correlate to scan rate (0-5V = 2-10 sec per camera).
    2. Start scanning at camera 1, then 2, 3, 4, 1, etc.
    3. Monitor the switch(es) and respond as follows:
    - Short press R or L: During scan mode, stop scan. During hold mode, advance one camera forward (R) or back (L).
    - Long press R or L: During scan mode, reverse scan direction if switch is moved opposite to current scan direction. During hold mode, begin scan forward (R) or back (L).

Installation with an (ON)-ON-(ON) toggle switch would work as above. Installation with a single pushbutton would have the switch connected as the RIGHT position of the toggle, and would function as follows:
    - Short press: In scan mode, stop scan. In hold mode, increment by one camera.
    - Long press: In scan mode, no change. In hold mode, begin scan from current camera.

I've done a quick demo layout with the PIC and CD4066, so I could figure out the best GPIO assignments. See "Demo_Layout.jpg" below.

"Mode_Sw_AN2.jpg" below shows my best guess at how to attach the (ON)-ON-(ON) toggle switch to AN2/Pin5. Please let me know if there's a better way to do it.

Eric


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List



Demo_Layout.jpg
 Description:
 Filesize:  81.31 KB
 Viewed:  20932 Time(s)

Demo_Layout.jpg



Mode_Sw_AN2.jpg
 Description:
 Filesize:  43.71 KB
 Viewed:  20931 Time(s)

Mode_Sw_AN2.jpg


Back to top
View user's profile Send private message
Airdog77



Joined: 24 Nov 2013
Posts: 80
Location: Northern Virginia

PostPosted: Mon Oct 16, 2017 11:15 pm    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

Eric,

Quote:
Wade, if you're reading this, could you rig up this test with your EFIS and cameras and let us know how it works?


I can. Be advised that it will be a 3-4 weeks. I just got my EFIS in hand and then headed out the door for a 2-week trip. Working to get my panel together and tested, so I still have all the wiring, cross-connects, etc. to do.

Sorry, wish I could be a better guinea pig, but still in plane building mode so none of my panel is together... yet.

Cheers,
Wade


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List

_________________
Airdog
Wade Parton
Building Long-EZ N916WP
www.longezpush.com
Back to top
View user's profile Send private message Visit poster's website
Eric Page



Joined: 15 Feb 2017
Posts: 241

PostPosted: Tue Oct 17, 2017 10:03 am    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

Airdog77 wrote:
I can. Be advised that it will be a 3-4 weeks. I just got my EFIS in hand and then headed out the door for a 2-week trip. Working to get my panel together and tested, so I still have all the wiring, cross-connects, etc. to do.

No worries. I'm glad to hear you're not wiring your panel as we discuss this. Time is our friend. Just let us know how it goes when you can.

Eric


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
View user's profile Send private message
Airdog77



Joined: 24 Nov 2013
Posts: 80
Location: Northern Virginia

PostPosted: Tue Oct 17, 2017 12:41 pm    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

Eric,

Quote:
Just let us know how it goes when you can.


Will do.

Cheers,
Wade


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List

_________________
Airdog
Wade Parton
Building Long-EZ N916WP
www.longezpush.com
Back to top
View user's profile Send private message Visit poster's website
alec(at)alecmyers.com
Guest





PostPosted: Tue Oct 17, 2017 1:47 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

I just checked on the microchipdirect.com website. If you want Microchip to send you pre-programmed parts, there’s a set-up fee of $29, and a minimum order value of $60. The parts are reasonably priced and the extra cost to program each chip is between USD$0.10 and USD$0.15 for the range of chips we’ve been looking at.
Quote:
On Oct 17, 2017, at 7:45 AM, Alec Myers <alec(at)alecmyers.com> wrote:



And whichever PIC we use, make sure to provide access to the ICSP pins!

On Oct 17, 2017, at 00:45, Eric Page <edpav8r(at)yahoo.com> wrote:



I'm convinced that using a PIC is the way to go. I'd also like to give the CD4066 a try as the switch.

Once we hear from Wade that his EFIS and video adapter handle the camera feed switching OK, I'll edit the schematic and work on a board layout. Then Alec/Paul can write some code. Here's what I'd like to accomplish with the software:
1. At power-up, wait a bit for the regulator to settle, then read voltage on AN3/Pin3 and correlate to scan rate (0-5V = 2-10 sec per camera).
2. Start scanning at camera 1, then 2, 3, 4, 1, etc.
3. Monitor the switch(es) and respond as follows:
- Short press R or L: During scan mode, stop scan. During hold mode, advance one camera forward (R) or back (L).
- Long press R or L: During scan mode, reverse scan direction if switch is moved opposite to current scan direction. During hold mode, begin scan forward (R) or back (L).
Installation with an (ON)-ON-(ON) toggle switch would work as above. Installation with a single pushbutton would have the switch connected as the RIGHT position of the toggle, and would function as follows:
- Short press: In scan mode, stop scan. In hold mode, increment by one camera.
- Long press: In scan mode, no change. In hold mode, begin scan from current camera.
I've done a quick demo layout with the PIC and CD4066, so I could figure out the best GPIO assignments. See "Demo_Layout.jpg" below.

"Mode_Sw_AN2.jpg" below shows my best guess at how to attach the (ON)-ON-(ON) toggle switch to AN2/Pin5. Please let me know if there's a better way to do it.

Eric




Read this topic online here:

http://forums.matronics.com/viewtopic.php?p=473636#473636




Attachments:

http://forums.matronics.com//files/demo_layout_145.jpg
http://forums.matronics.com//files/mode_sw_an2_270.jpg













- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
wrmaxwell(at)bigpond.com
Guest





PostPosted: Tue Oct 17, 2017 6:44 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

Actually, there are alternatives to the PIC KIT 3, cheaper too, although the Chinese clones are cheaper than Microchip's genuine PIC KIT 3.
Bill

On 18/10/2017 12:49 PM, Alec Myers wrote:

Quote:
In the fantasy world I enjoy inhabiting, where I’ll happily spend four days of engineering resource researching a different chip to save $0.50 in parts costs (which really only makes sense when you anticipate a production run of thousands, and let’s be honest how many people are going to build a video switcher?) it’s nice to know that you, Bob, don’t need to commit to programming 10,000 PICs - there exists another option, even if it won’t ever be needed.
Quote:
On Oct 17, 2017, at 9:32 PM, Robert L. Nuckolls, III <nuckolls.bob(at)aeroelectric.com (nuckolls.bob(at)aeroelectric.com)> wrote:
At 04:45 PM 10/17/2017, you wrote:
Quote:
--> AeroElectric-List message posted by: Alec Myers <alec(at)alecmyers.com (alec(at)alecmyers.com)> I just checked on the microchipdirect.com website. If you want Microchip to send you pre-programmed parts, there’s a set-up fee of $29, and a minimum order value of $60. The parts are reasonably priced and the extra cost to program each chip is between USD$0.10 and USD$0.15 for the range of chips we’ve been looking at.
  Programming a PIC is just slightly more   than a trivial task. You need a PIC KIT 3   programmer . . http://tinyurl.com/ya66phql   which comes with the development/programming   software.  If your project is fitted with   ICSP header, the cable supplied with the PIC KIT   drops right onto that header. If you wish to program   loose chips then you need universal chip to ICSP   adapter . . . http://tinyurl.com/y7xt6am5   If one wishes to program SOIC chips before   installation, adapters are avaiable to   facilitate this task . . . http://tinyurl.com/yazkcare    should deliberations on this project arrive    at some functional consensus in hardware    and performance, I'd be pleased to host the    data package defining the project.    I'll also offer to program DIP or SMD    chips at no charge beyond postage required    to return the chip(s).
  Bob . . .






- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
alec(at)alecmyers.com
Guest





PostPosted: Tue Oct 17, 2017 9:48 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

How about have the rate program mode entered by powering up with the right button held down, and the camera quantity select mode entered by powering up with the left button held down. That saves two pins and a dip switch.

That also means that you can still reprogram the unit without physical access, and there’s still little to no chance of accidentally or ham-fistedly entering a programming mode. Just don’t lean on the panel when you power up the avionics.

If we’re really really really paranoid, have a single dip switch - in fact might as well make it a track that can be cut or a solder pad that can be bridged - to prevent any programming.

I’m still conscious of and sensitive to the charge of excessive and unwarranted buttonology. Why don’t we set the un-initialized defaults at 4 cams, and your choice of 5 second period. Then if you don’t care do any programming at all, it does something useful, and you get 4 cameras off the bat (or even two, or three, with appropriate solder blob shorts between Cams 1 and 3, and 2 and 4) And if you have only the right button you can still adjust the scan speed.

Other than that:

Short press: freeze
Second and subsequent short press: advance to next or retard to previous camera
Long press: resume scan in selected direction.

Re pinout:
RA0, RA1, RA2, RA4 and RA5 are the only pins with weak pull-ups available so those should be the ones used for button, pad or dip inputs. That is, pins 11, 12, 13, 2 and 3.
So we should move the left panel switch from pin 4. (RA3). During serial programming Vpp (RA3) is raised to 12v, so whatever is connected to that pin must be capable of sustaining this high voltage without pulling it down or being damaged. It may be better to leave RA3 open circuit other than a pad for programming.
Quote:
On Oct 18, 2017, at 1:02 AM, Eric Page <edpav8r(at)yahoo.com> wrote:




alec(at)alecmyers.com wrote:
> Let’s use a 16F630.
>
> It has enough pins to:
> -use two buttons, which can be independently detected, and therefore pressed together
> -use solder pads/jumpers for speed rather than a pot, therefore cheaper, reduction in component count, and less board space. If you really want to “twiddle” something use a coded rotary switch (which is roughly the same price as a pot) for development and short the pads with solder blobs instead later
> -have more than 4 cameras


OK, PIC16F630 it is. That and another CD4066 to support eight cameras has exceeded the space in any D-Sub backshell I could find, so I'll just design for a flanged plastic box:

http://preview.tinyurl.com/yasdwhqh (http://preview.tinyurl.com/yasdwhqh)

After another quick-and-dirty layout test, the PIC pins shake out like this:

01: Vdd
02: Camera 3 Select
03: Camera 2 Select
04: Panel Switch (Left) / Vpp
05: Rate Program Switch
06: Camera 8 Select
07: Camera 5 Select
08: Camera 6 Select
09: Camera 7 Select
10: Cams Program Switch
11: Panel Switch (Right)
12: Camera 1 Select / ICSP Clock
13: Camera 4 Select / ICSP Data
14: Vss

I'd like to hide the programming functions behind DIP switches so the interface for normal operation stays stone simple. Since there's no display or indicator LEDs, I want no possibility of accidentally entering a programming mode. I see the two programming DIP switches working like this:

- To set number of cameras, the installer closes the Cams Program Switch, then powers up the unit. It displays Camera 1 in hold mode. The installer uses the Panel Switch (Right) to increment through each camera until the last one is displayed, then opens the Cams Program Switch to tell the PIC to save the number of cameras to non-volatile memory. The installer then cycles power and it reads the saved number of cameras from memory and begins normal operation. [The PIC could be programmed with a zero in this memory cell, which would make it enter this mode automatically at power-up, until a non-zero number is saved.]

- To set scan rate, the installer closes the Rate Program Switch, then powers up the unit. It goes into scan mode and Panel Switches (Left) and (Right) increment and decrement the scan delay time (in 1 sec steps, between 2 and 10 sec). When the desired time is achieved, the installer opens the Rate Program Switch, which tells the PIC to save the rate to non-volatile memory. The installer then cycles power and it reads the saved scan rate from memory and begins normal operation. [Again, a default value could be programmed. Say, 5 sec.]


> Also strongly strongly recommend a SOIC package (cheapest) which is smaller and still hand solderable. Fewer holes makes for an easier pcb too. It’s 2017!


I would use all SMD parts in a heartbeat if I were designing this for myself or a limited audience of people with the right soldering equipment and skill. I agree SOIC parts are easy to solder, but you and I have used a lot of them. For an airplane builder whose soldering experience might be limited to joining wires together, and who doesn't have a magnifier lamp or microscope, a SOIC part is going to be a source of massive frustration. To say nothing of the 0603 or 0805 passives that go along with it. Besides, the price premium for DIP-vs-SOIC is $0.14. We ain't going into high-rate production here! Besides, DIP packages give me lots of room to run ground pours between all of the video signal traces.


> And whichever PIC we use, make sure to provide access to the ICSP pins!

Noted.

Eric




Read this topic online here:

http://forums.matronics.com/viewtopic.php?p=473660#473660











- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
alec(at)alecmyers.com
Guest





PostPosted: Tue Oct 17, 2017 9:59 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

On second thoughts - if we want to use every single pin then it makes sense to have RA3 as one of the dip, pad, or button inputs. (I can’t see a video chip being happy with +12V applied to an input pin with the PIC is programmed.) But then it must have an external pullup resistor, Something like 100k.

Quote:
On Oct 18, 2017, at 1:02 AM, Eric Page <edpav8r(at)yahoo.com> wrote:




alec(at)alecmyers.com wrote:
> Let’s use a 16F630.
>
> It has enough pins to:
> -use two buttons, which can be independently detected, and therefore pressed together
> -use solder pads/jumpers for speed rather than a pot, therefore cheaper, reduction in component count, and less board space. If you really want to “twiddle” something use a coded rotary switch (which is roughly the same price as a pot) for development and short the pads with solder blobs instead later
> -have more than 4 cameras


OK, PIC16F630 it is. That and another CD4066 to support eight cameras has exceeded the space in any D-Sub backshell I could find, so I'll just design for a flanged plastic box:

http://preview.tinyurl.com/yasdwhqh (http://preview.tinyurl.com/yasdwhqh)

After another quick-and-dirty layout test, the PIC pins shake out like this:

01: Vdd
02: Camera 3 Select
03: Camera 2 Select
04: Panel Switch (Left) / Vpp
05: Rate Program Switch
06: Camera 8 Select
07: Camera 5 Select
08: Camera 6 Select
09: Camera 7 Select
10: Cams Program Switch
11: Panel Switch (Right)
12: Camera 1 Select / ICSP Clock
13: Camera 4 Select / ICSP Data
14: Vss

I'd like to hide the programming functions behind DIP switches so the interface for normal operation stays stone simple. Since there's no display or indicator LEDs, I want no possibility of accidentally entering a programming mode. I see the two programming DIP switches working like this:

- To set number of cameras, the installer closes the Cams Program Switch, then powers up the unit. It displays Camera 1 in hold mode. The installer uses the Panel Switch (Right) to increment through each camera until the last one is displayed, then opens the Cams Program Switch to tell the PIC to save the number of cameras to non-volatile memory. The installer then cycles power and it reads the saved number of cameras from memory and begins normal operation. [The PIC could be programmed with a zero in this memory cell, which would make it enter this mode automatically at power-up, until a non-zero number is saved.]

- To set scan rate, the installer closes the Rate Program Switch, then powers up the unit. It goes into scan mode and Panel Switches (Left) and (Right) increment and decrement the scan delay time (in 1 sec steps, between 2 and 10 sec). When the desired time is achieved, the installer opens the Rate Program Switch, which tells the PIC to save the rate to non-volatile memory. The installer then cycles power and it reads the saved scan rate from memory and begins normal operation. [Again, a default value could be programmed. Say, 5 sec.]


> Also strongly strongly recommend a SOIC package (cheapest) which is smaller and still hand solderable. Fewer holes makes for an easier pcb too. It’s 2017!


I would use all SMD parts in a heartbeat if I were designing this for myself or a limited audience of people with the right soldering equipment and skill. I agree SOIC parts are easy to solder, but you and I have used a lot of them. For an airplane builder whose soldering experience might be limited to joining wires together, and who doesn't have a magnifier lamp or microscope, a SOIC part is going to be a source of massive frustration. To say nothing of the 0603 or 0805 passives that go along with it. Besides, the price premium for DIP-vs-SOIC is $0.14. We ain't going into high-rate production here! Besides, DIP packages give me lots of room to run ground pours between all of the video signal traces.


> And whichever PIC we use, make sure to provide access to the ICSP pins!

Noted.

Eric




Read this topic online here:

http://forums.matronics.com/viewtopic.php?p=473660#473660











- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
Eric Page



Joined: 15 Feb 2017
Posts: 241

PostPosted: Wed Oct 18, 2017 10:06 am    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

alec(at)alecmyers.com wrote:
How about have the rate program mode entered by powering up with the right button held down, and the camera quantity select mode entered by powering up with the left button held down. That saves two pins and a dip switch.

That also means that you can still reprogram the unit without physical access, and there’s still little to no chance of accidentally or ham-fistedly entering a programming mode. Just don’t lean on the panel when you power up the avionics.


Sounds good to me.

Quote:
If we’re really really really paranoid, have a single dip switch - in fact might as well make it a track that can be cut or a solder pad that can be bridged - to prevent any programming.


It's probably excessive to do that. Nothing infuriates me more than a manufacturer who goes to absurd lengths to lock me out of a device I paid good money for!

Quote:
I’m still conscious of and sensitive to the charge of excessive and unwarranted buttonology. Why don’t we set the un-initialized defaults at 4 cams, and your choice of 5 second period. Then if you don’t care do any programming at all, it does something useful, and you get 4 cameras off the bat (or even two, or three, with appropriate solder blob shorts between Cams 1 and 3, and 2 and 4) And if you have only the right button you can still adjust the scan speed.


I'm not sure I understand what you mean about solder bridges, but I'd prefer not to create a situation where a builder has to modify the PCB in some way to gain additional functionality if he adds cameras. Let's just make the default setting be four cameras (for no other reason than that's what Wade is installing) and leave it to the programming mode to change it.

I'll just put a single tactile switch on the PCB, in parallel with Panel Switch (Left), that can be used in the event the user doesn't install the left switch on the panel. It's a 10-cent part, so no big deal.

Quote:
Other than that:

Short press: freeze
Second and subsequent short press: advance to next or retard to previous camera
Long press: resume scan in selected direction.


Agree.

Quote:
Re pinout:
RA0, RA1, RA2, RA4 and RA5 are the only pins with weak pull-ups available so those should be the ones used for button, pad or dip inputs. That is, pins 11, 12, 13, 2 and 3.

So we should move the left panel switch from pin 4. (RA3). During serial programming Vpp (RA3) is raised to 12v, so whatever is connected to that pin must be capable of sustaining this high voltage without pulling it down or being damaged. It may be better to leave RA3 open circuit other than a pad for programming.


OK, I looked at my test layout again, and with the separate programming DIP switches removed, this is no problem. The pinout looks like this:

    01: Vdd
    02: Camera 3 Select
    03: Panel Switch (Left) / Tactile Switch
    04: Vpp
    05: -----
    06: Camera 8 Select
    07: Camera 5 Select
    08: Camera 6 Select
    09: Camera 7 Select
    10: Camera 2 Select
    11: Panel Switch (Right)
    12: Camera 1 Select / ICSP Clock
    13: Camera 4 Select / ICSP Data
    14: Vss


The Camera Select lines don't need pull-down resistors, right -- the PIC can actively pull them low when each channel is off?

I suppose we could use RC5/Pin5 to drive an LED to indicate when the board is in programming mode. How much current can this pin safely handle, and would you rather source or sink?

Eric


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
View user's profile Send private message
charlesdavis(at)iuncapped
Guest





PostPosted: Wed Oct 18, 2017 12:20 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

Hi Guys

For the question of the number of cameras to cater for ... if you didn't
include the option to change the number of inputs, and had for example 8
available, then someone who only wants 2 cameras - they could connect each
camera to 4 inputs, or 4 cameras could be connected to 2 inputs each. A
splitter of some sort should be able to match the impedances fairly well. or
not ?

maybe not practical, just a thought that doesn't seem to have been discussed
.. and I'd hate for you-all to run out of input

Charles


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
Eric Page



Joined: 15 Feb 2017
Posts: 241

PostPosted: Wed Oct 18, 2017 3:15 pm    Post subject: Re: Constructing an automatic RCA video camera feed splitte Reply with quote

charlesdavis(at)iuncapped wrote:
For the question of the number of cameras to cater for ... if you didn't include the option to change the number of inputs, and had for example 8 available, then someone who only wants 2 cameras - they could connect each camera to 4 inputs, or 4 cameras could be connected to 2 inputs each. A splitter of some sort should be able to match the impedances fairly well. or not ?


As we have it planned now, the microcontroller will be programmed with a default configuration for four cameras. By holding a switch closed during power-up to enter a programming mode, that setting will be adjustable between one and eight.

Eric


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
View user's profile Send private message
alec(at)alecmyers.com
Guest





PostPosted: Sun Oct 29, 2017 2:32 pm    Post subject: Constructing an automatic RCA video camera feed splitter Reply with quote

Quote:
>I hope it isn't a big pain to alter the code for different PICs.

No problem. 201 instructions, now, and still 9 bytes of data. So you saved 19 instructions by changing IC.
I’ve run it through PICSIM as best I can; hardware would be the next step. Unfortunately I don’t have any trash PCBs for 8-pin PICs.

On Oct 28, 2017, at 8:03 PM, Eric Page <edpav8r(at)yahoo.com> wrote:



Alec, I think my last post on this subject (on Fri 10/20) must not have been echoed out via email, as it drew no reply at the time.

To sum it up, I found another, better option for the video switch IC. That was the CD4051B, but I've since found an even better one. The CD74HC4051E has high bandwidth, is a true 8:1 mux in a single IC instead of two 4-channel switches, and it requires only 3 control lines to select one of 8 inputs.

http://www.ti.com/lit/ds/symlink/cd74hc4051.pdf

Since just 3 control lines are used, an 8-pin PIC is all we need, so I went back to the PIC12F683. For ease of layout, the pin assignments work best like this:

1: Vdd
2: Control B
3: Control A
4: Vpp
5: Control C
6: Switch (Left) / ICSPCLK
7: Switch (Right) / ICSPDAT
8: Vss

With the CD74HC4051E and PIC12F683, I was just able to make everything fit in the space of a DB-25 backshell I found on Digi-Key (not necessarily the biggest one, but the only one I could find with a drawing that shows interior dimensions)...

https://www.digikey.com/product-detail/en/norcomp-inc/983-025-010R031/925PE-ND/858537

To save a bit of space, I used a two-position male pin header instead of a tactile switch for the duplicate left switch on the board. It can be closed with one of these little shorting jumpers...

https://www.digikey.com/product-detail/en/sullins-connector-solutions/SPC02SYAN/S9001-ND/76375

I hope it isn't a big pain to alter the code for different PICs. I'm sorry you didn't see my earlier post -- it's the last one in this thread...

http://forum.matronics.com/viewtopic.php?t=16767494

For some reason I don't understand, the Matronics server has split this discussion into more than a dozen separate threads, some with just one or two posts. I emailed Matt Dralle about it, but he must be away or busy, as he didn't reply.

Bob, I presume you must have missed my post last week also. I asked about the DB-25 backshell you posted a picture of. Do you have a part number so I can get a dimensioned drawing, or do you know the interior dimensions? It looks like it might be bigger than the one I found, and a bit more room for video signal trace routing would be welcome.

Cheers,

Eric


Read this topic online here:

http://forums.matronics.com/viewtopic.php?p=473918#473918


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Matronics Email Lists Forum Index -> AeroElectric-List All times are GMT - 8 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group