Hod Carrier

Some dumb PU questions

Recommended Posts

On 1/5/2021 at 4:36 PM, dr_spock said:

PID control?  Where is the fun in that?

:pir-huzzah2: Do you really want to know?

Spoiler

 

OK, here we go: The fun is: Programming it into the RCX using RobotC as NQC is too slow, fiddling with the P, I, and D parameters, first using a theoretical approach, noticing how freaky that is (I and particularly D) then just finding the optimum values by logging the rotation sensor data within the RCX ... I know, I know: Only completely derailed folks find fun in that.:pir-classic:

Ha, as we are on spoiler: On another thought (regarding derailments): A week ago, I got my ZX Spectrum from 1985 working again! With Interface1 and my own bank switching circuit - enabling truly mind-blowing 2x32kBytes memory expansion of the original 16kByte machine I purchased back then. (That Spectrum travelled a lot: Within Germany, then to the US, back within Germany. I just could not dump that box.)
Well, it was not entirely my idea - I lately also found the English ELEKTOR issue 6/1984 on a server in India describing how to do it. Man, these were the good ol' days. I purchased another Spectrum off from eBay because I thought my own was as dead as it goes - just to find out that one does also not boot up. But: Some research tells me a) there are some more weirdos out there who made numerous high quality YouTube videos dealing with Spectrum repair and b) there are some folks still selling 16k x 1 dynamic RAM chips. It appears as if one of these called it quits on the Spectrum I purchased on eBay, as judged by the oscilloscope traces of the D2 line ... And I found out that my own ZX had just a blown 7805 (easy fix), one blown 4148 diode (never seen that), one snapped IC leg (drilled "into" it, as the legs make up the good fraction of a TTL dual in-line housing, could then solder to it again), a blown speaker, and totally fractured membranes of the keyboard (renewed with a membrane obtained from a UK shop) ... it happily booted up. Did now do all the documentation again on my laptop ... and for unexplainable reasons, I feel very happy about that. Don't ask me why. 

So: The fun in that is - just doing it. That's all there is :pir-huzzah2: and I know that you know ...
The other thing, making things from the past work again, from a time when a company used essentially faulty 64k x 1 RAM chips from manufacturers (one of the 32k banks faulty, marked as either H or L on the chip for the working bank) for memory expansion for their products - to keep the price as low as possible, is as useless, but it makes me for whatever reasond happy ...

I also repair the dishwasher, washing machine ... in the household here ... 

 

Well, I am a nerd. That's summarizes it best, I guess :wink:

Best
Thorsten     

Share this post


Link to post
Share on other sites

Ah, you're a fixed too! I fix things - computers, household appliances, databases, motorbikes, spreadsheets...

The day the warranty expired on my Vic20 I got the screwdriver and soldering iron out ;-)

I assume you watch Adam Savage's Youtube channel?

Share this post


Link to post
Share on other sites
20 hours ago, Duq said:

I assume you watch Adam Savage's Youtube channel?

Wow, no I did not, but do now. Thanks for the note!

Did you see this site?: https://www.tindie.com/browse/vintagecomputing/.

Do you still have your Vic20? I always admired it back then - this keyboard ... I was on rubber keys ... another thing was that once I could afford (no: I could not, my wife could and let me buy one) to buy a Speccy, I dived into Z80 machine code. Guess I am still somewhat fluent ... As far as I remember, the Vic20 used a 6502 as brain and learning two languages was too much for me. 

Sorry for posting non-PU-related things here @Hod Carrier. Well, now that I will hopefully have two functional ZX Spectrums (ordered repair stuff, the dyn. 16k x 1 RAM chips and one ULA etc. from the UK - the country of origin of that wonderful machine - but guess what: "Your package has arrived (after one week leaving the UK, as UK Royal Mail told me) in Frankfurt Airport - for non-EU customs inspections". Brexit hits hard) My plans are to hook up the IR tower to the Speccy. Write some code. And then find a way to talk to a BLE hub. Most probably with the help of an ESP32 and @Cornelius Legoino: The ESPs easily do BLE and will certainly laugh about opening a serial port @2400 baud ...

Best
Thorsten     

Share this post


Link to post
Share on other sites

[off-topic]

Yes, it's still in the attic, together with my Atari 2600. You must be older than me. I was 15 when I bought the Vic ;-) And yes, the Commodores used the 6502. I did write a bit of assembly but was never fluent. Try to explain that to my colleagues now who think linking java libraries is programming...

[/off-topic]

Share this post


Link to post
Share on other sites
On 1/11/2021 at 5:04 PM, ALCO said:

First generation PTC for Lego trains.

I think some folks have used the Mindstorm RCX for PTC years ago with running GBC trains picking up and dumping balls.

 

