Hi, are your reset pins active low like mine? Have you disabled the set pins by giving them the right logic level? Ripple counters are problematic with reset due to the ripple delay causing unexpected logic levels at the NAND inputs.
Thanks a lot, @garypowell2016. Great feedback, much appreciated. Anything else you want making, please let me know! The variable that's switched can be in all sorts of places or contexts, it's a great piece of code. All the best, James.
@@E4E Quickest reply I've ever had! I'm very new to everything electronics & Arduino. I got interested in solar panels last Autumn. Did a few searches and came across a device called Arduino. Since then I've had a lot of fun making my own blinking Christmas lights, an ESP32 camera with pictures coming live on to my laptop, a Squash ghosting board started with an Infra Red remote control - which shows the next position a player has to move to - with 10 different timings of a ghost. At present I'm having headaches trying to make a reaction test for Squash players - made with Pro-minis & NRF24L01 radio control in each LED lit button. I am going to try to get it to start with a remote control. At the moment I'm testing each part of the starting sequence. So far I've managed to use an IR remote to turn an LED on & combined that with button toggle code so that the button press turns the LED off - I then hope I can use this press as an input which I can send over the NRF24L01 writing pipe to another LED lit button. I think I might have bitten off more than I can chew with this one!
@garypowell2016 I very much doubt you've bitten off too much. I start with a decent flow chart. I don't understand squash much but had a Google. Feel free to email maths4engineers on g mail com, and I'll see how I can help! Cheers.
I'll make you one on Tinkercad so that you'll have the code too. It sounds worse on Tinkercad. You can tweak it. Fo now... a linear pot between 5v and 0v, put into pin A0 A1... ir A15 aka pins 14 to 19. PinMode input. AnalogRead the pot, then tone(buzzerpin, note1); delay(20); tone(buzzerpin, note2); delay(20); make the buzzer connect to any pin other than pins0 or 1. I'll make it now for you mate.
@@E4E Just had an idea... What if you had pitch bend for each "key" and the touch sensors were attached to flex sensors so you pinch the key and have LITERAL pitch bend :D. Also did you use an actual piezo buzzer or a speaker? It looks like there was a speaker in the background.
@@andrewg8303 Thanks yeah I have done all sorts in my shorts, can do anything like you said. I dont have a flex sensor tho, but have inductive sensors, blinkin Germans said they worked off 5v but they're 6v so I'm going to sort that. Yes an 8 Ohm speaker, no additional stuff needed thank you! :) See Tinkercad link in my other reply mate.
Hi mate the entire code is shown on the right side. If you are on a laptop just pause video and write it down? I will stick the code in the description for you cheers. Seen my other shorts with piano???
fun thing to try: you can put all those buttons on a single analog input using an R2R network. though it isn't great for this specific application, because analog inputs refresh slowly. though for an analog sound generator like a 555 in astable mode it might work.
Yes you're right due to the arrays I use I prefer digital pins BUT a valid point. Thanks. I'm presently soldering some capacitive switches, these button switches are awful :) cheers
Hi thanks for the comment. I havent yet BUT there is a link in the short to another video that has the whole code and circuit. You can oause and write code. I'll paste the full code here too very shortly. Cheers.
Haha I take no credit for the stylophone, I'm too young. I do like to show my students and hobbyists some of the things that I didn't know how to do, before I learned it. Like anything, I don't claim to have invented much at all, but I like implementing things and I have some firmware I wrote which is on Mars, albeit in several pieces. Damn those parachute guys :)
Hi, if I still have this file you can! Otherwise, I'll make it for you on Multisim.com, no problem. I will put a link on here to the URL or a shared drive folder. Will do it asap, so this evening UK time. Cheers.
Hi, you would use logic to reset at DCBA=0110 (BINARY). Firstly, you'd only need a three-bit counter. Use CBA=110 utilising a three input NAND gate fed to all of the active-low reset pins. Use NOTQA, QB and QC into the nand gate. Thanks.
Don't forget, ripple counters are notoriously bad for resetting in this way due to race conditions. It would definitely work as above, if you made it a synchronous counter. It may work with the reset logic as a ripple counter, it's worth a try!
I've made an up-down on this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-oe4aZ7tY6Xo.html called "Up-Down Counter Theory Design & Simulation with Tinkercad, Multisim, Proteus & Circuitverse 1080 HD" thanks
Thanks. It depends on the actual chip but 7474s are often not-enabled or active-low, hence the circle on the inputs. I would pull them high with a 220 Ohmboy. Or a 1k.
Great info. especially when you added that degrees had to be changed to radiant. I just love it when people give out the important info at the beginning. Thanks,
Thank you so much. I've taught myself and enjoy it when people can get their work done with less stress! All the best. Any ideas for new videos are very welcome. Cheers.
@@E4E yes, I need a design that will print the numbers 2 1 0 7 5 7 0 2 7 on the display, respectively. I need to use flip flop and 7447 IC. ,sorry my english
Hi Abdullah, thank you! I made a video which can help. You could use just one 7 segment display and not need a 7447 driver. We would need a truth table showing segments A to G for the number you require, driven by a 4-bit counter (as you have 9 numbers). Another way, utilising the 7447 would be to take the binary count from a counter, 0000 to 1111 and mapping the Q outputs through logic. It is not easy but is certainly possible. Please let me know if the video helps thanks. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-SW3NmnCYDs4.html
@@E4E Actually, I mean, for example, I can use the pattern in this video, I can do it in order as in this video, but my university teacher wants me to use flip flop instead of pattern, everything is correct, but I need to use flip flop instead of pattern, thank you very much.
Thanks, Abdullah. 1) Start with a four-bit up-counter made of D flip flops. 2) Make a truth table with QA (least significant bit) QB, QC and Qd as the four FFlop outputs. These are the inputs to a logic section we need to design 3) write the desired decimal numbers in a column with the first 2 at the top and the final 7 at the bottom. 4) create Boolean expressions for four outputs names D,C,B and A where D=8 and A=1. 5) wire up the logic as per the boolean expressions and feed the logic outputs fo DCB and A into their respective 7447 inputs. 6) Reset the counter at the desired final count and all should work well! Thanks. I can help if you're stuck.
Hi there. You want the count to stop at 9 and not reset the counter? Do you mean count to 9 and stay at 9 indefinitely? Please let me know a bit more info and I'll help. Thanks @harshdubey
Hi James - if it's of any interest or use to you, I've created a simple "Wave Generator" Excel spreadsheet that adds 40 sine waves to the original (40 harmonics) and have set it up with preset parameters to create: sine, square, sawtooth and triangle waves. You choose your shape from a dropdown and enter the number of harmonics you want, from 1 to 40 and it plots them. I'm amazed at how few harmonics are needed to get very decent approximations. You can easily add other shapes to the calculations. Anyway - if you're interested, let me know and I'll email to you. Cheers from Sydney - David PS. You give very clear explanations and I look forward to exploring your channel! 🙂
Hi David, thanks for the message. That's great to here and I would never turn down an offer to look at good work. At HNC level electronics in the UK, students are required to create such waves. I was always amazed at the pattern within the formulas themselves and how quickly the shapes take.... shape! Please do and please suggest any videos you'd like making. Thanks again, James. See this link too! www.desmos.com/calculator/5sjobevyrt Hope the Sydney weather improves! Cheers James.
@@E4E Thank you for the kind words and for your lovely comment about my young son Will. He will be thrilled to have such an accolade! He's interested in many things and it's amazing what kids can do when they don't throw their precious time at passive electronic entertainment! We love making things together and you may have noticed he made an Arduino ECG monitor and then we designed and built an RC plane. A real privilege for me. Now he's showing an interest in sound design and electronics. I'll point him to your channel in the holidays, though at 12 it may be a little challenging for him! Tomorrow I will tidy up my spreadsheet a little for you. I did a FFT for each of the wave shapes and will put in a bit of documentation before sending. It's nothing terribly special but should be easy for a student to reverse engineer and may have some value. Thank you for the great link. Since I was young (in the 70s/80s) I've been fascinated by mathematical graphing (Fractals etc.) and these days enjoy messing around wtih Python as well as Excel. Great to share with the kids too. Lately my attention has been taken by synthesizing sound, so this has led to playing around with waves/FFT etc. Take care and many thanks. Regards - David PS. Just finished watching England beat Pakistan in the T20 cricket finals here in Australia. Very exciting game!!
@@E4E Hi James - I tried to send the spreadsheet to you a few days ago and am checking that it got there. I found your email address on another comment, so fingers crossed! Anyway - thanks again for your hard work putting these excellent tutorials together. Cheers, David
Someone asked how to reset at 5, then comment disappeared. Thanks for the comment. You only need three flip flops to count to 4. You need a reset signal generated at 5 i.e. CBA=101. Feed Qc, NOTQb and Qa into a three bit NAND gate. This active low Nand output must be fed to all three reset pins of the flip flops. See my other videos as well e.g. designing a programmable counter... it's all shown there. Good luck and let me know how you get on. Thanks a lot.
Hi there, I used a 1k and 1 microfarad. You can use any values. The important thing (if you want relatively even sized waveforms) is that the reactance of the capacitor is similar to the resistor value. Xc = 1/(2*pi*frequency*capacitance). So the frequency of the AC input changes the capacitor reactance and voltage. I hope this helps. See my videos on AC theory if unsure :)
Hi Leon Chen, that's very kind of you! Thanks for taking the time to comment. If you would like particular videos made please let me know what you think would be the most useful! All the best. James.
Hello, that is strange indeed. I assume if your circuit is exactly the same then the operation would be the same. Is your clock voltage at 5v? Did you use a 7448 driver and a common cathode display (not a common anode)?