Author Topic: Bit of a noob, needing project assistance.  (Read 4467 times)

0 Members and 1 Guest are viewing this topic.

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Bit of a noob, needing project assistance.
« on: November 18, 2018, 04:54:00 pm »
I hope I'm in the right place -- there are at least three different subforums of this place that I could technically fit this thread into. If I'm in the wrong place, I would not object to being moved.

I have attempted to construct an Arduino project called a "Zorkduino". Info about the Zorkduino is here: https://github.com/rossumur/Zorkduino

My configuration is very similar to the recommended Zorkduino circuit, but I have made some deviations. A proper circuit diagram will be posted, below, shortly, along with at least one photo of the gloriously awful rat's nest I've grown inside this thing -- but for now, text will have to do. The deviations are...
(1) I am using a CH340-type Arduino Nano as the 'brains' of the circuit. Info about these specific Nanos, here.
(2) I am powering the entire contraption from a dual-rail 5v/12v supply, specifically a LaCie power brick. I have tried two different "sizes" of brick, as is detailed in the explanation (further below) of what's gone wrong.
(3) I have integrated a direct connection to a composite-input, 480x234-pixel-resolution, seven-inch LCD. This LCD requires 12v for power (unlike the rest of the project), hence the dual rail supply and messing about with Kycon connectors. (Note: in this case, "direct connection" does not mean that I skipped the two required resistors. They are present and accounted for.)
(4) The 5v rail is switched immediately after the Kycon connector and before any componentry other than the power brick. The 12v rail is not switched, as the LCD has a "soft" power button integrated that drives that function.
(5) The audio goes directly to a piezo can element (the little black can type, commonly seen in PC motherboards and the like) with no resistor or capacitor in between it and the Arduino.
(6) The entire assembly is mounted into a Solidtek ACK-595 keyboard, with the LCD on laptop hinges. It's not entirely pretty, but it's functional and I sort of like the kludge aesthetic (to the extent that such exists).

The problem, unfortunately, is that I don't seem to have any video out. When the 5v rail is switched off (just after entering the chassis), the video output is probably trying to render a "no signal" screen; however, the output is severely distorted. Switching on the 5v rail, 'straightens' the screen (rendering it normal and usable) but there still is no recognizable signal being picked up. (Photos will follow shortly.) Mind you, this is with a standard LaCie brick, 5v/2.0a 12v/2.2a. If I sic a LaCie "Bigger Disk" brick (5v/4.3a 12v/3.0a) on it, the brick just power-cycles.

The only thing I've been able to come up with is that maybe, because only the power side of the 5v rail is switched, and the 5v ground goes into the LCD as the signal ground, that maybe there's a short between power and signal grounds on the :CD controller and it's backfeeding something...? That seems a little shaky to me, but I don't know enough to entirely dispute it.

Photos and schematic, in my next post.

Any help or advice able to be given, is welcomed and requested. (I'm not here to whine.) An odd request: if you can't help, better to tell me than to just move on -- I have a bad habit of assuming I've been ignored, when the shadows get real long and I've not had so much as a peep out of anyone...
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #1 on: November 18, 2018, 05:21:41 pm »
Schematic first. Not my best work, but most of it was done at 11pm last night, TBH, so I suppose it's good enough...



Now photos. I'm going to do this as a link to an Imgur album, because it's easier and just as good. Here's the linky...

https://imgur.com/a/R0DkBlM

Five images. The first is with the 5v power switched OFF. The second, with it ON. Third is an overall guts shot, fourth is guts-detail left side, fifth is guts-detail right side.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #2 on: November 18, 2018, 05:42:44 pm »
The Gnd side of the +12V and +5V supplies are connected together, right?  I get nervous with the term 'dual rail', I'm hoping that the supply is simply a common dual output supply.

I also get nervous when you mention that a more powerful supply just cycles.  That sounds really bad!

After you are certain the grounds are connected, check the voltage from +5 and +12 to gnd.

Will your monitor display 308x192?  The author suggests viewing the video signal with a terminal - in other words, a serial input to the PC and something like Putty as a display.  He says the display looks "Matrixy" so don't expect anything other than gibberish.

I don't know if the Tx pin he is using for video is also the Tx pin that goes out the USB port.  If so, you might be able to use the IDE Serial Monitor even though the author is suggesting something else (or hasn't really thought about it).