On 1/11/2021 at 5:40 PM, Toastie said:

:pir-huzzah2: Do you really want to know?

  Reveal hidden contents

Well, I am a nerd. That's summarizes it best, I guess :wink:

Best
Thorsten     

I fix washing machines, dishwashers, etc. too.  Why paid someone else when you can learn do it yourself and use the cost avoidance to buy more LEGO?  

The VIc20 could work as a TTY to an ESP32 controling the PU Hubs with Legoino.  The Vic20 user port serial is at TTL level.  Maybe a simple voltage divider to bring it down to 3.3V? 

I bought the PU hubs and re-used my collection of PF train motors with some wonky DIY adapter.  I do like running bluetooth instead of infrared at our train shows.  I can sit on the chair and don't have to worry about pointing the remote at the PF IR receiver of the train on the other side of the layout.  :classic:

pu_pf_train.jpg

 

On 1/12/2021 at 6:52 PM, Duq said:

Ah, you're a fixed too! I fix things - computers, household appliances, databases, motorbikes, spreadsheets...

The day the warranty expired on my Vic20 I got the screwdriver and soldering iron out ;-)

I assume you watch Adam Savage's Youtube channel?

I didn't wait for the Vic20 warranty to expire before soldering in another 24K of SRAM to the pins on the back of the expansion port connector.  I wonder if any of my cassette tapes with programs are still readable.

 

Share this post


Link to post
Share on other sites

Back in the day as a proof of concept I built a speed controller for my dad's model train, using the Vic's user port. With a joystick from the Atari I could increase and decrease the speed. Fire button was an emergency stop.

Share this post


Link to post
Share on other sites

@Duq and @dr_spock,

I believe we have almost completely derailed this topic. Well. How about opening a thread in the Mindstorms & Robotics forum on vintage computers/ing and LEGO?

Spoiler

 

BTW I am on a ZX Spectrum and ZX81, never had an VicXY.

Back in the days (but not as far as I am going now) I had an MSDOS QBasic program up and running to automatically detect 3 RCX equipped trains (needed to fake that, because I had only one RCX back then), and controlled them (just set speed, and emergency break). Can't find the source code anymore, but still have the "old" Toshiba laptop running Win98.

