3 SpokePOVs, one wheel, image not aligned on left side only.

SpokePOV kit for bikes

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
toddfun
 
Posts: 37
Joined: Sun Nov 16, 2008 5:24 am

3 SpokePOVs, one wheel, image not aligned on left side only.

Post by toddfun »

I have installed 3 SpokePOV boards on one front wheel. I have coded an arrow to point forward. The arrow appears just fine on the right side but on the left side the arrow shows it's front half high by 1/2 the thickness of the board and the back half of the arrow is low by 1/2 the thickness of the board. The two halves of the arrow and the image on both sides of the wheel are exactly level with the ground (no rotation problems).

I have tried mirror and no mirror for all banks on all boards which did not make any difference. The image is always split on the left side of the wheel with the front high and the back low. Plus, the image never mirrored even though I saved all the banks on all boards mirrored once and also not mirrored once. I think I'm having two problems. One is the mirroring feature is not working and the 2nd is that the firmware on the boards doesn't seem to be correct for the displaying the left side.

I should mention that I have wired the three boards to one sensor and removed the two extra sensors. I tested the boards and they do all fire off the one sensor. I also run my animation at 1 rotation per bank for the winking eye animation my daughter created. (see attached photos which also shows the alignment issue on the left side).
(good side) This is a happy face with a winking eye.  This is the right side and the mouth is level as is should be.
(good side) This is a happy face with a winking eye. This is the right side and the mouth is level as is should be.
100_2278.JPG (103.15 KiB) Viewed 4941 times
(bad side) This is the left side and the mouth is not level and I need help to correct this strange issues.
(bad side) This is the left side and the mouth is not level and I need help to correct this strange issues.
100_2282.JPG (96.4 KiB) Viewed 4941 times
(NOTE TO OTHER SpokePOV USERS): I found that I have to take the batteries out of the two boards not being programmed when connecting to the board being programed. The wiring of the three board's sensors together caused some kind of random communication issues with a board being programed if the other boards are not hard off.

kayrock66
 
Posts: 150
Joined: Tue Oct 09, 2007 1:06 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by kayrock66 »

I'm going to venture to guess this is an unintended side effect of using a single Hall sensor. You had to offset each board's rotation angle from each other right? Try using separate sensors and see if this fixes the alignment.

I know the problem you're trying to solve which is you want animation but it doesn't look very good unless the boards are synced up.

I did a design with a central controller and N slave display boards just for that reason.

User avatar
toddfun
 
Posts: 37
Joined: Sun Nov 16, 2008 5:24 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by toddfun »

(kayrock66) I wouldn't agree because if it was just a sync issue with the 3 boards then the right side would also have an issue but it does not. The right side is "bang-on" where as the left side seems to have some kind of calculation issues with the image positioning. My bet is still on firmware problems. Plus, how could that affect my none mirror issue?

I'm going to still try your suggestion and post pack later. If your right then a firmware update would still be able to fix the issues being the right side is not exhibiting this problem.

(adafruit) Who works on you firmware for these boards? Can you have them contact me or have them try to reproduce my problem with the current firmware, software and single sensor?

kayrock66
 
Posts: 150
Joined: Tue Oct 09, 2007 1:06 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by kayrock66 »

New theory: The software that converts BMP images into data for download makes an assumption that the LEDs when mounted on the wheel form an exact radial from the center outward. In reality they don't. The leds are mounted in 2 parallel arrays on oppisite sides of the board offset from the center. One side of the board the rows are mounted .5" from center, the other side has the LEDs mounted 1" from center. With 2 boards mounted 180 degrees apart the led rows are 1" offset for one side of the wheel and 2" apart on the other. This creates a kind of skew disortion in images with one side of the wheel being worse than the other.

User avatar
toddfun
 
Posts: 37
Joined: Sun Nov 16, 2008 5:24 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by toddfun »

@kayrock66
Fine logic but then why is one site 100% correct? I don't load the software differently for right side then I do for left side. I only load it once and the firmware needs to correctly calculate the position, which it does for the right side correctly, but not left side.

So once again this means firmware issue, at least when running with all boards off one sensor at 1 frame per rotation and the offsets for each board at:
Board 1: 245
Board 2: 75
Board 3: 160

kayrock66
 
Posts: 150
Joined: Tue Oct 09, 2007 1:06 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by kayrock66 »

