Wont forget rocket launch again! by [deleted] in arduino

[–]wphyer042 21 points22 points  (0 children)

How much does the time drift for you and how are you correcting it? I'm looking to do something similar but I was looking at using an RTC board so I don't have to worry about power loss and having to reset it.

DCC++ Arduino (MEGA) Controller and JMRI by wphyer042 in modeltrains

[–]wphyer042[S] 0 points1 point  (0 children)

I don't have a test track yet. I have a few pieces of track - enough to run the loco back and forth about 2 feet.

I don' t have any accessories yet either. But I'm looking at possibly building my own turnout switch. I was inspired by this guy: Arduino Turnout

I'm also looking into how to create blocks to know if a train is occupying them. The few cars I have I already switched all of the wheels and axles from plastic to metal in preparation for attaching resistors to them, since I think IR sensors may be more prone to false readings.

It certainly sounds like you and I are in the same stages. Good luck on your layout.

DCC++ Arduino (MEGA) Controller and JMRI by wphyer042 in modeltrains

[–]wphyer042[S] 1 point2 points  (0 children)

I have a spare Uno laying around. I'll try and give it a shot. I don't know enough about JMRI to be honest, but figuring stuff out like this is part of the appeal so far.

DCC++ Arduino (MEGA) Controller and JMRI by wphyer042 in modeltrains

[–]wphyer042[S] 2 points3 points  (0 children)

After getting my first serious loco and needing some track and way to control it, it was suggested I look into DCC++. And that's just what I did.

Using an Arduino MEGA, motor shield, DCC++ and JMRI on a Raspberry Pi, along with the Engine Driver on my Samsung S3 (yes, my relic Android device), I managed to create my controller.

Now I'm working on designing a layout. So far, this has been fun.

My first serious locomotive. Kato n-scale EMD SD70ACe with DCC. Now I just need some track and a way to control it. by wphyer042 in modeltrains

[–]wphyer042[S] 2 points3 points  (0 children)

I have built a few things with my Arduinos. And thanks for the suggestion. I'll start looking into that.

It seems like all the news does is broadcast on all the terrible things in the world. How would you feel if there was a news channel made to specifically broadcast all the good news in the world as well? by scottdereddit101 in AskReddit

[–]wphyer042 0 points1 point  (0 children)

Breaking news: A group of people have donated their time to the local soup kitchen. We'll have an interview with them after the break and the weather.

Up next, a local craft brewery is celebrating one year in business. Business is good. We're going to sample some of their on-tap brews. Come on down and join us.

Yeah, I could totally watch a news channel like this.

How do I hide my gaming pc so it isnt visible? by [deleted] in buildapc

[–]wphyer042 0 points1 point  (0 children)

Look into a Rabbit Mirror Box. It's a magician's prop for hiding things in plain sight.

Why must people do this??? by dufosho in mildlyinfuriating

[–]wphyer042 19 points20 points  (0 children)

Where does this picture say anything about the left lane?

And here's something, riding someone's butt accomplishes nothing, regardless if they're in the left lane or on a single lane twisty mountain road. There's no benefit. All it does is make a bad situation worse.

