Another Blade Runner thread: The Portable Voight-Kampff Scanner

IIRC, the new LAPD HQ is in the 'fifth sector,' for whatever that's worth. They had sector signs in 2019 as well. I think there's a faint "5" on the roofline of the new building, and some of the signage says that as well (SDCC pic attached).
 

Attachments

  • img_3246.jpg
    img_3246.jpg
    510.5 KB · Views: 137
  • modelshot1.jpg
    modelshot1.jpg
    335.5 KB · Views: 138
If you take a look at some of the 'paperwork' and police props from SDCC, they have some gibberish numbers for filler text, and some Chinese / Japanese as well. There's also some kind of ... barcode-looking thing they use as an accent, too. If you need some more filler material.
 

Attachments

  • IMG_4232.jpg
    IMG_4232.jpg
    132.7 KB · Views: 150
  • IMG_1193.jpg
    IMG_1193.jpg
    1.4 MB · Views: 162
  • IMG_1195.jpg
    IMG_1195.jpg
    1.5 MB · Views: 165
This is so awesome! Every time I think you can' possibly make it any better you do. If you're still working out animations for power up/down maybe consider this little bit from when Deckard finishes his test of Rachel in the original:

https://youtu.be/g-DkoGvcEBw?t=2m31s

I love it, and I'd love the nod to the original, but I'm not sure I can do it as a power-down effect because the device turns off as soon as the power button gets cut. I'll look into any options that might let it operate for a second or two after the device has power removed, though.

Edit: Apparently there are little components called "supercapacitors" that retain enough juice that you might be able to show something on the screen on the way out. I'll dig deeper on this.

If you take a look at some of the 'paperwork' and police props from SDCC, they have some gibberish numbers for filler text, and some Chinese / Japanese as well. There's also some kind of ... barcode-looking thing they use as an accent, too. If you need some more filler material.

A closer look: #453

Yeah, I pulled the "SEC CODE" detail off that thing. The Selective Service thing seemed a bit too long.

That barcode-looking thing might work decently. I think there might even be native font support for some of those shapes in Adafruit's GLCD font... ▄▐ █▐▀▄ ▀ ▌kind of thing.

I think the level of filler that's on the profile pages right now is decent, but I'm still definitely open to suggestion. I want to make it easy to totally change the information on here to suit the buyer.
 
Edit: Apparently there are little components called "supercapacitors" that retain enough juice that you might be able to show something on the screen on the way out. I'll dig deeper on this.

yup.. looks good :)
I bought one of those screens and paired them with my teensy I had laying around. I made a small circuit to detect the power loss (basically a diode and two resistors).
Then I tested the power down animation I proposed earlier (old TV style) with a few capacitors I have (about 50mF in total, this should be quite small as a supercap).

The result: The animation works fine and I think looks quite good :)
https://youtu.be/lco85M56gQw

Implementation is quick and dirty right now, so nothing to show here.
Key is to not write to the display when the animation is finished. Else the display will stay white on the next power cycle (I guess it has something to do with undervoltage...).
What do you think?
 
Last edited:
yup.. looks good :)
I bought one of those screens and paired them with my teensy I had laying around. I made a small circuit to detect the power loss (basically a diode and two resistors).
Then I tested the power down animation I proposed earlier (old TV style) with a few capacitors I have (about 50mF in total, this should be quite small as a supercap).

The result: The animation works fine and I think looks quite good :)
https://youtu.be/lco85M56gQw

Implementation is quick and dirty right now, so nothing to show here.
Key is to not write to the display when the animation is finished. Else the display will stay white on the next power cycle (I guess it has something to do with undervoltage...).
What do you think?

Awesome. You know, I made a post on the Adafruit forums about this and the response I got there seemed to suggest that I'd be out of luck. Very interesting that you've managed to do it in the way they said wouldn't work. I had started shifting to figuring out a secondary on/off power switch with the rationale that doing it that way would allow the display/readout to continue while the device was closed, after a scan.

This leaves me with a bunch of questions:


  • What kind of caps are you using?
  • What's their nominal output voltage?
  • What's the power loss circuit you've got in place? I haven't looked into how the power loss detection works, so I'd be very interested to know the arrangement.
Basically, I'd love to ape the setup you have doing that so I could springboard off it and do the rest. I don't actually know a lot about capacitors beyond the "fairy dust" .1uF caps that get used on things like Neopixels to smooth their data signal.

I appreciate you taking the time to rig this up and contribute, it helps a lot.
 
As I said, the caps I'm using are not a good solution, as they are quite big in dimension. I have 5 Caps with 10mF each. Their nominal voltage is 10V which is not needed as they are running at 3.3V only.
They look like this:
vNwJWkm.jpg