I would disconnect the display and power up the Arduino.  Does anything get hot?  How much current does the Arduino draw (leave the switch open and bridge it with a DMM set to measure current).

Does that current change much when you plug in the monitor?  It shouldn't!

I'm assuming you don't have a scope and troubleshooting without one is darn difficult.  On my bench, I would simply probe the two sync signals and the video signal on a 4 channel scope.  I wouldn't get a workable image but I would see if the Arduino was emitting anything.

Put a blinking LED project back into the Arduino to see if it has been smoked.  This power brick cycling just can't be good.

Are you actually running the video down the shield of a coax?  I would expect the shield to be grounded on both ends and, more importantly, on the display end.  What kind of display are you using?  The design uses NTSC, a common TV set with composite video input (yellow jack).  It won't work on any kind of digital monitor.  I have one of those 7" monitors and it accepts composite video so I suspect you have the right thing as well.

I guess I don't really understand what I see on the schematic around the coax...
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #3 on: November 18, 2018, 05:56:38 pm »
Separate 5v/12v grounds, per the insistance of the power supply in question. This is given in the schematic.

The supply is known good.

The monitor is composite video; the output from the Arduino is not serial TTY but rather matching composite video. It is text-only video (if that makes sense) but it is most certainly not TTL serial or RS-232. As for resolutions, the monitor is capable, last I checked, of scaling...

I believe the TX pin goes to the CH340 as well as to the video signal -- confirmation of that would be in the second link in my first post, to the info about the CH340 Nano boards.

The video signal is travelling through coax part of the way -- it's two side-by-side wires (signal and ground) to where it joins with the black cable from the LCD, and then it is coax from there into the LCD. The cable with the coax video and 12v power/ground leads has an additional shield which I believe is grounded on the LCD side -- it is unconnected anywhere else. This information is reflected clearly in the photos at the posted link in the second post.