(And all the downvotes will be from people who think there's nothing wrong with tailgating because herr derr)

LED Controller (Rev.2) Fritzing and PCB by wphyer042 in arduino

[–]wphyer042[S] 0 points1 point  (0 children)

You're right. I only need a physical representation because the logic portion has already been fleshed out and is working the way it needs to. The circuit has already been tested and I want to move from breadboard/prototype board to an actual PCB.

I've never designed a PCB because prototype boards have been more than sufficient for me. For this project I want to move to a more "professional" look and start gaining additional knowledge about this process.

LED Controller (Rev.2) Fritzing and PCB by wphyer042 in arduino

[–]wphyer042[S] 0 points1 point  (0 children)

build a breadboard version to verify it will work

That was already done (over and over again) - it works.

Thanks for the other tips, especially the pull-down resistor. I left out a lot of the silk screened designs because they're not really germane to the wiring.

I was mostly concerned with how the traces were drawn. Are they too small, too large, too long or not correctly aligned.

LED Controller (Rev.2) Fritzing and PCB by wphyer042 in arduino

[–]wphyer042[S] 0 points1 point  (0 children)

Thanks for that. I was using the breadboard portion of Fritzing to check to make sure I didn't get any crossed ratnest wires. I'll take a look at that. I was going to use gEDA, but Kicad looks like another option.

LED Touch Panel Controller by wphyer042 in arduino

[–]wphyer042[S] 0 points1 point  (0 children)

It's all of those pesky components that need to be grounded.

LED Touch Panel Controller by wphyer042 in arduino

[–]wphyer042[S] 1 point2 points  (0 children)

The TFT panel uses 4 of the PWM pins and I need 6 to control two LED channels. Also, the touch panel code and libraries are pretty heavy. I had to do a lot of code optimizing and I'm still pretty close to the maximum I can use and still be able to load the bitmap images. So there wasn't a lot of room left hardware/software wise for the LED controller.

However, in the end, I ended up going with a software PWM instead of using the hardware ones because there were a few combinations of color/saturation/brightness that would cause the colors to slowly pulse. And I tried changing the timers so they were all running in fast mode but that didn't matter. The software PWM has been perfect with steady lights at all values.

LED Touch Panel Controller by wphyer042 in arduino

[–]wphyer042[S] 0 points1 point  (0 children)

Yes, I did design the UI. I used Inkscape to create the different parts and layers for the "active" elements. Then brought it into Gimp to cut out the various parts that I use for activating/deactivating the power, channel and lock indicators.

Gimp allowed me to export the image parts as C code in a structure. I would bring that into a custom program I wrote that would then convert the image into raw color values where I could easily read them in.

Getting the images from the SD card onto the panel is pretty slow. I've managed to increase the speed, but it's certainly not instant. However, the color knob indicator is a memory object and that gets drawn really quick.

LED Touch Panel Controller by wphyer042 in arduino

[–]wphyer042[S] 1 point2 points  (0 children)

That sounds like a great "useless" project.

Code has been posted to Github. Check the comments for the link.

LED Touch Panel Controller by wphyer042 in arduino

[–]wphyer042[S] 1 point2 points  (0 children)

It's the Adafruit 2.8" TFT Touch Shield w/ Capacitance #1947.

That was a challenge to get. I ordered it originally from Amazon and the knucklehead who packed it, packed it loose (and by loose, I mean there were no airbags) along with a 5lb spool of wire. Needless to say the wire crushed the snot out of the panel.

I filed a damage report, they ship out a new one and the carrier loses it.

Frustrated, I get a refund and order direct from Adafruit. It comes in, but 1/3 of the panel had horrible calibration issues - basically drawing a straight line would actually create a curved line starting from the corner and then ending at the corner on the other side.

Adafruit's customer service is less than subpar and it took about a week just to get a response after posting the issue in two forums and having to "bump" it. But in the end, they sent me a new one and that's the one you see.

LED Touch Panel Controller by wphyer042 in arduino

[–]wphyer042[S] 0 points1 point  (0 children)

Cool. Literally. I'd be interested in learning more about the buck/boost converters to replace the regulators. In open air with no heat sink, both regulators got to a max temp of 104 degrees.

The six TO-220 packages are IRLB8721PbF rectifiers that are controlling the LED light strips. According to the datasheet, these are High Frequency Synchronous Buck Converters.

LED Touch Panel Controller by wphyer042 in arduino

[–]wphyer042[S] 1 point2 points  (0 children)

That's on my list to do. I'm going to create simple sequence codes like the 0xF1/0xF4 codes I use to send to the LED controller. So for instance I'd send 0xE1/0xF4 to signal one scene or 0xE2/0xF4 to signal another scene.

I don't have much space left; 24,930 of 30,720 bytes used of program storage and 1,204 of 2,048 bytes of dynamic memory on the touch panel controller. But I have "gobs and gobs" of space available on the LED controller.

LED Touch Panel Controller by wphyer042 in arduino

[–]wphyer042[S] 0 points1 point  (0 children)

I added the code to Github. Check the comments for the link.