On one side it's close to being correct because of the physical location of where the LED array happens to line up with the wheel radial, but not the other. The jives with my own experience putting text on Ladyada's Spokepov's and noticing some distortion on both sides but worse on one than the other.

To show the idea you might create a pattern with radials one pixel wide at 90 degree intervals. It would look like the reticule on a rifle scope. Spin the wheel and see that the lines are slanted rather than orthogonal. You can do this with a single board.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by adafruit »

it may be a firmware bug. but it sounds like its more just alignment because the LEDs are offset on the opposite side.
in which case, you're kinda stuck unless you're willing to tweak the image. :/
you could possibly fix it with some firmware hacking...not sure
we've never seen this problem (or heard of it in the 4 years we've had spokepov out) but we also dont expect precision when we program our spokepovs :)

User avatar
toddfun
 
Posts: 37
Joined: Sun Nov 16, 2008 5:24 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by toddfun »

I tried just one board and had the same problem as I did with all three boards. I reinstalled the sensors on all three boards and each board had the same problem independent of the other boards.

Time to check out the schematic and code I guess :(

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by adafruit »

dont forget, you have to think about polar coordinates (spokepov) vs cartesian (your image)!

User avatar
toddfun
 
Posts: 37
Joined: Sun Nov 16, 2008 5:24 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by toddfun »

It actually turns out to be a mounting geometry issue as noted by kayrock66 (above) which is unavoidable because of the layout of the LED’s on the board. The old “round peg in a square hole” issue. It took one of those “Should have had a V8” moments :lol: to finally grasp what kayrock66 was telling me. What follows is my troubleshooting approach and detailed conclusions and solutions.

<<Troubleshooting steps, detailed conclusions and solutions>>
First I tried just one board and had the same problem as I did with all three boards sharing a single sensor. I then reinstalled the sensors on all three boards and each board had the same problem independent of the other boards.

I was convinced it was firmware so I downloaded the “C” code and started going through that but nothing jumped out at me as being a code issue between how the left and right side of the wheel was controlled.

I started examining the circuit schematic. It appeared to me that the latch select lines between the left and right side of the wheel maybe shorted or somehow crossed causing them to fire as if they were one side. I took out the MC and started tracing the 12 pins on all the latches. But my DMM said the two sides where not crossed physically so that wasn’t the problem.

Some brute force troubleshooting was in order. I pulled out the MC and bent pin 9 out (“Back Select” on schematic) and re-inserted the chip.
Pin 9 on MC bent out.
Pin 9 on MC bent out.
100_2318.JPG (145.88 KiB) Viewed 4895 times
Without pin 9 connected nothing was controlling the left side of the wheel so it was dark and as expected only the right side was on and the image looked good. I then repeated this test but this time I removed pin 8 (“Front Select” on schematic) and reconnected pin 9. Now only the left side had lights on and the image was skewed as before with half the image high and the other half low.

I next bent out both pins 8 and 9 on the MC but then crossed pin 9 to the connection point on the PCB where pin 8 would normally be connected. At this point I would have expected only the right side to have lights and for the image to be skewed as it was when this pin controlled the left side. But that didn’t happen. The image was on the right true enough but the image looked just fine, not skewed at all. How could this be? If the problem was a firmware issue or other timing issue then pin 9 controlling pin 8’s side should have the same problem but it didn’t. The problem just seemed to evaporate.

I sat for a while just looking at the wheel and how the boards were mounted and then eureka! The problem now made complete sense. The board is square and the wheel is round! That can’t work because only one row of lights on one side can be pointing at the center of the hub which means the other side will always be skewed as it’s being drawn thinking the center of the wheel is in a different location than it really is.

I had mounted the boards flat on just one side of the wheel along one of the spokes. The boards are square and the lights are all aligned along the edges therefore only one row of lights on one side can be pointed at the center hub.

Below is a photo of the good side where the LEDs line up almost perfect with the hub
(I drew in red lines to extend the line of LEDs through the center hub.)
(The wheel is mounted in a test rig I welded up and clamp in my bench vise.)
Good side with LEDs that point to center hub
Good side with LEDs that point to center hub
radial lines on good side in vise.jpg (506.7 KiB) Viewed 4895 times
Below is a photo of the bad side where the offset LEDs on the back side of the board are skewed to the side of the center hub.
(I drew in red lines to extend the line of LEDs skewed to the side of the hub)
Bad side with LEDs that skew off to the side of the center hub
Bad side with LEDs that skew off to the side of the center hub
radial lines on bad side.jpg (318.89 KiB) Viewed 4895 times
This install method forces the lights on one side of the board to be pointed radial at the center hub leaving the other side’s row of lights skewed and NOT pointing at the center of the hub. I zip tied one edge of the PCB along one spoke and since my bike has a very small center hub ring for the spokes to connect to the problem was exaggerated over other bikes that have a larger center hub spoke ring.

This is an unavoidable side effect of the board layout and at best you can mount the boards NOT following a spoke and splitting the difference so that each side is slightly skewed but not as dramatically as it would be if you centered just one side of lights with the hub as I did. I guess one could also put the boards in the center of the spokes between the left and right side of the wheel and put a twist in the bottom of the board closest to the hub helping each row of lights on each side point a bit closer to the center of the hub.

A triangle shaped PCB board may have been a better choice and would have allowed the LEDs on both sides to fall along a true radial line with the hub. Maybe this is a good idea for v2.0 perhaps.

I’m not sure this alignment issue can be corrected in the software or not. It would be more of a Hubble Telescope corrective surgery then anything else. Maybe the user could be instructed to measure the offset between the hub and row of LEDs on each side of the board allowing the software to introduce some corrective timing. If anybody wants to tackle this corrective surgery of the firmware I’m sure all users of this board version would be greatly appreciative! Drop me a line if this ever comes to fruition.

For now my solution to this problem is going to be a pricy one. I plan on just cutting the 9 pin on each MC for all three boards so the LEDs on the left (inside) are off. Then I will get another 3 boards for the other side and cut the 8 pins or just not soldering on the right side components. I will wire all 6 boards to a single sensor, have the outward facing LEDs 100% inline with the center hub and each board will have its own rotational offset. This will create perfect animation on either side at all speeds.

User avatar
toddfun
 
Posts: 37
Joined: Sun Nov 16, 2008 5:24 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by toddfun »

Wait! :idea:
I have a cheaper solution then buying 3 more boards but it will take some design time first. I will create a raiser board that bolts to the current SpokePOV board inline with the right side LEDs but on the opposite side of the board. I can then move all the left side LEDs to this new raiser board. Then both sides will have a line of LEDs 100% inline with the center hub.

I may have to design the board so the 4 latches also move to the raiser just to keep the wiring between the two boards at a minimum.

When I’m done with the raiser board design I will post the Eagle and Gerber files alone with SpokePOV board modifications, wiring and mounting instructions on my blog site. Others can then etch and mount their own “Corrective Raiser image Board” (I will call it the CRiB board :lol: ).

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by adafruit »

ah I see what you mean. i assumed it was because of the parallel LEDs but as you noted its a mix of mounting and parallel LEDs - each one contributing.

the only proper way to truly fix this is to have the LEDs on the same line. so if you were ok with one side being flipped, solder LEDs so that they use the same solder pads. then mount the spokepov so its perfectly radial.
either way, your needs may require a custom design!

kayrock66
 
Posts: 150
Joined: Tue Oct 09, 2007 1:06 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by kayrock66 »

Wow great documentation, I'm glad the old light bulb turned on. My latest and greatest design actually is a triangle so the LEDs can be exactly radial.

There is a software/firmware work around for your problem if you are a software inclined person. This would be to sample the Cartesian image on skewed radials that approximate the position of the LEDs. Then when the uC plays back the image data, it will be in the right place. There might also be a Photoshop effect that twists the image from the center in the same way. I've written software in Matlab that creates .dat files for my various experiments bypassing the image sampling in the software. I did this to get real clean text and Pacmen. No reason you couldn't do the same thing for this issue. So that's the software side.

Next there is a firmware component because the current firmware uses the same image on both sides of the wheel. You would have to modify the firmware to use a different EEPROM address bank for the opposite side images. You can put larger EEPROMs in that socket and the software will recognize it with more banks as far as I remember. I think I've had 8 or 16 banks, can't remember now.

User avatar
toddfun
 
Posts: 37
Joined: Sun Nov 16, 2008 5:24 am

Re: 3 SpokePOVs, one wheel, image not aligned on left side only.

Post by toddfun »

@kayrock66, Once again, great logic! I really would like a software only solution but I have decided to going with my CRiB board hardware solution. A simple raiser board to remount the backside LEDs in line with a radial will be an easy hardware hack and will fix my issues.

Locked
Please be positive and constructive with your questions and comments.

Return to “SpokePOV (discontinued)”