sooner
Full Member
Oklahoma
Posts: 117
|
Post by sooner on Nov 28, 2019 0:22:20 GMT
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Nov 28, 2019 2:32:12 GMT
Hi Scot I think that if you were to sell one with music on is to state that the music is free and that you are only selling the hardware. How long do you think it should take to write the software program for it? Are we talking hours or days? What will you use the remote control for? Cheers Scudie I really don't know how long it will take to do the software... with the head start Scott Peterson gave me I should think I'll have it done in two or three weeks, just working on it here and there. Programming in Python is not something I've done before so I could be severely underestimating or overestimating it. I've done a ton of similar stuff, just not in Python, and I'm not a programmer. I've made a ton of progress this week on the hardware because I had extra time off to use at work so I took the week off. After this it will be whatever time I can squeeze in again. The remote control will be used for all the functions that I can't do on the front buttons... enabling free play, enabling/disabling bluetooth, remotely controlling the volume, mute volume, stop/skip songs, and it would allow me to select infinite numbers of songs also... those are the first few that come to mind. The possibilities are there for almost anything I want. Just have to figure out the software for that. This is separate software from the parts that are needed to run the buttons/coin drops/volume control buttons. This is a phase two idea. Phase one will be just to get the console buttons working and playing music.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Nov 28, 2019 2:39:40 GMT
If I used music in the public domain I could sell it with the music on it. Either way it wouldn't matter... the directory tree is going to be the key so I wouldn't need to have music on it. If you select A1 it will go to the A1 folder and play whatever is in it. If it's one MP3 then it plays it, if it's more then it plays them in alphanumeric order. And I'm not likely to do another to sell anyway. Doesn't seem like the economics are there.
|
|
|
Post by spetersen on Nov 28, 2019 4:26:04 GMT
Starting from not knowing anything about python, it took me about 2 weeks of about 2 -3 hours a day to finish my program and setup an access point. Python is pretty picky on brackets and indenting, otherwise it's pretty easy.My development platform was Stretch desktop using Thonny IDE, I ran the programs each in a terminal window to watch them work. I just swapped SD cards back and forth as I transitioned to Stretch lite headless
This site was where I got the most help www.raspberrypi.org/forums/
|
|
|
Post by spetersen on Nov 28, 2019 21:29:40 GMT
One thing about programming, I have found that people that tried multithreading, have had timing problems, that is why I went with separate modules running as background tasks.Separate modules are also easier to troubleshoot, as they run standalone in a terminal window.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Nov 29, 2019 3:01:59 GMT
Yep, I was planning on using separate modules. One for all the inputs that simply records the input, one worker module to spin off actions based on the inputs. I'll use Python for recording the inputs including the pulse train but the rest I'll probably write in bash shell script as that's what I use on a daily basis. Probably use a small database for tracking things like credits, inputs, selections, and message queuing.
Haven't gotten that far yet though.
|
|
|
Post by spetersen on Nov 29, 2019 4:10:30 GMT
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Nov 30, 2019 4:29:56 GMT
Scott, do you have the 5vDC and your 24vAC both grounded to the wallbox chassis? I think you do, just wanted to double check before I attempted that. I wasn't sure if having both grounded to the chassis would cause any problems.
|
|
|
Post by spetersen on Nov 30, 2019 5:01:17 GMT
Yes I do, you can check if one the 24v leads are straight through to ground on your 5v supply, or measure from the negative lead of your 5v supply to ground, it should not have any voltage , if there is you can try switching the 24v leads to the ps to see if it helps, I started with 1/2 wave rectified 24vdc to avoid problems with the grounds. You can try to measure between the 24v leads, and the 5v negative lead, if no connection that would be great. if one lead has no resistance that would be ok also, that lead would go to the 24v lead that is connected to the case.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Nov 30, 2019 12:39:34 GMT
I checked from the 5vDC negative lead to the chassis and got 17 volts as it sits. I'll try swapping the leads on the 5vDC supply.
|
|
|
Post by spetersen on Nov 30, 2019 13:06:18 GMT
If you connect a 500 ohm resistor between the negative 5v and the chassis, you can see if there is any current behind it, by measuring across the resistor. If there is current, it would not be advisable to use the converter, as the Pi would be damaged
l checked the Amazon listing, and someone was going through the same problem, and was going to try switching wires also. it was in the answered quesions below the listing.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Nov 30, 2019 13:40:03 GMT
I measure no connection when checking from either 24vAC lead to the 5vDC negative. Swapping the 24vAC leads to the 5vDC supply made no difference, I still get 17 volts from chassis to 5vDC negative wire with power on. I'm not an electronics guy so I don't have any resistors handy, I'd have to order one.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Nov 30, 2019 15:39:23 GMT
I think I'll switch power supplies. I don't want to blow up my Pi. This is what I'm looking at: www.digikey.com/product-detail/en/cui-inc/PSK-S20C-5-T/102-6063-ND/9997647With both the 24vAC and 5vDC operating off the mains AC power I don't think there should be any problem connecting both grounds to the chassis. Plus it'll give me a bit more overhead to power the optoisolator and amp.
|
|
|
Post by spetersen on Nov 30, 2019 17:59:48 GMT
That ps looks like there will be no problem, because it is isolated. One good thing, you can is you can test the pi, amp and program while waiting for the new PS, using a 5v phone charger. The amp should draw almost nothing at low volume.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Nov 30, 2019 19:53:03 GMT
Yep, I'll continue on working with the Pi powered by a USB power supply until the new supply comes. I can use the automation hat to connect power from the Pi to the other components while I wait.
I have everything hooked up except for the pulse train reader and amp. I have the coin drop and volume input programs done in Python now too. Those were quite easy, only took me 2 hours. I have not been able to find any way to get a different voltage reading with no volume buttons pressed though. I get 5v with no buttons or the high button pressed. Still probing, but I may have to use one of the buttons as an actual mute button if I really want one.
|
|