My idea is not to have the Speccy as terminal or the like, but as the >brain< and have the ESP to do what it is told via RS232. My Speccy has an Interface1 which features an RS232 port (and I got that up and running via an RS232/USB converter using hardware handshake (Xon/Off was not known these days, as far as I know). And it has 32kByte of memory which I am happily splitting for let's say 16k BASIC code and 16k machine code (which will never ever be required).

Should be fun - but that's all there is. As I still have my own LEGO bricks from 1965, I like to do the "Mindstorms" things I know (1998, RIS) with vintage computers (ZX, that it is here).

A couple of minutes ago I seemed to have fixed the 16k RAM pack of my even older ZX81 - 2 of the 4116 were gone and the wires connecting the two boards "not good" as well. The ZX81 boots up nicely and RAMTOP is at 32736 - as reported by PRINT PEEK 16388 + 256*PEEK 16389 ...

 

Best
Thorsten

Edited by Toastie

Share this post


Link to post
Share on other sites
On 1/5/2021 at 9:15 PM, Sunil766 said:

If they are attached to two hubs you would still have to choose different ports and then quickly switch between channels (=hubs) before controlling the second motor. 

Not true, you can join multiple hubs and a remote into the same network. Then the a/b controls will affect both hubs. 
 

alternatively you can do it in software with the PU app, which allows you to do things like use the reverse speed on the second motor. 

Share this post


Link to post
Share on other sites
11 hours ago, Stux said:

Not true, you can join multiple hubs and a remote into the same network. Then the a/b controls will affect both hubs. 

That's amazing, how do I do that? Just pressing all three buttons (remote + hub + hub) at the same time-ish? 

Must admit I won't try out since I am shocked by having to buy 15 AAA batteries just to play around before they're depleted to an unknown extent at the end of the session. I'll rather quickly attach 2x9v motors and off we go #keep9Valive :-) 

Share this post


Link to post
Share on other sites
On 2/7/2021 at 12:59 AM, Sunil766 said:

That's amazing, how do I do that? Just pressing all three buttons (remote + hub + hub) at the same time-ish? 

Must admit I won't try out since I am shocked by having to buy 15 AAA batteries just to play around before they're depleted to an unknown extent at the end of the session. I'll rather quickly attach 2x9v motors and off we go #keep9Valive :-) 

https://bricks.stackexchange.com/a/10745

Share this post


Link to post
Share on other sites

  I absolutely adore how this train-themed thread was almost completely derailed by excruciatingly detailed accounts of 80's computing!  Just a slight bit further into the future, I have a Control Lab Interface B which I intend to get working on a Mac Classic entirely just because:wink:  Maybe I'll program it to run a simple back and forth trolley car or something, just to bring this closer to thread topic.

  Perhaps it's because I'm old school, but I'm still not sold on the Powered Up system.  There are so many little annoyances with inconsistent device support across all versions of the software, firmware and hardware - it's hard to even make a compatibility matrix to keep track.  (Just imagine the kinds of support email/phone calls they must be getting!)  Until LEGO gets around to fully unifying the system (the WeDo Hub is already a permanent bust on accessory compatibility), I'm not likely going to be buying any PU hubs.  That said, it didn't stop me from buying some of the PU motors after I got a bunch of the custom-made adapters available from PV Productions.  It is far more fun figuring out how best to build something when I can take just about anything 9V, PF or PU and connect any number of mixed system components together at any time.  This includes various power sources which don't depend on batteries, like the 9V train speed regulator and the PV Productions USB-to-9V/PF step-up supply (or the aforementioned Control Lab).  I also got a PFx Brick so I have IR, bluetooth and USB-based control in a single package, and it can respond to multiple IR remotes with completely customizable actions. 

  I enjoy designing compact train motor bogies, among other random things, and the ability to swap any motor in and out of the assembly as I work to find the best combination of connection points and output speed/power makes the exercise far less frustrating.  I can even drive multiple PU motors from one source by using the PF-to-PU adapters and stacking the PF source ends together.  When I ever get around to owning a PU hub, I'll be able to split outputs to multiple PF/9V motors using the PU-to-PF/9V adapter and then stacking the PF/9V connectors.  Or I can get really crazy and go PU hub, PU-PF/9V adapter, then stack multiple PF-PU adapters so I can drive multiple PU motors from a single PU port, seeing as nobody is making a direct PU splitter yet.  Got your head spinning yet?

Share this post


Link to post
Share on other sites
4 hours ago, UltraViolet said:

Got your head spinning yet?

Yes. But I'd also love to read about the nitty gritty details. 

 

On 1/18/2021 at 12:39 AM, Toastie said:

@Duq and @dr_spock,

I believe we have almost completely derailed this topic

That's awesome.

Share this post


Link to post
Share on other sites
9 hours ago, zephyr1934 said:

Nothing like punching in 4 pages of two digit hex numbers from Compute's Gazette to get a new video game for your C64.

Oh, man, now you're really taking me back, as well of stretching the limits of my childhood memory.  If I recall correctly, this was our first family computer in 1984:

https://en.wikipedia.org/wiki/Thomson_MO5

800px-Thomson_MO5.jpg

  I still remember the moment we picked it up from the Post Office (the building is now a Federal Halfway House - gritty-enough for ya?)  It was just the bare computer - we couldn't afford the accessories.  After 'miles' of typing numeric codes to program it, the end result was a blocky, barely discernable black on white archer who could move up and down and fire an arrow across the screen.  That was it.  Shortly after that we returned it.  (Childhood faith was restored a few years later upon the arrival of an IBM PC Turbo XT. :grin: )

  Could I have controlled a train with it?  Maybe.  Did any of us feel like typing an entire encyclopedia worth of codes to accomplish that, and have no way to store it after power down?  NO WAY!

13 hours ago, Bartosz said:

Yes. But I'd also love to read about the nitty gritty details. 

  As to other "nitty gritty details", I plan on posting about my experiences with the inter-system power adapters in a dedicated thread.  It seems very few people are aware yet that they can buy a pre-made solution, without having to hack their own, or even have the option at all.  PV Productions certainly deserves the credit and exposure, although the GBC crowd is probably well aware of them already.

Edited by UltraViolet
grammar

Share this post


Link to post
Share on other sites
On 1/17/2021 at 6:39 PM, Toastie said:

@Duq and @dr_spock,

I believe we have almost completely derailed this topic. Well. How about opening a thread in the Mindstorms & Robotics forum on vintage computers/ing and LEGO?

  Reveal hidden contents

Best
Thorsten

We can start a thread in the Mindstorms & Robotics forum.  What should we call it?   The Mindful Pub? 

54 minutes ago, UltraViolet said:

  As to other "nitty gritty details", I plan on posting about my experiences with the inter-system power adapters in a dedicated thread.  It seems very few people are aware yet that they can buy a pre-made solution, without having to hack their own, or even have the option at all.  PV Productions certainly deserves the credit and exposure, although the GBC crowd is probably well aware of them already.

Welcome aboard.  Where in Canada are you?  

I went the DIY route. It is kind of fun to learn to design and make my own adapters with some old CAT3 cable wires and a few cents of 3D printer filament.. I think I stocked up enough PF motors to keep my GBCs going for a while before having to resort to PU motors as replacements.

 

10 hours ago, zephyr1934 said:

Nothing like punching in 4 pages of two digit hex numbers from Compute's Gazette to get a new video game for your C64.

I used to do that too. The touch-typing class on manual typewriters I took in school was really useful for that.  :classic:
 

Share this post


Link to post
Share on other sites
1 hour ago, UltraViolet said:

Oh, man, now you're really taking me back, as well of stretching the limits of my childhood memory.  If I recall correctly, this was our first family computer in 1984:

So folks, how about open up a thread in lets say the "Mindstorms and Robotics Forum" on vintage computing and LEGO?

I am still on it. The ZX Interface 1 is now under investigation here:pir-sweet:. Documentation is rather scarce. I hooked up the LEGO serial tower - so far sending things to the tower is straight forward: The Speccy just kicks out the bytes one after the other with no delay when setting hardware handshake lines appropriately (and man, the names they give to the DB9 pins are in a total mess. As are the mic and ear jackets. It is mostly "inverse", as if they wanted to tell us: The Zeddy MIC socket connects to the MIC input of a tape recorder ... etc). So the tower sends what it gets.

Problem #1: Odd parity required for RCX communication. The Speccy can't do that; baud-rate flexible, one start, 8 data, 1 stop, no parity - over and out.

Problem #2: The "buffer" length when reading data back from the tower is: 2 bytes. And then it thinks a bit and then tells the connected device to shut up until done. Took some time to figure that out using an oscilloscope but: Done. Well the tower though is totally dumb; it just sends out what it received. No handshake at all.

Idea: Use and Arduino. Get an RS232 shield ($5) with the MAX232 pins providing RXD, TXD, RTS, CTS for communication with the Zeddy. Get another one just using RXD/TXD for the tower side. And a bit of software to do the translation.

Oh well. We'll see.

Best
Thorsten

@dr_spock: When I was typing, your reply came in - full duplex here. Yes, let us do that!

@zephyr1934: Nice! I was taught how to punch holes into a card, feed that to a PDP10 "cluster" of three to have them print out "hello world" on an express printer in the computing department. That was fun. 

Edited by Toastie

Share this post


Link to post
Share on other sites
2 hours ago, Toastie said:

Nice! I was taught how to punch holes into a card, feed that to a PDP10 "cluster" of three to have them print out "hello world" on an express printer in the computing department. That was fun. 

Take that...

enteprise-horz.gif

I remember this (or something very similar) being all the rage on the teletype

 

Share this post


Link to post
Share on other sites
19 hours ago, zephyr1934 said:

Take that...

enteprise-horz.gif

I remember this (or something very similar) being all the rage on the teletype

 

  Too many columns for my BBS... wide-ways or long-ways... and yes, I counted... :tongue:

Share this post


Link to post
Share on other sites

Question on the Lego Powered Up app.  In the custom programming building "create" , saw a video where program was able to code for two hubs at the same time.  I cannot locate where this block is that he used.  It is located right at the 5;00 min mark on the video. I am able to link to both hubs, just cannot find this control block need.

Really neat video showing power of the app.  I am wanting to control two trains at a station with a passing siding.  

 

 

Share this post


Link to post
Share on other sites

It seems to be a "my own block" that the video creator wrote himself.

You can find the block to access a second hub in the white category. It sticks into the port input.

Share this post


Link to post
Share on other sites

It is the white block with the 2 hubs. The order you link the hubs is important as you have to tell that white block which hub number is doing what.

Here is an example of the input of color sensor on hub #1 port B controlling the output to motors on hub #2 port A and B.

colorthrottle.jpg

Share this post


Link to post
Share on other sites

Thank you, that is it.  Now I need to get a second color sensor.

Is their any documentation on what all the function blocks do in this app?  Assume their is a block for a motor that will ramp the speed up slowly, currently I am using a bunch of reg motor blocks, increase them each by 20% with a timer in between them. Acts like a ramp up speed but sure there is a better way to do this.

 

Share this post


Link to post
Share on other sites

Oddly, S@H was out of stock for the sensors, but my store had them.  Added second sensor and my my trains are running by themselves.   Life is good....

I found a series of youtube vidoes that where very helpful explaining the blocks of the app.  Wish I had found this before.  Lot of good info.  Now I need to find a way to add more sounds to the app.

 

Share this post


Link to post
Share on other sites
19 hours ago, LegoDW said:

I found a series of youtube vidoes that where very helpful explaining the blocks of the app.  Wish I had found this before. 

The lack of any official documentation is stunning given the amount of functionality Lego is building in to the PU app and the price they are charging for the hubs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.