Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mjg

Pages: [1] 2 3 ... 56
1
Nice!  Itís good to see it really coming along. 

2
General Questions / Re: Relay meets Optocoupler Question
« on: January 10, 2024, 12:32:28 AM »
Hereís what worked for meÖ

3
General Questions / Re: Relay meets Optocoupler Question
« on: January 10, 2024, 12:26:44 AM »
Glad you got it working.  I breadboarded something very similar and that worked for me.  Only thing I left out is the opto chips.  If you have a common power supply for the Arduino and transistors, you donít need the opto chips.  But if you need that power isolated from each other, put them in. 

I think with your 100r resistors at 5v you will have 50mA going through the transistor, so check the data sheet to see what they can handle.  Or try 1k and see if that still works.

Iíve got with transistors as a buffer, rather than an inverting buffer.  Makes no real difference, as you just invert the logic on the Arduino pins to do what you want. 

4
General Questions / Re: Relay meets Optocoupler Question
« on: January 09, 2024, 02:53:34 PM »
Using a 555 would probably work, but all itís doing there is being a voltage controlled switch.  Which is the same as a transistor or mosfet really.  Not sure it will get you anything different to what youíve already tried?

5
General Questions / Re: Relay meets Optocoupler Question
« on: January 09, 2024, 12:45:53 AM »
Iíll see if I have time to breadboard something tomorrow for you.  Hopefully Iíve got a spare relay sitting around somewhere. 

I think what you need is two pins from the Arduino, connected through a transistor or mosfet each as a buffer, and then switch one pin high, other low.  Then reverse the high and low to switch back the other way. 

I think that diagram youíve been looking at is a non latching relay?  That might be why itís not quite working. 

6
General Questions / Re: Relay meets Optocoupler Question
« on: January 08, 2024, 03:03:36 PM »
A 4010 or 4050 are pretty standard buffer chips, maybe start with one of those and see whether it does what you want. 

Have you been able to confirm the relay works by itself, by just hard wiring the voltage to it?  It should only need a quick touch of voltage to switch a latching relay.  No need to hold the voltage on for long.  Then you reverse the wires to switch back the other way, again, only for a brief moment. 

7
General Questions / Re: Relay meets Optocoupler Question
« on: January 06, 2024, 07:07:43 PM »
Another thing for you to research - look at non inverting buffer chips, and use one of those instead of your opto and transistors.  As pedal designers we tend to use transistors and opto chips as itís traditional, I guessÖ but there are usually better options for just signal control. 

You may find a hex buffer chip in a dip package that is cheaper and smaller than piles of opto and transistors.  That should fulfil your need of separating the Arduino from the relay. 

8
General Questions / Re: Relay meets Optocoupler Question
« on: January 06, 2024, 05:47:40 PM »
Another thing you could try, if you donít want to have the Arduino connected directly to the relay, is to have your opto chip controlling 2 transistors.  One will set 5v or ground, and the 2nd transistor will set the opposite.  Hook those up to your relay, and should be golden. 

Look for ďtransistor not gateĒ in your favourite search engine if you need pointers on how to do that?

9
General Questions / Re: Relay meets Optocoupler Question
« on: January 06, 2024, 05:43:43 PM »
Yep, if itís a latching relay, you need to be able to completely reverse the voltage.  Giving 5v and ground one way will switch the relay to position 1.  Giving ground and 5v opposite will switch it to position 2.  So your current schematic is definitely not doing that. 

Iíve had no issues with just switching using the Arduino directly.  You will need 2 pins on the Arduino to do this, as you will be reversing which one is  High and Low to flip the relay. 
 
Here is a build doc for one of my projects that used a relay, schematic on page 2, have a look around the attiny chip to see what itís doing. 

https://graybloomfield.com/guitar/docs/clippy1.0.pdf

And the code that goes with it:  https://www.graybloomfield.com/guitar/docs/clippy-code1.0.zip


10
General Questions / Re: Relay meets Optocoupler Question
« on: January 06, 2024, 03:26:00 PM »
ďLatchingĒÖthatís the word I was failing to remember above. 😅

Check whether your relay is latching or not.

Also, if you are open to modifications, I have done plenty of Arduino and relay effects, and I donít think you need the opto or transistor at all.  I would normally just use a latching relay, and hook it up directly to 2 of the Arduino pins.  Put one high, the other low, for 100ms or so, to switch one way, and reverse the high / low for switching the other way.  That would require changing quite a bit of your board though. 

11
General Questions / Re: Relay meets Optocoupler Question
« on: January 06, 2024, 03:17:00 PM »
The Arduino code isnít going to make any difference here, so Iíd concentrate on the other parts. 

You can even take the Arduino out of it, and just apply 5v or ground to the opto to simulate what will happen when the pin goes high or low.

Iím struggling to work out the layout around that relay.  If the transistor is on, then you get 5v at one pin and ground at the other.  If the transistor is off, you get 5v at one pin, and the other pin is floating.  That doesnít seem right? 

Iíd probably use a multimeter to check how voltages are changing when you switch the opto, that might help isolate the issue, and you could also try just apply your 5v and ground to the relay pins to check it works. 

I canít remember if that relay is only on when voltage is applied, and off when no voltage, or if it is one where you reverse the voltage to switch the other way.  Might be worth checking what sort of relay you have, to make sure it will work with this schematic. 

Hope some of that is useful! 

12
Thereís probably an AI that could help you rewrite the novel about what you think about AIÖ

Theyíve introduced AI as a Ďhelperí at my job, and so far Iím giving it 1 out of 5 on the review, because 0 isnít an option.  Itís crap.  I spend more time having to think about what itís done, and identify the subtle or not so subtle ways itís wrong, than I would have spend just doing the work from scratch. 

That said, I see things about visual art that it produces, and it looks amazing what it can do in that space, which I understand comes down to training data and prompt writing skills.  Itís very good at copying what it has seen before. 

For now I see it as a tool that can make a thing that is similar to things you train it about.  Intelligence isnít a word Iíd use.  Machine Learning is closer to the mark. 

Huh, and now Iíve written a novel too. 😄

13
Build Reports / Re: It's my wah and I'll cry if I want to.
« on: October 09, 2023, 02:50:54 PM »
Ah yeah, I love the Bender theme. Very well done.

14
Open Discussion / Re: online PCB manufacturer
« on: October 05, 2023, 02:42:58 PM »
Iíve had good experiences with Elecrow. Havenít ordered anything for a while though.

15
Build Reports / Re: Effects Layouts Krokie Kenobi (Benson Preamp)
« on: September 20, 2023, 03:55:52 PM »
ďit just isn't what I'm looking forĒ Ö I see what you did there. 😄

Nice colour scheme though, youíve got the graphics, knobs and colour matched up really well. 

Pages: [1] 2 3 ... 56