Thanks AllyCat for pointing me in the direction of PAM8403
I have spent a lot of time researching its usage and how to use it with only one channel in my Tai Chi metronome. I also got involved in which speaker to use.
This post is an extract of my website Picaxe Tutorial - Full details...
My Tai Chi metronome works using a digital10k potentiometer to select and display timings of 2 to 5 seconds beats.
My problem is to increase the "sound" output.
I have tried OpAmps and Darlington pair with little effect, once using a 100R preset to reduce volume.
I looked at using the "sound"...
Having spent hours searching the web for code for a digital variable resistor I came across this 8 pin chip. It appears to do everything I want for up/down push button control with a memory storing the last wiper position.
Maxim Integrated. Dallastat. DS1809-010
10k, 4.5 to 5.5v, 64 positions...
Thanks Hippy. You have done it again.
Your codes works beautifully.
Took 10 mins to correct the timings
I understand the array at the end and interrupt/ -Enabled, just.
breathPeriodSelect = breathPeriodSelect + 1 // 6 What are the // for?
lastPinC.3State = lastPinC.3State ^...
Using ADC/pot is not accurate enough.
There are no wiring errors.
The problem is odd as it is the order of the sub codes (beat50). The volume of the first code is always reduced.
Tony
Corrected mistakes. Rounded up timings.
Pause time is critials as it is the breathing rate, 2100 gives 2.5sec. Why, I don't know.
Using the simulator, holding switch down ( pin3 = 1) until end of pause delay then releasing (0) allowed the beat to index to next. It was hit and miss
I want the...
Thanks AllyCat for your post. I have never come across "lookup" before and think I understand what is happening. I will come back this this later.
In writing my Picaxe tutorial website I am explaining what and why. In effect I write what I learn.
My interest in Picaxe is related to my building...
One of the problems in trying to do too many code routines at once is that you do not know where are the mistakes. This situation is a case in point. The problem is pressing the button does not initiate the code change immediately. I have tried do: loop until pinC.3 = 1 and while pinC.3 =...
Everything is getting too confused so back to the beginning. What is the purpose?
User instructions
The metronome offers three settings for breathing in or out at 2.5, 3.0 and 3.5 seconds.
On first turning on, the breathing rate and volume have already been set at 3.0sec and mid position. Try...
4 x aa bateries,, I think I understand your comments about current and voltage losses. The actual problem is not related to this.
The order of the sub codes beat25 to beat50 in the program effects the volume output. Which ever code is at the top of the list its volume is significantly reduced...
The values 2106, 2563, 3080 are pause time 2.5, 3.0, 3.5 second breathing times setting to within 1 sec per minute. They are set on the metronome by the 6 pole rotary switch which I am replacing with a single push button. They not toggled. Beat25 etc. have their own individual code
I have...
I went back to draw up a flow chart which I supose I should have done earlier. I looked at other commands until I found Do... loop.. until. works on PE but how can I replicate pressing the button?
; Rewritten 4 June
b1 = 2 ; to initiate initial setup
read 10, b1...
I have never used the simulator before. Yes I see it only goes to beat30 and stops. That's what I wanted it to do. The user will infrequently reset the breath timing once it has been chosen.
I assumed that once the button had been pressed the following code would be inacted resulting the next...
Very interesting comments, I do have concerns about the current drain caused by the Darlington Transistor. I tried others in my box but they gave poor amplification. VR configuration needs to be looked at and to using Voltage regulators.
But this is not my problem.
The volume is substantally...