As I said, this is just what I had around. I have searched around a bit and found supercaps with a nominal voltage of 5.5V and 220mF at a diameter of 10mm and 5mm height. I guess these should work way better with the size constraints. And they have about 4 times the juice of my setup there.

My circuit looks like this:
fcZgSxI.png
The downside with this is that we have a voltage loss of about 0.3V at the diode (I can look for a more suitable one if this is what we end up using). That means we would need about 3.6 V at the input side to get 3.3V on the supply side.

What is the output of your voltage regulator?

/edit: for the final circuit a resistor (just about 5Ohm or something) should be added in series with the switch to avoid it getting overloaded with the charging of the capacitor.
 
Last edited:
As I said, the caps I'm using are not a good solution, as they are quite big in dimension. I have 5 Caps with 10mF each. Their nominal voltage is 10V which is not needed as they are running at 3.3V only.
They look like this:
View attachment 774917

Hahaha, yeah, that'd be a bit of a challenge.

As I said, this is just what I had around. I have searched around a bit and found supercaps with a nominal voltage of 5.5V and 220mF at a diameter of 10mm and 5mm height. I guess these should work way better with the size constraints. And they have about 4 times the juice of my setup there.

My circuit looks like this:
View attachment 774919
The downside with this is that we have a voltage loss of about 0.3V at the diode (I can look for a more suitable one if this is what we end up using). That means we would need about 3.6 V at the input side to get 3.3V on the supply side.

What is the output of your voltage regulator?

I'm assuming these might the kind of supercaps you're talking about?

The LiPo batteries max out at around 3.7 volts. I don't know as much about Teensy 3.2 as the arduino brands I usually go for. The Pro Trinkets can usually work with a power source decaying into the mid-2-volt range. Based on the PJRC.com page we've got a 3.3 volt regulator on the board that can take a maximum voltage input at 6 volts, and the 'operating parameters' page suggests that the Teensy 2.0 can operate down to 2.4 volts, though it says nothing of the Teensy 3.2. Would lead me to believe a 5.5v cap could work OK here.

/edit: for the final circuit a resistor (just about 5Ohm or something) should be added in series with the switch to avoid it getting overloaded with the charging of the capacitor.

Makes sense, I think. My concern right now is that I'm looking at building a rechargeable circuit into the VK - something like these - and I'm not sure how that would play with a supercap. I'm assuming they must have a polarity and flow only in one direction?

Edit: I think, if I understand your diagram correctly, the purpose of the diode in that arrangement is simply to cut the cap off from the battery, right? Want to make sure I grasp everything, I'm a poor electrical engineer. With the 10k resistor in situ, what is the sense-pin actually picking up in terms of signal? I would have assumed you wouldn't need R1 on this.

Further edit: If I'm understanding these schematics correctly, the Teensy 3.2 uses an LP38691 regulator. These say they have a minimum range of 2.7V and 10V max input, though I'd be more likely to believe the 6V max limitation as noted by PJRC.
 
Last edited:
I'm assuming these might the kind of supercaps you're talking about?
yes, exactly.

The LiPo batteries max out at around 3.7 volts. I don't know as much about Teensy 3.2 as the arduino brands I usually go for. The Pro Trinkets can usually work with a power source decaying into the mid-2-volt range. Based on the PJRC.com page we've got a 3.3 volt regulator on the board that can take a maximum voltage input at 6 volts, and the 'operating parameters' page suggests that the Teensy 2.0 can operate down to 2.4 volts, though it says nothing of the Teensy 3.2. Would lead me to believe a 5.5v cap could work OK here.

I don't think the teensy is the limiting factor here. What I'm seeing is that the display goes completely dark before the teensy actually stops blinking its data LED. I don't know which parts of the display are limitting. I tried to connect the Backlight pin directly to the battery but that doesn't help at all and the display goes dark at the same time as before.


Makes sense, I think. My concern right now is that I'm looking at building a rechargeable circuit into the VK - something like these - and I'm not sure how that would play with a supercap. I'm assuming they must have a polarity and flow only in one direction?

Edit: I think, if I understand your diagram correctly, the purpose of the diode in that arrangement is simply to cut the cap off from the battery, right? Want to make sure I grasp everything, I'm a poor electrical engineer. With the 10k resistor in situ, what is the sense-pin actually picking up in terms of signal? I would have assumed you wouldn't need R1 on this.

Regarding the charging circuit: This should work fine. Most of the time the device would be charging with the scanner closed. So the supercap should be disconnected. But even with it connected it should not affect the charging that much. It should be tested though.