I have an o-scope (a very old Tektronix 422) but it's quite sizable, quite heavy, and I quite don't know how to use it :-[
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #4 on: November 18, 2018, 06:17:31 pm »
Separate 5v/12v grounds, per the insistance of the power supply in question. This is given in the schematic.

Since you are carrying a ground with your video signal, the power supply grounds will be connected through the coax.

If it is not permitted by the power supply for these grounds to be connected, you have the wrong supply!  Why is one of your supplies cycling?  Again, that Arduino current measurement, with and without the monitor connected, may give some indications.

There are no one wire circuits.  You can't output a signal without a return path and you can't use a signal inside the display without connecting to that return path.  What they do with the power input is unknown (to me) but I suspect one side is grounded to the electronics ground.  Probably the (-) side.

I would bet that if you measure voltage between the two grounds, it will be zero.  You can compare this to a similar measurement of the power supply by itself where the value is probably floating around.

The author mentions viewing the video with a serial monitor.  Since he is using the Tx pin, I assume it also comes out the USB port and, if so, maybe you can pick it up if your serial monitor program will go fast enough.  At least to the extent of knowing whether there IS a signal.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Bit of a noob, needing project assistance.
« Reply #5 on: November 18, 2018, 06:20:31 pm »
Also, that video output circuit relies on the Arduino running at 5V and the monitor video input having a 75 ohm resistance to ground.  If either isn't true, it wont generate a valid composite video signal.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #6 on: November 18, 2018, 06:45:26 pm »
Also, that video output circuit relies on the Arduino running at 5V and the monitor video input having a 75 ohm resistance to ground.  If either isn't true, it wont generate a valid composite video signal.

In theory, the Arduino Nano should be running at 5V but it's the kind of thing that needs to be verified.
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #7 on: November 18, 2018, 07:02:02 pm »
I can replace the partial-coax lead with all-coax, that's not a big deal.

As for the current measurement thing -- I think you may be slightly confused. It's the more powerful supply that's cycling -- if I were drawing too much current, the lesser of the supplies would be objecting, not the greater. Probably I've got something very slightly shorted somewhere and it's picking up leakage current. My soldering skills are not the best.

I will, however, check the power supply grounds to see if they are internally connected.
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #8 on: November 18, 2018, 07:08:54 pm »
Grounds are internally connected in the power supply. I'll check for shorts and I'll replace that length of not-coax with coax.

Be a little while here... probably a couple hours. I have other stuff to do as well, after all...
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Bit of a noob, needing project assistance.
« Reply #9 on: November 18, 2018, 07:28:28 pm »
In theory, the Arduino Nano should be running at 5V but it's the kind of thing that needs to be verified.
Yes.  The O.P. described it as a "CH340-type Arduino Nano", which is a chinese 'clone', not a genuine Arduino or identical schematic clone, so the ATmega328P's Vcc voltage and the presence of a 16MHz crystal or resonator need to be checked.
« Last Edit: November 18, 2018, 07:30:25 pm by Ian.M »
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #10 on: November 18, 2018, 07:44:50 pm »
I can see a crystal on-board the Nano. It's super tiny... roughly an 0201 part.

The Arduino is running off the 5v rail of the external power supply. One of the clever (ish) things about these CH340 "Nano"s, is that you don't have to use the internal regulator. The 5v output pin from the regulator to the outside world, is also an input pin for a regulated 5v external supply.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #11 on: November 18, 2018, 09:25:57 pm »
I can replace the partial-coax lead with all-coax, that's not a big deal.

As for the current measurement thing -- I think you may be slightly confused. It's the more powerful supply that's cycling -- if I were drawing too much current, the lesser of the supplies would be objecting, not the greater. Probably I've got something very slightly shorted somewhere and it's picking up leakage current. My soldering skills are not the best.

I will, however, check the power supply grounds to see if they are internally connected.

I think measuring the voltages will be helpful.  The way I see it:  The smaller supply has current foldback and when the circuit seems to draw too much current, the voltage folds back until the current is reduced.  OTOH, the larger supply can put more current into the problem and it begins to look like a short circuit.  The voltage doesn't fold back, it cycles.  I have absolutely no basis for thinking that way except that I am bothered by a larger supply cycling on a load that a smaller supply doesn't object to.  But maybe it is objecting!  Maybe we don't have the voltages!

The reason for measuring the Arduino current is to verify that it is a few mA (I don't have mine handy so I don't have the number) and not AMPS.  Taking two measurements (with and without the monitor) may show that the interconnection to the monitor is causing a problem for the Arduino.  It shouldn't because of the resistors in the video signal and, again, I have no reason for thinking this way but it's the way I would proceed.

When I do these kinds of projects, I want to know voltages and I want to know currents.

In fact, maybe that's why, after decades of using wall warts, I bought the Rigol DP832 - it has digital readouts of current and voltage for each channel and I can set the constant current and overcurrent levels to prevent breathing magic smoke.  I found this quite handy when I was bringing up a Z80 project that had a bus conflict.  Without current limits, I would have been buying more chips.
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #12 on: November 18, 2018, 09:36:00 pm »
Fair enough. Let me make and eat dinner and I'll stick a multimeter on the dang thing afterwards... I should check for shorts on the power wires anyhow. Not all of the soldering in that thing is my best work!

Also, if you (or anyone else) can give me "explain like I'm two and my name is Ralph Wiggum" level instructions (i.e. 'turn this knob to this setting'), I'll drag out the ol' 422 (the o-scope) and post pictures of what it says. I'm not unwilling to haul it out -- I just don't know how to work it properly. Yet. I've got the manual, I've got the time, I just haven't taken the bother to do it, even though I should and I don't have good excuses or reasons...
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #13 on: November 18, 2018, 11:15:57 pm »
I think I figured it out, and boy is this embarrassing. It's also a testament to the ruggedness of the various chips involved...

I wired the supply rails backwards :-[ I've got 5v going to the LCD and 12v going to the everything else. Ooooops! I don't think I've cooked anything, but, by the same token... ya know, guys, I really don't think it's going to work out very well, wired like that...

I know exactly how it happened, too... to get the power socket to fit, I had to stick it in upside down.

Time to get out the iron :-\
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #14 on: November 18, 2018, 11:27:54 pm »
If the scope powers up with a trace on the screen, everything in the upper left row is fine - I'll ignore it.
The upper right is time per division on the graticule.  Set it for 5 ms for now.
The lower left is the volts per division on the graticule.  Set it for, say 1V.
Touch your finger to the tip of the probe and you should get some kind of (probably) distorted sine wave.
The rest is just details.

For using both channels stacked on the display (with 10 division) set each to 2V/division and with no inputs, separate them with channel 2 near the bottom half (1 division off the bottom) and channel 1 at the center line using the channel Position knobs.

Now, 5V signals will move each trace up about 2.5 divisions.

For both channels, you will probably want to select DC coupling with the switches near the input connectors.

There is a channel selector knob right between the 2 Volts/Div knobs.  For dual channel use you need to select either Chopped or Alt(ernate).  Chopped displays both traces at the same time by selecting one and then the other at some high frequency.  Alternate displays one complete trace and then the other complete trace, alternating between them.

Triggering locks the signals to the scope.  You will probably want to trigger on Channel 1, perhaps rising edge and DC coupled.  You adjust the Level knob up or down until the trace locks in place.

Write a simple Arduino program (or modify a Blinky program) that just toggles an output pin as fast as the CPU can run, no delay() calls.  Scope that pin and play with the knobs and dials until it makes sense.

Use a PWM example and see how the pulse width changes.

The Arduino is an excellent source of signals to test!

I'm looking at page 14 here:
http://w140.com/tek_422.pdf

Watch any w2aew videos on scopes, they are excellent.  His project for displaying NTSC on a scope if really great!  Just the thing for your project!  Zork on a scope!



Hit up his home page on YouTube and see what you find.  I know he did a lengthy presentation to a local HAM club



There is a sticky at the top of this forum, 'Oscilloscope training class (long)'.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #15 on: November 18, 2018, 11:29:47 pm »
I think I figured it out, and boy is this embarrassing. It's also a testament to the ruggedness of the various chips involved...

I wired the supply rails backwards :-[ I've got 5v going to the LCD and 12v going to the everything else. Ooooops! I don't think I've cooked anything, but, by the same token... ya know, guys, I really don't think it's going to work out very well, wired like that...

I know exactly how it happened, too... to get the power socket to fit, I had to stick it in upside down.

Time to get out the iron :-\

You aren't the first, only the most recent...  And maybe not even that!

Try a Blinky example on your Arduino before you bother with the real project.
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #16 on: November 18, 2018, 11:34:58 pm »
Blinking an LED with a microcontroller is something I do when I need a nap, ugh :=\

I'd rather use a 555 for that, anyways... I'm good with hardware that DOESN'T need programming, lol.

Thanks also for the o-scope tutorial, I'll pull it out after I fix the power supply issue. Gimme... 30min or so? I'm slow and the wiring is tight there.
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #17 on: November 19, 2018, 12:00:42 am »
Power's fixed. Alas, the SD card is toast. I'm going to see if I have another really tiny one...

EDITNESS: A friend is bringing me a new card in about an hour... testing will resume once the card is formatted and programmed.
« Last Edit: November 19, 2018, 12:06:55 am by starhawk »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #18 on: November 19, 2018, 12:34:44 am »
Blinking an LED with a microcontroller is something I do when I need a nap, ugh :=\


And if your project still doesn't work, how do you know the CPU is doing anything rational?  It's a rare project that works right out of the gate.

Think about the number of thing that have to work perfectly to get that LED blinking?
 

Offline gcewing

  • Regular Contributor
  • *
  • Posts: 197
  • Country: nz
Re: Bit of a noob, needing project assistance.
« Reply #19 on: November 19, 2018, 12:47:00 am »
This is why you always check power supply voltages when powering anything up for the first time!
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Bit of a noob, needing project assistance.
« Reply #20 on: November 19, 2018, 01:11:55 am »
Blinking an LED with a microcontroller is something I do when I need a nap, ugh :=\

And if your project still doesn't work, how do you know the CPU is doing anything rational?  It's a rare project that works right out of the gate.

Think about the number of thing that have to work perfectly to get that LED blinking?
Specifically, try a blinky LED example, with an external LED + series resistor on each pin in turn of the Arduno that your project needs, as the reversed supply may have blown out one or more of the Arduino's I/O pins.   Its quite likely that the pins that communicate with the SD card have been damaged . . .
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #21 on: November 19, 2018, 01:23:53 am »
I'm expecting more than just a blown SD card.  I'm thinking about a blown USB->Serial Bridge chip and potentially a blown USB port on the PC.  Maybe even the CPU.  But I'm a pessimist...

Again, loading any known working example (Blinky) will prove that a lot of things fared better than I expect.

Thinking about it, why risk another SD card on an Arduino that has been hammered without first proving that it survived?
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #22 on: November 19, 2018, 01:34:45 am »
I'm reasonably certain based on the blinkies on the Arduino that it survived. As for the SD card, I'm actually mildly surprised that it *didn't* survive -- that board has an internal regulator to drop the voltage to 3.3v (which is what SD cards take) and I was using that regulator... it should be the ubiquitous A1117, or so I'd think, which is good up to 18v if it's manufactured within spec. Then again, the board came from eBay, so who the heck knows what's *actually* on there or where it came from. I will finger-test that regulator (and the ATMEGA328 on the Nano) before I do anything further, though...

...I *really* hope the '328 isn't blown, I don't have another good one (I have a questionable one tho) -- and my bank account is such right now that I'd best wait till December or maybe even January before buying a new one.

Meanwhile, my friend announced a little while ago that he would be an hour late...

EDITNESS: the '328 gets moderately warm to the touch... not good. The regulator on the SD card PCB passes the heat test, though. I'm going to put the card in and try and get a response. If I don't, I'll swap in the "maybe it works and maybe it doesn't" Nano that was from another project that botched badly.

LATER EXTRA EDITNESS: to clarify, the '328 gets hot enough to give me side-eye <.< >.> but not hot enough to make me pull my finger away quickly and wave it in the air. It's disconcertingly warm, but not "you could boil water with this" hot.
« Last Edit: November 19, 2018, 01:50:25 am by starhawk »
 

Offline starhawkTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Bit of a noob, needing project assistance.
« Reply #23 on: November 19, 2018, 02:20:40 am »
Got the card... what do you folks think? Should I swap out the Nano, just to be sure? or should I try the SD card first?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Bit of a noob, needing project assistance.
« Reply #24 on: November 19, 2018, 02:27:14 am »
Putting a good SD card in a suspect SD interface on a suspect Arduino risks blowing another SD card.

Why not put the suspect Nano on a breadboard and run a sketch to test each pin in turn can drive high, drive low and return an input value?   That will tell you if your suspect Arduino is good or not.

The one that has a '328P chip that's getting hot is a lost cause if its doing that with nothing connected to its pins.

Use a 330R resistor + a LED for the output tests, first with the pin low and the LED + resistor between the pin and Vcc then again with the pin high and the LED + resistor between the pin and Gnd.
For input tests, use a 10K resistor in series with the pin, and switch the other end of the resistor between Gnd and Vcc.

You can save a lot of hassle writing test sketches if you use a pre-written remote pin control sketch and matching PC app.  Assuming you are running Windows, I like ArduinoMonitor.   The original website's down but here's a direct link to the zip file from the wayback machine.  Unpack it and read arduinomon.html for instructions.

For the SD interface, you need to check its supplying the correct voltage to the card socket and that its logic level translators haven't been damaged.   Do you have a schematic for it?  If not, post good sharp closeup photos of both side of its board, and we can probably advise you what and where to test.  If you need help reducing photos to a size this forum will accept as attachments, ask!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf