|
Post by Arduino Enigma on Aug 13, 2016 12:44:07 GMT
Look what I found...
|
|
|
Post by ZZ9pZa on Aug 14, 2016 8:03:33 GMT
Very nice. Is it working?
|
|
|
Post by Arduino Enigma on Aug 15, 2016 10:46:28 GMT
Perhaps the author will drop by to tell us...
|
|
|
Post by lpaseen on Aug 15, 2016 14:21:15 GMT
Nice thing, I see it's a tweet from Bill Lio and that you invited Bill to this forum, good. I wonder how god it works with a pot to define the 40 different positions in the UHR box, I'm planning on using a rotary encoder for my version (to be done next year some time). I just passed a milestone with my project, I now ordered v0.9 of all PCBs needed and in about 2 weeks or so I hope to start assembly of the first meinEnigma.
|
|
|
Post by Arduino Enigma on Aug 15, 2016 23:07:38 GMT
Mein Enigma is looking good. Love the logo. One thing that bothers me about an external Uhr is how would a separate microcontroller implement the bridging of one plug to another without using a separate cable to establish a common ground. I think the Uhr switch in Bill Li uses a rotary encoder, reading 40 separate analog voltage levels with a potentiometer that turns less than one revolution is the stuff nightmares are made of.
|
|
|
Post by lpaseen on Aug 15, 2016 23:57:43 GMT
uhr box, did see that the enigma-e version of the uhr box uses 20 cables despite. My plugboard has hole for 26*2 plugs but the bottom one is ground in all cases so I can make it work with dual plug and with that make it look more realistic when connected. With some luck I can figure out how to connect it with 20 wires but at worst I need 21 and if I pull 22 I won't even meed the battery. I could also cheat and just pull over the i2c connector and have it communicate that way, we see what happens.
Bills uhr, I said pot because the pictures with the breadboard shows a pot with 3 wires, of course he can have changed before putting it in a box.
|
|
|
Post by Arduino Enigma on Aug 17, 2016 1:40:12 GMT
With the bottom half of the plugs being local ground I now see how it can work. Running SPI /I2C from the Enigma to the Uhr box sure does feel like cheating, using Bluetooth on the other hand...
Also, the more I look at pictures of encoders and potentiometers, the one above sure looks like a pot. I wonder how stable each position is.
|
|
|
Post by lpaseen on Aug 17, 2016 13:23:33 GMT
Yes, with bottom half it's not to hard but EnigmaE apparently do it with just 20 plugs = no ground so it might be possible. The way I currently test it is that I put 25 ports as input pullup and then drop the 26th port, scan to see if any port dropped and if so it's a connection, then on to next port. Maybe if I instead do a pulldown on all ports and raise one, I can somehow use the 25 low as ground reference, something to thing of.
The pot would divide some voltage like 5V to the 10bit ADC. 1024/40=25.6 count for each position so not much but not impossible. Now say that the pot is 300 degrees turn, 300/40=7.5 degrees per number, that's not much. Add to that that depending on the quality of the pot it may not be that linear, resistance change between 10 and 17 degrees may be different than between 250 and 257 due to tolerances and such. Hmm, I think I have to test this my self, just to see how hard it is to get a specific number and how much it jumps around. Guess you can put a cap on the sensor line to reduce some of the noise from the pot.
|
|
|
Post by lpaseen on Aug 23, 2016 4:27:19 GMT
Did some testing with a pot and it was easier than I expected. To move it to a specific number I do have to fiddle a little and make sure it stays there, takes a few sec to do. When pot is stable the ADC value goes plus/minus 2 at most and the range is 25 so it's stable as long as you don't leave it close to some border value.
void setup() { Serial.begin(38400); }
void loop() { uint16_t val,uhr;
val=analogRead(0); uhr=val/(1024/40); Serial.print(F("ADC: ")); if (val<1000){Serial.print(F(" "));} if (val<100){Serial.print(F(" "));} if (val<10){Serial.print(F(" "));} Serial.print(val); Serial.print(F(", UHR=")); if (uhr<10){Serial.print(F(" "));} Serial.println(uhr); delay(250); }
Going from uhr 40 to uhr 39 resulted in
ADC: 1003, UHR=40 ADC: 1023, UHR=40 ADC: 971, UHR=38 ADC: 947, UHR=37 ADC: 945, UHR=37 ADC: 949, UHR=37 ADC: 953, UHR=38 ADC: 957, UHR=38 ADC: 960, UHR=38 ADC: 963, UHR=38 ADC: 963, UHR=38 ADC: 969, UHR=38 ADC: 965, UHR=38 ADC: 969, UHR=38 ADC: 974, UHR=38 ADC: 980, UHR=39 ADC: 986, UHR=39 ADC: 984, UHR=39 ADC: 985, UHR=39 ADC: 986, UHR=39 ADC: 987, UHR=39
|
|