To my schematic: the idea is that we need a point to detect if the voltage is dropping. I didn't want to measure the voltage of the cap directly because it could be too late by the time we notice (we could try this, maybe we can get rid of the diode then). To achieve this, I needed to separate the sense-pin from the supercap. Without the diode, the sense-pin would read the same as the supply voltage of the teensy.

As soon as the switch opens up, the voltage will drop because of R2 (10k is just random, it could be bigger to reduce idle current). Now the voltage of the supercap is higher and the diode is stopping the voltage to flow back to the sense pin. This results in the sense-pin reading logical low. It is reading logical high when the switch is closed and the battery is connected. I read the sense-pin as a digital input right now.

So why is R1 needed? I added it as a protection for the teensy input pins because the voltage on the sense-pin (high) is actually higher than the supply voltage of the teensy because of the diode. I don't know if this is strictly required with the teensy or if the pins are 5V-tolerant anyway. I would need to check that.

I hope that helps.
 
I don't think the teensy is the limiting factor here. What I'm seeing is that the display goes completely dark before the teensy actually stops blinking its data LED. I don't know which parts of the display are limitting. I tried to connect the Backlight pin directly to the battery but that doesn't help at all and the display goes dark at the same time as before.

Sounds like I might have to set this up and try it myself with that supercap and see what happens. I'll order some now.

To my schematic: the idea is that we need a point to detect if the voltage is dropping. I didn't want to measure the voltage of the cap directly because it could be too late by the time we notice (we could try this, maybe we can get rid of the diode then). To achieve this, I needed to separate the sense-pin from the supercap. Without the diode, the sense-pin would read the same as the supply voltage of the teensy.

As soon as the switch opens up, the voltage will drop because of R2 (10k is just random, it could be bigger to reduce idle current). Now the voltage of the supercap is higher and the diode is stopping the voltage to flow back to the sense pin. This results in the sense-pin reading logical low. It is reading logical high when the switch is closed and the battery is connected. I read the sense-pin as a digital input right now.

So why is R1 needed? I added it as a protection for the teensy input pins because the voltage on the sense-pin (high) is actually higher than the supply voltage of the teensy because of the diode. I don't know if this is strictly required with the teensy or if the pins are 5V-tolerant anyway. I would need to check that.

I hope that helps.

All of that makes sense and I really appreciate the explanation. The Teensy's pins are 5V tolerant, but I understand better now why you'd put that in. Thanks.
 
Are all these electronics still going to fit in the:
The Portable Voight-Kampff Scanner
body with the pop-up function?

They won't be going in unless they fit. The end goal is still to have the thing look the part and slide open properly, and I won't compromise that for any of my own dreamed-up features.

I have no doubt as to the viability of the screen and the microcontroller (Teensy), or the speaker. All of that is already budgeted for. This supercapacitor that we're discussing is a neat option, and I think the one I linked upthread would fit in the device, but I'll have to buy a couple and see. If there's no room for it, I'll figure out another way of accomplishing the same effect, maybe with a secondary limit switch.
 
Giving thanks for Thanksgiving, at least for the time off it gives me.

Profile pages are coded up and done now. I've made things easy for myself here by setting up a few profile 'types' in advance that I can change with a flag in the code.

Code:
//0 = K, 1 = DECKARD(YOUNG), 2 = CUSTOM HUMAN, 3 = CUSTOM REPLICANT, 4 = CUSTOM INDETERMINATE
#define userSelect 0

//0 = WALLACE CORP REPLICANT, 1 = TYRELL CORP REPLICANT. Only used if User is Replicant.
#define replicantType 0

By changing these two defined values, I can switch what shows on the profile page. A default unit that shows its operator as Officer K would have the userSelect flag set to 0 and the replicantType flag set to 0. For folks that want to have their own portable VK scanner customized, they can pick a profile that will display them as a Human, a Replicant, or Indeterminate. The "Indeterminate" flag is just one I thought would be fun, and use on Deckard's own profile - instead of the Nexus Model or "Human", it displays part of the word "Replicant", writes garbage data over it, then writes the word "Human" after and leaves the checkbox next to that field unconfirmed.

K has a movie-accurate security code, courtesy of one of the LAPD clipboard-esque display props:





I made one up for Deckard using the info from this VK Operator Card, which itself references the screen-accurate badge number from the original Blade Runner movie.





The "replicantType" flag simply lets me switch the logo that displays next to the profile of their manufacturer. Wallace is the default, but for the sake of it I added in a Tyrell option, which I will demonstrate using K's profile:



For "custom" profiles, it generates a unique security code per user based on their name. Specifically, it'll take the user's name, hash it into an integer value, then use that integer value in a randomSeed() function. After it does that, it generates a code in the format of #####-%-####, where the #s are randomly generated numbers from 0 through 9 and the % is the first letter of the user's last name.

My favorite part about this is the fact that the code it generates, although random, will be consistently the same for the user every time because I'm using the user's own name to seed the random number generator. This prevents the device from display a different security code for the same user on subsequent displays. It's a little thing that nobody will ever notice or care about, but I'm happy that it is consistent.

The profiles are set up for me to easily change the images that display to suit the end user. If, for whatever reason, someone decided they wanted a custom profile but didn't want their own picture on there, I could either set the images to be one of the pre-baked sets (K, Deckard), but I also went ahead and generated a "no user image found" readout just in case:



With all this sorted, I have to screw around a bit more with the animation options, which I will hopefully tinker with tomorrow.

I also spent a bit of today working on a few other problems - namely, getting everything to fit inside the device in a smart and sensible way. As I mentioned in one of my prior posts, the ILI9341 TFT displays come in a surprising variety of sizes: 2.2", 2.4", and a whopping 2.8". I have been working with the 2.2" display thus far out of a concern for sizing, but have just noticed that this creates a tiny bit of an issue.



The screen has a viewable area indicated by the blue rectangle. Around it, there is a black bezel where no pixels can be drawn. Around that is a white plastic clip that holds the screen in place. These are not particularly large - the black bezel is about 1.5mm wide, and the white border about the same. My plan from the outset was to simply cover the bezel section with the VK enclosure, and have only the viewable area with the graphics show. However, once we put the 2.2" screen into the device, we start to see that if I want the display to be close to the screen-accurate size, I can't cover up the bezel. This creates a bit of a black border around the screen that I'm not sure I'm thrilled with.





It'd work, though, no question about that.


Still, I bought some of those 2.4" displays to play with, so I went ahead and opened one up. From a bit of quick review, it actually looks like these would be able to fill the space without the bezel showing, which was my original intention.





The downside to this arrangement is that the printed circuit board behind the screen is also a bit wider, which then starts intersecting with the switch I was going to put on the side edge of the device in a way I'm not thrilled with.





It also somewhat gets in the way of the rails, as you can see in the picture above. Both of these are actually totally solvable problems, fortunately. There is nothing on the PCB of any consequence above about halfway up the board. Given its design, you could get a dremel with a cutting wheel and cut everything to the left of the dotted blue line away and still have a totally functional device:





Now, if this was a one-off thing, that's probably exactly what I'd do. However, as was pointed out to me today, I have a hundred people in my interest thread in the Runs subforum of TheRPF looking to get one of these things. I do not think I could bring myself to try and carefully cut a hundred PCBs in that fashion. I also think I'd probably fail on a good number of my attempts.


With that thought in mind, I realized that it's possible to actually buy the ILI9341 displays without a PCB at all - just the display and a ribbon cable.





The ribbon cable is probably the only awful part of this, if only because it can be very tricky to solder those correctly. You still can't get away from needing a PCB to do these things - it's impossible to try soldering wires to the ribbon like that. In order to come up with a solution, I spent my evening learning EAGLE, which is an electronic design software that facilitates schematic and PCB layout. After a good amount of swearing and some watching of Youtube tutorial videos, I think I've gotten this to a point that works:





For what we're doing with the ILI9341 displays, I really only need access to 9 traces on that ribbon. This design is effectively a breakout board that spreads those traces out into proper human-workable pin headers that I can solder wires to. I also added a spot for a resistor inline with the TFT screen backlight so that I could make sure it had some degree of protection. I could have set it up for a surface-mount resistor - something like a 1206-sized piece - but I figured the whole point of this board was to make my soldering work easier, and I find the through-hole resistors to be dirt simple. I did some automated sanity checks in EAGLE to make sure I wasn't screwing anything up or leaving anything important disconnected, and I've placed an order for a couple of these boards with OSH Park. Will they work? I have no idea. If they do, they will be a super nice solution to some of the size constraint issues I was working with, and they will also make the devices go together a lot easier and with a lot less stress. They'd also actually end up making the electronics cheaper - buying the ILI9341 display without a PCB is a fair bit less expensive, and these cost very little to have manufactured to replace the missing PCB components.


In the mean time, though, I'll probably do the dremel cutting wheel approach on the screens I have if only so I can keep progressing forward with the design while I wait for parts to arrive.
 
This thread is more than 5 years old.

Your message may be considered spam for the following reasons:

  1. This thread hasn't been active in some time. A new post in this thread might not contribute constructively to this discussion after so long.
If you wish to reply despite these issues, check the box below before replying.
Be aware that malicious compliance may result in more severe penalties.
Back
Top