As an escape room/theatre prop, I am trying to make a magneto phone ring it's bell. It will eventually be controlled wirelessly and will need to run on batteries. What I am struggling with, is the volume of the ringing. These phones were originally made to ring with a 90V AC signal at about 20Hz (as far as I have understood).
I have disconnected the bell from the rest of the phone circuitry and connected it's two wires to the motorA output of an LN298N. An arduino NANO is sending alternating HIGH and LOW signals to the IN1 and IN2 of the LN298N.
The ringing sounds good up to 18-19V (input to the driver from a lab power supply), but not as loud as I would like. When I increase the voltage past 19V, the bell just stops.
So, my questions are:
Why does this happen? (shouldn't it be enough to increase the voltage)
int motor1pin1 = 2;
int motor1pin2 = 3;
void setup() {
pinMode(motor1pin1, OUTPUT);
pinMode(motor1pin2, OUTPUT);
}
void loop() {
delay (5000);
for (int i = 0; i <= 50; i++) {
digitalWrite(motor1pin1, HIGH);
digitalWrite(motor1pin2, LOW);
delay(30);
digitalWrite(motor1pin1, LOW);
digitalWrite(motor1pin2, HIGH);
delay(30);
}
}
I've dabbled with arduino for a while and burnt my fair share of components. Electricity is still a mystery to me.
Any advice would be greatly appreciated.
Your question interests me both because I work in telecoms and because I have done similar in the past.
In the UK ringing was, so far as I remember, 25Hz 75VAC.
I don't know why your bell stops if you increase the voltage, I've expect it to get louder. Have you turned the gongs for the best ring? The gongs (should) have off centre mountings so turning them varies the distance from the striker. The striker should be a mm or 3 away from the closest gong when not energised. Adjust for the best ring.
I believe the bell you have has 2 windings, one on each side; are they in series or parallel? I suggest that you try them in parallel, but you will have to get the polarity right, one way they will work the other not.
When I did this I used a small mains transformer backwards, with the mains side to the bell and the low voltage side driven by 2 MOSFETs and a 25Hz oscillator. I'll see if I still have the circuit and post it if I do.
Here is a ring generator I made at least 30 years ago, I'm not really suggesting you make it, I am suggesting it serves as inspiration for something better. Inverters are probably 40106.
Hi,
The bells are designed for a sinewave current.
You are hitting them with squarewave and no off time between activations to make your signal at least approach the shape of a sinewave, its called modified squarewave.
I believe the bell you have has 2 windings, one on each side; are they in series or parallel? I suggest that you try them in parallel, but you will have to get the polarity right, one way they will work the other not.
Yes, it's got 2 windings, like in the circuit I posted. I think they are wired in series. I'm afraid to break any of the old wiring and have been reluctant to fiddle too much with the coils. It looks like the wire connection between the two have been covered with rubber at the connection point, so I'll see if I can manage to scrape it off and re-wire if possible. I will also try the striker and gong adjustments you suggested.
Thanks for posting your old circuit! I've never been good at reading schematics, but I'll do my best
Can you be sure there is no net DC flowing though the coils? I'm guessing based on your circuit and that you are using a motor driver that there isn't, but if there is then it might explain why you have a problem when you increase the voltage. Try a capacitor in series with the bell, it needs to be non-polarised and about 2μF, although the exact value won't matter too much.
But you have doubled the amount of delay, getting you close to 8 Hz instead of 20. A total delay of 50 milliseconds should get you close to 20 Hz. That's 25 milliseconds for each half cycle. I would start with 20 ON and 5 OFF and tune for best effect:
The two windings on the ringer were connected in series and in phase. Just experiment with various combinations until you find the best arrangement. You will have about 75VAC on the transformer secondary (110V winding) which is more than enough to drive the ringer.
I used a Wemos D1 Mini to drive the data lines (D0 and D8 in the schematic).
Here is my test code (It's in two tabs. Put them both into the same folder and open either one in the IDE.)
#define sketch "ringTest.ino"
#define ringerPhase1 D0 // Transformer phase
#define ringerPhase2 D8
#define cradlePin D7 // When the handset is on-hook, D7 is low.
bool ringFlag;
unsigned long ringOnTimeStart;
unsigned long ringOffTimeStart;
unsigned long ringONstartTime = 0;
unsigned long ringOFFstartTime = 0;
unsigned long phase1StartTime = 0;
unsigned long phase2StartTime = 0;
unsigned long phaseTime = 25; // ms for each phase to be on. 25ms=20Hz.
bool phase1Flag = false;
bool phase2Flag = true;
void setup() {
Serial.begin(115200);
Serial.println();
Serial.println(F(sketch));
pinMode(ringerPhase1, OUTPUT);
pinMode(ringerPhase2, OUTPUT);
pinMode(cradlePin, INPUT_PULLUP);
phase1Flag = true;
phase2Flag = !phase1Flag;
// Flicker the ringer LEDS (TEMPORARY)
for (int i = 0; i < 6; i++) {
digitalWrite(ringerPhase1, HIGH);
delay(250);
digitalWrite(ringerPhase1, LOW);
digitalWrite(ringerPhase2, HIGH);
delay(250);
digitalWrite(ringerPhase2, LOW);
}
}
void loop() {
int i = digitalRead(cradlePin); // 0=on-Hook, 1=off-Hook
if (i) return; // Off-hook, don't ring.
ringFlag = true; // Allows ring()
ring();
}
// ================ ring() ================
void ring() {
if (!ringFlag) { // OK to ring?
Serial.println(F("ringFlag is off.."));
ringOFF(); // De-energizes both bell coils
return;
}
//Serial.println(F("ringing.."));
if (ringOFFstartTime == 0) { // Don't ring if the off timer is active
if (ringONstartTime == 0) { // First tme here
ringONstartTime = millis();
}
if (millis() - ringONstartTime < (2 * 1000)) { //Still ringing.
ringON();
} else {
ringONstartTime = 0;
}
}
if (ringONstartTime == 0) { // Ring time has ended
if (ringOFFstartTime == 0) { // First time through the OFF loop
ringOFFstartTime = millis();
}
if (millis() - ringOFFstartTime < (4 * 1000)) {
ringOFF();
} else {
ringOFFstartTime = 0;
}
}
}//ring
void ringOFF() {
digitalWrite(ringerPhase1, LOW);
digitalWrite(ringerPhase2, LOW);
}
void ringON() {
if (phase1Flag) {
// If this is the first time here, set the phase1 Start Time and turn on phase1
if (phase1StartTime == 0) {
phase1StartTime = millis();
digitalWrite(ringerPhase1, HIGH);
}
}
//When phase 1 times out, clear the phase1 start time, turn off phase 1
if (millis() - phase1StartTime > phaseTime) {
phase1StartTime = 0;
digitalWrite(ringerPhase1, LOW);
phase1Flag = false;
phase2Flag = true;
}
if (phase2Flag) {
// If this is the first time here, set the phase2 Start Time and turn on phase2
if (phase2StartTime == 0) {
phase2StartTime = millis();
digitalWrite(ringerPhase2, HIGH);
}
}
//When phase 2 times out, clear the phase2 start time, turn off phase 2
if (millis() - phase2StartTime > phaseTime) {
phase2StartTime = 0;
digitalWrite(ringerPhase2, LOW);
phase2Flag = false;
phase1Flag = true;
}
}
It would be great if this would sort me out (and would let me understand what’s happening). I’ll start searching my parts piles or order one. Thanks for your input so far!
Is the Nano powered via the USB cable ?
If so, Vin is not the right pin to use for powering the logic side of the L298.
Can you look at the data sheet of the L298 https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf and say exactly which pins you are using on that device.
To connect them in parallel, unsolder the middle connection between the two. Connect each of the terminals you have unsoldered to the outside connection on the opposite winding. The phase will be correct.
That’s it! I had it all backward. the nano was powered by the +5 from the driver, and the ln298 logic was powered from the however many volts I was ramping it up with. Now, nano has power from usb and ln298 logic has power from the nano’s +5V. And I can ramp up the power suply to max 31V to hear beautiful music, no problem! Yup, the EN pin is now connected to 5V
Of course I still have a need to run it on battery, though. Perhaps I still need to go in the direction of @SteveMann ‘s transformer circuit? or a boost converter?