May 22, 2018 at 6:26 pm #60403
If you wanted to go that far there is no extra cost in just bypassing it.May 22, 2018 at 6:31 pm #60404
Pretty much just remove the current controller & wire in the new controller, correct?May 23, 2018 at 2:34 am #60412
I got my PC back, but am busy working on my new MP3DP V2 printer instead… (And am quite frustrated with the sensor, waiting for an order…)May 23, 2018 at 7:26 am #60415
This is looking really good. Looking forward to a ‘buy it now’ button in the shop with everything ready to go 🙂
1 user thanked author for this post.May 31, 2018 at 11:48 am #60781May 31, 2018 at 11:51 am #60783
But, where are they?May 31, 2018 at 12:04 pm #60784
HAHAHAH, I really need to plug one in first. Need to test at least one of them. I pack a few boxes, answer some questions, plug in some wires, clean up my test bench……ahhhhhh too excited!
I really need to make a little box, I really hate shocking myself so I need a cover. Gnarly PID box….May 31, 2018 at 12:18 pm #60786
Didn’t you just say a giant box just showed up? Add some tape. Done!
1 user thanked author for this post.May 31, 2018 at 12:21 pm #60787May 31, 2018 at 6:26 pm #60801
Okay, the signal is great I had 60-840 as a best range out of a max 0-1024. The sensor wires will be passing directly between the AC switch wires so we will see if or by how much the signal degrades. I don’t think more than a few hundred are needed since we are just looking for rising and falling edges.
Todd, went with a cap inspired by you. Got the sensor closer, added a light baffle, and a place to cable tie it in. This allows for some adjustments if needed.
Sharpie and WhiteOut, seems to work better than the reflective decal. But I wan to revisit this now that I have a better light baffle in place.
Attachments:May 31, 2018 at 6:46 pm #60807May 31, 2018 at 9:26 pm #60817
Now I really need it to show up in the shop. 🙂June 1, 2018 at 4:55 am #60827
Will have to fire up the 3D Printer and print a new cap as soon as you post it online. I have all the parts and am ready to go.June 1, 2018 at 11:50 am #60846
My bad, I thought I attached it.
Wiring it up, commenting out the LCD stuff….Maybe a real test?
Attachments:June 1, 2018 at 2:23 pm #60854
Dang it, the new sensor is not cooperating. Maybe the signal is not as clean as I had thought, it is routed right between two live power lines….June 1, 2018 at 3:07 pm #60856
Hmm. So this is the raw microsecond values it reads. This put it somewhere near 27,000rpm, wide open, no PID, hardwired.
The little dips are messing with the PID. Capacitor or software filter? No idea.
I would not know how to add a CAP to filter this kind of thing. I rerouted the wires a little bit and got an ideal signal.
Attachments:June 1, 2018 at 3:30 pm #60861
Okay, rerouted the wires even more. No glitches, max spikes +-250RPM @~27000, raw hardwired. Back to the PID now.June 1, 2018 at 3:41 pm #60862
Do you think we may have to use shielded cable?
Also hit the 3D printed cap with some flat black paint to cut down on the shine of the plastic.
I also put some black paint on the Dewalt under the cap. Need to keep the IR light from bouncing around under the cap.
Hope to change out my cap this weekend and will see how the data looks after to goes all the way back to my control box.
May also try to find some shield cable.June 1, 2018 at 4:05 pm #60863
I moved around the wires and by itself it has a great signal.
Drop the PID sketch back on it and it is horrible again. The raw time has random 12’s and 24’s, not even just the 1k drop outs. So I think there are some sketch issues. Not sure what is going on, or why it is different. I tried reading rising edge instead of falling, no different.
Just in case I am cleaning up my test bench and moving all the cords to the same power strip and everything. It gets a little frantic and messy when the goal is so near.
Soooooo, close…June 1, 2018 at 4:14 pm #60864
Looking at the pic with the dips, you are looking at the processed value. The actual signal light be stuttering a little bit, causeing two quick edges. The simplest thing I can think of is a small median filter (software) on the microsecond values. If you keep the last 5 numbers, and drop the two highest and two lowest, you’ll be able to reject these outliers. Even a small filter on the input could also reduce the stuttering (a debounce circuit). That might eliminate the outliers completely.
The median filter is a little tricky, because you need to keep the last 5 values (so, a circular buffer) and then sort them, without moving your buffer. It’s not rocket surgery though.June 1, 2018 at 4:19 pm #60865
You can also cheat.
If new measurement < old measurement * 0.05
// Reject it.June 1, 2018 at 4:23 pm #60866
I think it is the sketch somehow. I have to run to the post office real quick but I am going to do a clean up of it (get rid of the LCD stuff), read the same values with the same variables, one just plain reading rising times, one with the PID loop (but not running on it). The values are too far off when the loop is running…but it wasn’t with the other sensor.
I am sure you are right about a filter though. I just want to make sure the hardware is as proper as possible first.June 1, 2018 at 4:27 pm #60867
Your sketch is just fast enough to catch it.June 1, 2018 at 4:41 pm #60868
Oh… so maybe limit the reading to no faster than Max RPM, plus a little overhead?
Back from the PO and Cleaning it up now and trying without moving or touching anything.June 1, 2018 at 4:53 pm #60869
everything connected and powered up even if I am not using it. The issues are there. So a raw test next (solo board only the 3 sensor wires).
This is a good sketch to test the filtering (or whatever solution) on I would think, the same but…naked. Dam I knew the encoder was better but not by this much.
Attachments:June 1, 2018 at 5:22 pm #60872
The signal is kinda wonky only when the ground is connected between the rambo and the nano.June 1, 2018 at 5:23 pm #60873
Yeah. This is a good test script, after you’ve cleaned it up enough to trip the interrupt.
The 12/24 doesn’t bother me, but the 1100 does. That’s pretty far off of the mark.
Why dont you bring it over to my shop and we’ll take a look 😉June 1, 2018 at 5:24 pm #60874
The signal is kinda wonky only when the ground is connected between the rambo and the nano.
Do you have a ground loop? Two ground wires connecting the same two grounds?June 1, 2018 at 5:40 pm #60877
Well, yes and no. Its a mess but it is as simple as I can get it I think.
To test I have the rambo powered, USB to computer, ground and 2 signals to the nano. Bad things happen without the ground.
The nano is also Usb to the next computer port, sensor wires, ground power signal to the dimmer. Dimmer is powered. All the power is in the same power strip.
I can’t monitor the speed or signal but I did just try power to nano from the rambo (how it should be when finalized), no USB. Didn’t seem to help.
Scope might help if I knew how to troubleshoot with one. I have about 1 hour worth of experience with one.June 1, 2018 at 5:42 pm #60878
30000 RPM is 500rps or 2000us period. Ignoring anything that’s less than 1500 would be reasonable. It’s definitely strange that you’re getting an edge in the middle of a cycle. (The two 1100ish nimbers means it’s triggering twice, probably).
I think a 5 element median filter makes sense. I’ll think about a clever way to implement one in arduino. Even if you fix your hardware issue, someone else will hit something similar. For now just cut out anything under 1500.
You must be logged in to reply to this topic.