Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Who's good with 555 Timers?

Joined
Jan 12, 2008
Messages
3,290
Points
83
It's not like the micro is busy with other things, but whatever. I do see your point.
 
Last edited:





Joined
Dec 11, 2011
Messages
4,364
Points
83
Sorry, I didn't intend for it to seem as one-up-manship. I'll go fix the pronouns so it doesn't come off that way hopefully. Likewise, I started writing the code at least a half hour before you posted your version so I didn't even see your post when I hit reply.

I have decent experience with astable/monostable outputs on uCs and I try to avoid delay() like the plague after the number of issues it causes.

My only legitimate nitpick with the 'blink' sketch modification is that he's going to use this in an electrically noisy environment, and it is useful to have some positive indication that the board is still functional. No hard feelings I hope =) .
 
Joined
Jan 12, 2008
Messages
3,290
Points
83
No, I get you man. I just wanted to tell why I simply went with the no effort code. I would use your code with more confidence.
 

ped

0
Joined
Nov 25, 2008
Messages
4,889
Points
113
Thanks guys, guess I'll get an Arduino then :)

Any recommendations? Just had a look on eBay and there are loads :s

Ped
 

ped

0
Joined
Nov 25, 2008
Messages
4,889
Points
113
Ok I'll order that, how do I write the code to it, remember, I've never used one of these.
 
Joined
Jan 14, 2009
Messages
1,452
Points
83
Install the Arduino software found here - https://www.arduino.cc/en/Main/Software

Install Drivers for the USB to Serial converter ( may happen automatically )

Plug Arduino board into PC via USB cable

Open Arduino software - Under "Tools" Select "Board" > Arduino Nano , Followed By "Tools" > Port , under this should be a COM port showing select it and a tick will appear next to it , this should be your Arduino , if there multiple look under device manager and see what com port it shows up under .

Remove all code from the current open sketch and then copy and past the code from this thread into the Arduino software window .

Then under the "edit" there is a blue circle with a arrow in it called upload , Hit that and if everything was setup , it will upload the code to the board
 

ped

0
Joined
Nov 25, 2008
Messages
4,889
Points
113
Superb I'll get this ordered now.

Thanks again.
 
Joined
Dec 11, 2011
Messages
4,364
Points
83
I've had issues with the CH340 based arduino clones, but hopefully you don't. My PC just doesn't want to recognize them or install drivers for them. So I stick to the 16u/8u atmel based ones (almost always arduino UNO clones with through hole main chip, not SMD). The procedure for use is exactly the same, it just uses a different Windows driver that is usually plug&play. There are micros and nanos which use the atmel chip for USB, but they're harder find on eBay.

Let me know if you want and I can look for a link.
 

ped

0
Joined
Nov 25, 2008
Messages
4,889
Points
113
Cheers Sig.

For the money, if it doesn't work I can just bin it :crackup: .
 
Joined
Dec 11, 2011
Messages
4,364
Points
83

ped

0
Joined
Nov 25, 2008
Messages
4,889
Points
113
Well the Arduino arrived and you were right Sig..that damn CH340! :crackup:

My computer has a long history of NOT liking FTDI or other serial port emulators, and Iv'e become quite the expert at installing drivers ect, but this thing is NOT playing ball .I'm going to take it home and try it on my other computers.

In the meantime, you linked to the Arduino's you use, those are however huge boards...do you know of similar nano boards?

Regards
 
Last edited:
Joined
Jan 14, 2009
Messages
1,452
Points
83
Hmm that sucks , didn't relies that was a issues with them clones

I personally use a Atmeg IC with the UNO boot loader on and make my own board up and use a genuine FTDI to program it in .

The other board I use is the Arduino pro mini , but again that needs a external FTDI board to programme it .
 
Last edited:

ped

0
Joined
Nov 25, 2008
Messages
4,889
Points
113
Ok, just an update..

Tried it on my Win10 x64 laptop and it worked first time! , Win10 installed it so fast, the "searching for drivers" pop up didn't even have time to appear :crackup: .

Uploaded the code first go, thanks for you're help.

@Sig

You said the output is Digital pin 3, I'm presuming thats "D3" on my board? , and do I just connect the relay coil to that pin? or does it need a pass transistor?

Regards
 
Joined
Jan 14, 2009
Messages
1,452
Points
83
Ok, just an update..

Tried it on my Win10 x64 laptop and it worked first time! , Win10 installed it so fast, the "searching for drivers" pop up didn't even have time to appear :crackup: .

Uploaded the code first go, thanks for you're help.

@Sig

You said the output is Digital pin 3, I'm presuming thats "D3" on my board? , and do I just connect the relay coil to that pin? or does it need a pass transistor?

Regards

Glad it worked : D ,

Yeah D3 - Digital 3

I would use a NPN transistor to switch the relay to ground , that's what I do , just make sure to put a reverse diode across the relay coil .

The pins on the Arduino can only source/sink around 20mA , I think
 
Last edited:

ped

0
Joined
Nov 25, 2008
Messages
4,889
Points
113
And I presume the output is 5V ?

@Sig (or anyone else)

Could you modify your code to give me 3S on 3S off , that I can use while testing...so I don't have to wait 55S for it to fire again, then when I'm sire it's all working, I can upload your original code and put it in to use.

Thanks
 
Last edited:




Top